Allow restricted per node allocations via __GFP_THISNODE This implements a kernel facility to allocate on a particular node without fallback and without obeying either memory policies or cpuset constraints. We add a new gfp flag __GFP_THISNODE that disables cpusets, memory policies and fallback for an allocation. If there is no memory on a node then the allocation will return NULL. This is necessary for certain kernel subsystems that manage list of pages per node. Without this flag the page allocator may return pages from other nodes or the allocations may be redirected by memory policies or cpuset constraints. These redirections have shown to be a problem because they cause longer latencies during object draining in the slab allocator (but that is probably just the first visible symptom of this fundamental problem). Similar issues as for the slab allocator exist for the uncached allocator. __GFP_THISNODE can also be passed to vmalloc_* function to insure placement on a certain node. This may be necessary for certain driver allocations and allocation in the network stack to avoid redirection there. The patchset consists of 7 patches: Subject: [RFC 0/7] cpuset / mempolicy interference with kernel allocs fix Subject: [RFC 1/7] Cleanup get_page_from_freelist a bit Subject: [RFC 2/7] Add __GFP_THISNODE to control off node fallback Subject: [RFC 3/7] Enforce node allocation in sys_move_pages() Subject: [RFC 4/7] Genericize slab_node and huge_zonelist Subject: [RFC 5/7] Enforce node allocation in the uncached allocator Subject: [RFC 6/7] Enforce node allocation for profiling Subject: [RFC 7/7] slab: Keep nodelists pure and implement fall back