]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - mm/page_alloc.c
[PATCH] Add __GFP_THISNODE to avoid fallback to other nodes and ignore cpuset/memory...
[net-next-2.6.git] / mm / page_alloc.c
index 208a6b03aa78b8765bb0226b56b01f97e3f26983..ea498788af53d5c74a0f0dbc9b8883f05e664b8d 100644 (file)
@@ -893,6 +893,9 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order,
         * See also cpuset_zone_allowed() comment in kernel/cpuset.c.
         */
        do {
+               if (unlikely((gfp_mask & __GFP_THISNODE) &&
+                       (*z)->zone_pgdat != zonelist->zones[0]->zone_pgdat))
+                               break;
                if ((alloc_flags & ALLOC_CPUSET) &&
                                !cpuset_zone_allowed(*z, gfp_mask))
                        continue;