From mboxrd@z Thu Jan 1 00:00:00 1970 From: KAMEZAWA Hiroyuki Subject: Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock Date: Fri, 19 Mar 2010 12:00:49 +0900 Message-ID: <20100319120049.3dbf8440.kamezawa.hiroyu__29889.6115077243$1268967967$gmane$org@jp.fujitsu.com> References: <1268609202-15581-1-git-send-email-arighi@develer.com> <1268609202-15581-2-git-send-email-arighi@develer.com> <20100317115855.GS18054@balbir.in.ibm.com> <20100318085411.834e1e46.kamezawa.hiroyu@jp.fujitsu.com> <20100318041944.GA18054@balbir.in.ibm.com> <20100318133527.420b2f25.kamezawa.hiroyu@jp.fujitsu.com> <20100318162855.GG18054@balbir.in.ibm.com> <20100319102332.f1d81c8d.kamezawa.hiroyu@jp.fujitsu.com> <20100319024039.GH18054@balbir.in.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20100319024039.GH18054-SINUvgVNF2CyUtPGxGje5AC/G2K4zDHf@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org Cc: linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, Andrea Righi , Daisuke Nishimura , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Trond Myklebust , Greg-FOgKQjlUJ6BQetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Suleiman Souhlal , Andrew Morton , Peter-FOgKQjlUJ6BQetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Vivek Goyal List-Id: containers.vger.kernel.org On Fri, 19 Mar 2010 08:10:39 +0530 Balbir Singh wrote: > * KAMEZAWA Hiroyuki [2010-03-19 10:23:32]: > > > On Thu, 18 Mar 2010 21:58:55 +0530 > > Balbir Singh wrote: > > > > > * KAMEZAWA Hiroyuki [2010-03-18 13:35:27]: > > > > > > Then, no probelm. It's ok to add mem_cgroup_udpate_stat() indpendent from > > > > mem_cgroup_update_file_mapped(). The look may be messy but it's not your > > > > fault. But please write "why add new function" to patch description. > > > > > > > > I'm sorry for wasting your time. > > > > > > Do we need to go down this route? We could check the stat and do the > > > correct thing. In case of FILE_MAPPED, always grab page_cgroup_lock > > > and for others potentially look at trylock. It is OK for different > > > stats to be protected via different locks. > > > > > > > I _don't_ want to see a mixture of spinlock and trylock in a function. > > > > A well documented well written function can help. The other thing is to > of-course solve this correctly by introducing different locking around > the statistics. Are you suggesting the later? > No. As I wrote. - don't modify codes around FILE_MAPPED in this series. - add a new functions for new statistics Then, - think about clean up later, after we confirm all things work as expected. Thanks, -Kame