Re: [PATCH] shows Active/Inactive on per-node meminfo
From: Jesse Barnes
Date: Sat Aug 21 2004 - 15:14:06 EST
On Saturday, August 21, 2004 2:29 am, mita akinobu wrote:
> get_zone_counts() is used by max_sane_readahead(), and
> max_sane_readahead() is often called in filemap_nopage().
>
> If iterating over every node is going to be very slow, the following change
> would have a little bit of improvement on a large machine?
>
>
> --- linux-2.6.8.1-mm3/mm/readahead.c.orig 2004-08-21 15:18:08.924273720
> +0900 +++ linux-2.6.8.1-mm3/mm/readahead.c 2004-08-21 15:22:31.123413392
> +0900 @@ -572,6 +572,6 @@ unsigned long max_sane_readahead(unsigne
> unsigned long inactive;
> unsigned long free;
>
> - get_zone_counts(&active, &inactive, &free);
> + __get_zone_counts(&active, &inactive, &free, NODE_DATA(numa_node_id()));
> return min(nr, (inactive + free) / 2);
> }
Good catch, this looks good. for_each_pgdat just raises a red flag for me
these days. :)
Thanks,
Jesse
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/