]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm: page_alloc: do not update zlc unless the zlc is active
authorMel Gorman <mgorman@suse.de>
Thu, 22 May 2014 00:43:17 +0000 (10:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 May 2014 00:43:17 +0000 (10:43 +1000)
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>
mm/page_alloc.c

index dddf43f2f545e344c5c7458458a1dea6bcb94d10..78161b600a66bb87be1eeedafb2d9e845a50d5e6 100644 (file)
@@ -2035,7 +2035,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);
        }