Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758025Ab0HDBQp (ORCPT ); Tue, 3 Aug 2010 21:16:45 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:52677 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757876Ab0HDBQn (ORCPT ); Tue, 3 Aug 2010 21:16:43 -0400 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Date: Wed, 4 Aug 2010 10:11:50 +0900 From: KAMEZAWA Hiroyuki To: Daisuke Nishimura Cc: linux-mm@kvack.org, "balbir@linux.vnet.ibm.com" , vgoyal@redhat.com, m-ikeda@ds.jp.nec.com, gthelen@google.com, "akpm@linux-foundation.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH -mm 3/5] memcg scalable file stat accounting method Message-Id: <20100804101150.d7b05ce2.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: <20100804095513.6fef0a3d.nishimura@mxp.nes.nec.co.jp> References: <20100802191113.05c982e4.kamezawa.hiroyu@jp.fujitsu.com> <20100802191559.6af0cded.kamezawa.hiroyu@jp.fujitsu.com> <20100804095513.6fef0a3d.nishimura@mxp.nes.nec.co.jp> Organization: FUJITSU Co. LTD. X-Mailer: Sylpheed 3.0.3 (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: 1355 Lines: 50 On Wed, 4 Aug 2010 09:55:13 +0900 Daisuke Nishimura wrote: > > @@ -1074,7 +1075,49 @@ static unsigned int get_swappiness(struc > > return swappiness; > > } > > > > -/* A routine for testing mem is not under move_account */ > > +static void mem_cgroup_start_move(struct mem_cgroup *mem) > > +{ > > + int cpu; > > + /* for fast checking in mem_cgroup_update_file_stat() etc..*/ > > + spin_lock(&mc.lock); > > + for_each_possible_cpu(cpu) > > + per_cpu(mem->stat->count[MEM_CGROUP_ON_MOVE], cpu) += 1; > > + spin_unlock(&mc.lock); > > + > > + synchronize_rcu(); > > +} > > + > > +static void mem_cgroup_end_move(struct mem_cgroup *mem) > > +{ > > + int cpu; > > + > > + if (!mem) > > + return; > Is this check necessary? > Yes, I hit NULL here. That happens migration=off case, IIRC. Thanks, -Kame > Thanks, > Daisuke Nishimura. > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majordomo@kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: email@kvack.org > -- 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/