Re: [PATCH 2/5] cpuset memory spread page cache implementation andhooks

From: Andrew Morton
Date: Sat Feb 04 2006 - 18:49:34 EST


Paul Jackson <pj@xxxxxxx> wrote:
>
> static inline struct page *page_cache_alloc(struct address_space *x)
> {
> + if (cpuset_mem_spread_check()) {
> + int n = cpuset_mem_spread_node();
> + return alloc_pages_node(n, mapping_gfp_mask(x), 0);
> + }
> return alloc_pages(mapping_gfp_mask(x), 0);
> }
>
> static inline struct page *page_cache_alloc_cold(struct address_space *x)
> {
> + if (cpuset_mem_spread_check()) {
> + int n = cpuset_mem_spread_node();
> + return alloc_pages_node(n, mapping_gfp_mask(x)|__GFP_COLD, 0);
> + }
> return alloc_pages(mapping_gfp_mask(x)|__GFP_COLD, 0);
> }

This is starting to get a bit bloaty. Might be worth thinking about
uninlining these for certain Kconfig combinations.

-
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/