This is a patch against 2.6.9 that is an update to an earlier patch I posted on 10/13/2004 ("NUMA policy support for file mappings"). The patch allows NUMA policies for file mappings. Page cache pages are allocated using a policy located in a shared_policy Red-Black tree attached to the mapping object (address_space). This involves: 1. add a shared_policy tree to the address_space object in fs.h. 2. modify page_cache_alloc() in pagemap.h to take a page index in addition to a mapping object, and use those to locate the correct policy in the mapping->policy tree when allocating the page. 3. modify filemap.c to pass the additional page offset to page_cache_alloc(). 4. Also in filemap.c, implement generic file {set|get}_policy() methods and add those to generic_file_vm_ops. 5. Init the file's shared policy in alloc_inode(), and free the shared policy in destroy_inode(). In addition, the patch adds a new flag to the mbind() syscall, MPOL_MF_MOVE. If this flag is set, any existing mapped anonymous or filemap pagecache pages that are/can be used for the given virtual memory region, that do not satisfy the NUMA policy, are moved to a new page that satisfies the policy. Here's how the new flag works with the existing MPOL_MF_STRICT flag (in the following discussion, "invalid page" means a page that does not satisfy the NUMA policy): MOVE and STRICT both set: attempt to move invalid pages, and if any move fails, return mbind() syscall failure. MOVE set: attempt to move invalid pages, but do not return error if any move fails. STRICT set: do not attempt to move invalid pages, returning mbind() failure (same behavior as before). neither MOVE or STRICT set: ignore invalid pages. Steve