Re: Pagecache: find_or_create_page does not call a proper pageallocator function

From: Christoph Lameter
Date: Tue Apr 24 2007 - 17:28:30 EST

On Tue, 24 Apr 2007, Andrew Morton wrote:

> mapping_gfp_mask if a pretty foul thing. Adding
> struct page (*alloc_page)(struct address_space *mapping);
> to address_space_operations would be a quite nice cleanup.

Ummm... If things would be that simple... I think we need

struct page (*alloc_page)(struct address_space *mapping, int order, int
node, gfp_t flags)

node = -1 means abitrary node otherwise try to alloc on indicated node.

additional_flags are important to be able to specify GFP_THISNODE to
force alloc on one particular node. Plus there are the cpuset
context flages etc. If the allocation is atomic then the callback should
be able to react to that appropriately.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at