]> git.ipfire.org Git - people/ms/linux.git/commitdiff
mm: page_alloc: abort fair zone allocation policy when remotes nodes are encountered
authorMel Gorman <mgorman@suse.de>
Thu, 28 Aug 2014 18:35:44 +0000 (19:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Jan 2015 01:40:53 +0000 (17:40 -0800)
commit f7b5d647946aae1647bf5cd26c16b3a793c1ac49 upstream.

The purpose of numa_zonelist_order=zone is to preserve lower zones for
use with 32-bit devices.  If locality is preferred then the
numa_zonelist_order=node policy should be used.

Unfortunately, the fair zone allocation policy overrides this by
skipping zones on remote nodes until the lower one is found.  While this
makes sense from a page aging and performance perspective, it breaks the
expected zonelist policy.  This patch restores the expected behaviour
for zone-list ordering.

Signed-off-by: Mel Gorman <mgorman@suse.de>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mm/page_alloc.c

index fbf1f547dd83df7d839d03f89327ed24eece5c3a..3eb5adf1b2ddb33205e70721b6b1580115621af6 100644 (file)
@@ -1980,7 +1980,7 @@ zonelist_scan:
                 */
                if (alloc_flags & ALLOC_FAIR) {
                        if (!zone_local(preferred_zone, zone))
-                               continue;
+                               break;
                        if (atomic_long_read(&zone->vm_stat[NR_ALLOC_BATCH]) <= 0)
                                continue;
                }