Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751197AbZL1CcR (ORCPT ); Sun, 27 Dec 2009 21:32:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750913AbZL1CcQ (ORCPT ); Sun, 27 Dec 2009 21:32:16 -0500 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:53890 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750823AbZL1CcQ (ORCPT ); Sun, 27 Dec 2009 21:32:16 -0500 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Date: Mon, 28 Dec 2009 11:28:35 +0900 From: KAMEZAWA Hiroyuki To: "Kirill A. Shutemov" Cc: containers@lists.linux-foundation.org, linux-mm@kvack.org, Paul Menage , Li Zefan , Andrew Morton , Balbir Singh , Pavel Emelyanov , Dan Malek , Vladislav Buzov , Daisuke Nishimura , Alexander Shishkin , linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 3/4] memcg: rework usage of stats by soft limit Message-Id: <20091228112835.937c8c20.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: References: <3f29ccc3c93e2defd70fc1c4ca8c133908b70b0b.1261858972.git.kirill@shutemov.name> <59a7f92356bf1508f06d12c501a7aa4feffb1bbc.1261858972.git.kirill@shutemov.name> Organization: FUJITSU Co. LTD. X-Mailer: Sylpheed 2.7.1 (GTK+ 2.10.14; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1064 Lines: 24 On Sun, 27 Dec 2009 04:09:01 +0200 "Kirill A. Shutemov" wrote: > Instead of incrementing counter on each page in/out and comparing it > with constant, we set counter to constant, decrement counter on each > page in/out and compare it with zero. We want to make comparing as fast > as possible. On many RISC systems (probably not only RISC) comparing > with zero is more effective than comparing with a constant, since not > every constant can be immediate operand for compare instruction. > > Also, I've renamed MEM_CGROUP_STAT_EVENTS to MEM_CGROUP_STAT_SOFTLIMIT, > since really it's not a generic counter. > > Signed-off-by: Kirill A. Shutemov I have to sort out these counter stuff after this. But now, Acked-by: KAMEZAWA Hiroyuki -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/