Commit 65bb3719 authored by Mel Gorman's avatar Mel Gorman Committed by Linus Torvalds

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: default avatarMel Gorman <>
Acked-by: default avatarJohannes Weiner <>
Reviewed-by: default avatarRik van Riel <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 0bd62b11
......@@ -2035,7 +2035,7 @@ try_this_zone:
if (page)
if (IS_ENABLED(CONFIG_NUMA) && zlc_active)
zlc_mark_zone_full(zonelist, z);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment