]> git.hungrycats.org Git - linux/commitdiff
mm: page_alloc: do not update zlc unless the zlc is active
authorMel Gorman <mgorman@suse.de>
Thu, 28 Aug 2014 18:35:16 +0000 (19:35 +0100)
committerJiri Slaby <jslaby@suse.cz>
Fri, 26 Sep 2014 09:52:02 +0000 (11:52 +0200)
commit 65bb371984d6a2c909244eb749e482bb40b72e36 upstream.

The zlc is used on NUMA machines to quickly skip over zones that are full.
 However it is always updated, even for the first zone scanned when the
zlc might not even be active.  As it's a write to a bitmap that
potentially bounces cache line it's deceptively expensive and most
machines will not care.  Only update the zlc if it was active.

Signed-off-by: Mel Gorman <mgorman@suse.de>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Rik van Riel <riel@redhat.com>
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: Jiri Slaby <jslaby@suse.cz>
mm/page_alloc.c

index 7139ed7c9a70b51c31a78833a0681c436c649360..2834c31ad0c1818d68bb6fe7197a53b48783351d 100644 (file)
@@ -2034,7 +2034,7 @@ try_this_zone:
                if (page)
                        break;
 this_zone_full:
-               if (IS_ENABLED(CONFIG_NUMA))
+               if (IS_ENABLED(CONFIG_NUMA) && zlc_active)
                        zlc_mark_zone_full(zonelist, z);
        }