From: Mel Gorman Date: Wed, 4 Jun 2014 23:10:05 +0000 (-0700) Subject: mm: page_alloc: do not update zlc unless the zlc is active X-Git-Tag: v3.14.31~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9c1e5d1d2b69554b7c922c88a3b5a7e8c2207c4;p=thirdparty%2Fkernel%2Fstable.git 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 Acked-by: Johannes Weiner Reviewed-by: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Mel Gorman Signed-off-by: Greg Kroah-Hartman --- diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 4b258297cc7c9..c7e27b8c72004 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2059,7 +2059,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); }