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

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>
This commit is contained in:
Mel Gorman 2014-06-04 16:10:05 -07:00 committed by Linus Torvalds
parent 0bd62b1190
commit 65bb371984
1 changed files with 1 additions and 1 deletions

View File

@ -2035,7 +2035,7 @@ try_this_zone:
if (page) if (page)
break; break;
this_zone_full: this_zone_full:
if (IS_ENABLED(CONFIG_NUMA)) if (IS_ENABLED(CONFIG_NUMA) && zlc_active)
zlc_mark_zone_full(zonelist, z); zlc_mark_zone_full(zonelist, z);
} }