From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail6.bemta12.messagelabs.com (mail6.bemta12.messagelabs.com [216.82.250.247]) by kanga.kvack.org (Postfix) with ESMTP id 62C676B0012 for ; Sat, 11 Jun 2011 19:04:25 -0400 (EDT) Received: by bwz17 with SMTP id 17so4604895bwz.14 for ; Sat, 11 Jun 2011 16:04:22 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20110611184416.GB3238@redhat.com> References: <20110610091355.2ce38798.kamezawa.hiroyu@jp.fujitsu.com> <20110610113311.409bb423.kamezawa.hiroyu@jp.fujitsu.com> <20110610121949.622e4629.kamezawa.hiroyu@jp.fujitsu.com> <20110610125551.385ea7ed.kamezawa.hiroyu@jp.fujitsu.com> <20110610133021.2eaaf0da.kamezawa.hiroyu@jp.fujitsu.com> <20110610235442.GA21413@cmpxchg.org> <20110611175136.GA31154@cmpxchg.org> <20110611184416.GB3238@redhat.com> Date: Sun, 12 Jun 2011 08:04:21 +0900 Message-ID: Subject: Re: [PATCH] [BUGFIX] update mm->owner even if no next owner. From: Hiroyuki Kamezawa Content-Type: text/plain; charset=ISO-8859-1 Sender: owner-linux-mm@kvack.org List-ID: To: Andrea Arcangeli Cc: Johannes Weiner , Hugh Dickins , KAMEZAWA Hiroyuki , Ying Han , Dave Jones , Linux Kernel , "linux-mm@kvack.org" , Oleg Nesterov , "akpm@linux-foundation.org" 2011/6/12 Andrea Arcangeli : > On Sat, Jun 11, 2011 at 07:51:36PM +0200, Johannes Weiner wrote: >> This is a problem with the patch, but I think Kame's analysis and >> approach to fix it are still correct. > > I agree with Kame's analysis too. This explains why removing the > mmap_sem read mode introduced the problem, it was quite some > unexpected subtleness not apparent to the naked eye, as memcg didn't > explicitly relay on mmap_sem but it did implicitly during exit because > of the __khugepaged_exit waiting if we were collapsing an hugepage... > > So the fix is safe because the task struct is freed with > delayed_put_task_struct and that won't run until we rcu_read_unlock > after mem_cgroup_from_task. > > Reviewed-by: Andrea Arcangeli > Thank you all. Regards, -Kame -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org