Commit 55dcadc2753639b07efed5d8baafeab47d4613a7

Authored by Mel Gorman
Committed by Jiri Slaby
1 parent 69aa12f296

mm: page_alloc: do not update zlc unless the zlc is active

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -2034,7 +2034,7 @@
2034 2034 if (page)
2035 2035 break;
2036 2036 this_zone_full:
2037   - if (IS_ENABLED(CONFIG_NUMA))
  2037 + if (IS_ENABLED(CONFIG_NUMA) && zlc_active)
2038 2038 zlc_mark_zone_full(zonelist, z);
2039 2039 }
2040 2040