From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932664AbaEMJqB (ORCPT ); Tue, 13 May 2014 05:46:01 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49888 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759665AbaEMJpz (ORCPT ); Tue, 13 May 2014 05:45:55 -0400 From: Mel Gorman To: Andrew Morton Cc: Johannes Weiner , Vlastimil Babka , Jan Kara , Michal Hocko , Hugh Dickins , Peter Zijlstra , Dave Hansen , Mel Gorman , Linux Kernel , Linux-MM , Linux-FSDevel Subject: [PATCH 01/19] mm: page_alloc: Do not update zlc unless the zlc is active Date: Tue, 13 May 2014 10:45:32 +0100 Message-Id: <1399974350-11089-2-git-send-email-mgorman@suse.de> X-Mailer: git-send-email 1.8.4.5 In-Reply-To: <1399974350-11089-1-git-send-email-mgorman@suse.de> References: <1399974350-11089-1-git-send-email-mgorman@suse.de> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 5dba293..f8b80c3 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2044,7 +2044,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); } -- 1.8.4.5