From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756094Ab0AOErW (ORCPT ); Thu, 14 Jan 2010 23:47:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754411Ab0AOErV (ORCPT ); Thu, 14 Jan 2010 23:47:21 -0500 Received: from fgwmail7.fujitsu.co.jp ([192.51.44.37]:59567 "EHLO fgwmail7.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753332Ab0AOErU (ORCPT ); Thu, 14 Jan 2010 23:47:20 -0500 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 From: KOSAKI Motohiro To: KAMEZAWA Hiroyuki Subject: Re: [resend][PATCH] mm: Restore zone->all_unreclaimable to independence word Cc: kosaki.motohiro@jp.fujitsu.com, Andrew Morton , Wu Fengguang , David Rientjes , LKML , linux-mm , Minchan Kim , Huang Shijie In-Reply-To: <20100115113035.0acbb3dc.kamezawa.hiroyu@jp.fujitsu.com> References: <20100114151959.2c46ee79.akpm@linux-foundation.org> <20100115113035.0acbb3dc.kamezawa.hiroyu@jp.fujitsu.com> Message-Id: <20100115134614.6ECF.A69D9226@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.50.07 [ja] Date: Fri, 15 Jan 2010 13:47:17 +0900 (JST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Thu, 14 Jan 2010 15:19:59 -0800 > Andrew Morton wrote: > > > On Thu, 14 Jan 2010 16:32:29 +0800 > > Wu Fengguang wrote: > > > > > On Thu, Jan 14, 2010 at 03:14:10PM +0800, KOSAKI Motohiro wrote: > > > > > On Thu, 14 Jan 2010, KOSAKI Motohiro wrote: > > > > > > > > > > > commit e815af95 (change all_unreclaimable zone member to flags) chage > > > > > > all_unreclaimable member to bit flag. but It have undesireble side > > > > > > effect. > > > > > > free_one_page() is one of most hot path in linux kernel and increasing > > > > > > atomic ops in it can reduce kernel performance a bit. > > > > > > > > > > > > Thus, this patch revert such commit partially. at least > > > > > > all_unreclaimable shouldn't share memory word with other zone flags. > > > > > > > > > > > > > > > > I still think you need to quantify this; saying you don't have a large > > > > > enough of a machine that will benefit from it isn't really a rationale for > > > > > the lack of any data supporting your claim. We should be basing VM > > > > > changes on data, not on speculation that there's a measurable impact > > > > > here. > > > > > > > > > > Perhaps you could ask a colleague or another hacker to run a benchmark for > > > > > you so that the changelog is complete? > > > > > > > > ok, fair. although I dislike current unnecessary atomic-ops. > > > > I'll pending this patch until get good data. > > > > > > I think it's a reasonable expectation to help large boxes. > > > > > > What we can do now, is to measure if it hurts mainline SMP > > > boxes. If not, we are set on doing the patch :) > > > > yup, the effects of the change might be hard to measure. Not that one > > shouldn't try! > > > > But sometimes we just have to do a best-effort change based upon theory > > and past experience. > > > > Speaking of which... > > > > : --- a/include/linux/mmzone.h > > : +++ b/include/linux/mmzone.h > > : @@ -341,6 +341,7 @@ struct zone { > > : > > : unsigned long pages_scanned; /* since last reclaim */ > > : unsigned long flags; /* zone flags, see below */ > > : + int all_unreclaimable; /* All pages pinned */ > > : > > : /* Zone statistics */ > > : atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; > > > > Was that the best place to put the field? It adds four bytes of > > padding to the zone, hence is suboptimal from a cache utilisation point > > of view. > > > > It might also be that we can place this field closed in memory to other > > fields which are being manipulated at the same time as > > all_unreclaimable, hm? > > > How about the same line where zone->lock is ? Sure. page allocator obviously touch zone->lock at first. Incremental patch is here. --- include/linux/mmzone.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 4f0c6f1..0df3749 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -314,6 +314,7 @@ struct zone { * free areas of different sizes */ spinlock_t lock; + int all_unreclaimable; /* All pages pinned */ #ifdef CONFIG_MEMORY_HOTPLUG /* see spanned/present_pages for more description */ seqlock_t span_seqlock; @@ -341,7 +342,6 @@ struct zone { unsigned long pages_scanned; /* since last reclaim */ unsigned long flags; /* zone flags, see below */ - int all_unreclaimable; /* All pages pinned */ /* Zone statistics */ atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; -- 1.6.5.2