KAMEZAWA Hiroyuki <[email protected]> wrote:
>
> +static inline struct pglist_data *first_online_pgdat(void)
> +{
> + return NODE_DATA(first_online_node);
> +}
> +
> +static inline struct pglist_data *next_online_pgdat(struct pglist_data *pgdat)
> +{
> + int nid = next_online_node(pgdat->node_id);
> +
> + if (nid == MAX_NUMNODES)
> + return NULL;
> + return NODE_DATA(nid);
> +}
> +
> +
> +/**
> + * for_each_pgdat - helper macro to iterate over all nodes
> + * @pgdat - pointer to a pg_data_t variable
> + */
> +#define for_each_online_pgdat(pgdat) \
> + for (pgdat = first_online_pgdat(); \
> + pgdat; \
> + pgdat = next_online_pgdat(pgdat))
> +
> +/*
> + * next_zone - helper magic for for_each_zone()
> + * Thanks to William Lee Irwin III for this piece of ingenuity.
> + */
> +static inline struct zone *next_zone(struct zone *zone)
> +{
> + pg_data_t *pgdat = zone->zone_pgdat;
> +
> + if (zone < pgdat->node_zones + MAX_NR_ZONES - 1)
> + zone++;
> + else {
> + pgdat = next_online_pgdat(pgdat);
> + if (pgdat)
> + zone = pgdat->node_zones;
> + else
> + zone = NULL;
> + }
> + return zone;
> +}
Some of these things must generate a large amount of code - would you have
time to look into uninlining them, see what impact that has on .text size?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]