Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759608Ab2BNIqN (ORCPT ); Tue, 14 Feb 2012 03:46:13 -0500 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:47589 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753219Ab2BNIqL (ORCPT ); Tue, 14 Feb 2012 03:46:11 -0500 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Date: Tue, 14 Feb 2012 17:44:42 +0900 From: KAMEZAWA Hiroyuki To: Greg Thelen Cc: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "hannes@cmpxchg.org" , Michal Hocko , "akpm@linux-foundation.org" , Ying Han , Hugh Dickins Subject: Re: [PATCH 2/6 v4] memcg: simplify move_account() check Message-Id: <20120214174442.3efcb22c.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: References: <20120214120414.025625c2.kamezawa.hiroyu@jp.fujitsu.com> <20120214120756.0a42f065.kamezawa.hiroyu@jp.fujitsu.com> Organization: FUJITSU Co. LTD. X-Mailer: Sylpheed 3.1.1 (GTK+ 2.10.14; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1614 Lines: 43 On Mon, 13 Feb 2012 23:21:34 -0800 Greg Thelen wrote: > On Mon, Feb 13, 2012 at 7:07 PM, KAMEZAWA Hiroyuki > wrote: > > From 9cdb3b63dc8d08cc2220c54c80438c13433a0d12 Mon Sep 17 00:00:00 2001 > > From: KAMEZAWA Hiroyuki > > Date: Thu, 2 Feb 2012 10:02:39 +0900 > > Subject: [PATCH 2/6] memcg: simplify move_account() check. > > > > In memcg, for avoiding take-lock-irq-off at accessing page_cgroup, > > a logic, flag + rcu_read_lock(), is used. This works as following > > > >     CPU-A                     CPU-B > >                             rcu_read_lock() > >    set flag > >                             if(flag is set) > >                                   take heavy lock > >                             do job. > >    synchronize_rcu()        rcu_read_unlock() > > I assume that CPU-A will take heavy lock after synchronize_rcu() when > updating variables read by CPU-B. > Ah, yes. I should wrote that. > >  memcontrol.c |   65 ++++++++++++++++++++++------------------------------------- > >  1 file changed, 25 insertions(+), 40 deletions(-) > > > > Signed-off-by: KAMEZAWA Hiroyuki > > Acked-by: Greg Thelen > Thank you!. -Kame -- 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/