From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail143.messagelabs.com (mail143.messagelabs.com [216.82.254.35]) by kanga.kvack.org (Postfix) with ESMTP id 398806B00F1 for ; Thu, 16 Jun 2011 17:58:42 -0400 (EDT) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (authenticated bits=0) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id p5GLw624019382 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Thu, 16 Jun 2011 14:58:08 -0700 Received: by wwi36 with SMTP id 36so1692633wwi.26 for ; Thu, 16 Jun 2011 14:58:06 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1308097798.17300.142.camel@schen9-DESK> <1308101214.15392.151.camel@sli10-conroe> <1308138750.15315.62.camel@twins> <20110615161827.GA11769@tassilo.jf.intel.com> <1308156337.2171.23.camel@laptop> <1308163398.17300.147.camel@schen9-DESK> <1308169937.15315.88.camel@twins> <4DF91CB9.5080504@linux.intel.com> <1308172336.17300.177.camel@schen9-DESK> <1308173849.15315.91.camel@twins> <1308255972.17300.450.camel@schen9-DESK> From: Linus Torvalds Date: Thu, 16 Jun 2011 14:26:41 -0700 Message-ID: Subject: Re: REGRESSION: Performance regressions from switching anon_vma->lock to mutex Content-Type: text/plain; charset=ISO-8859-1 Sender: owner-linux-mm@kvack.org List-ID: To: Tim Chen Cc: Peter Zijlstra , Andi Kleen , Shaohua Li , Andrew Morton , Hugh Dickins , KOSAKI Motohiro , Benjamin Herrenschmidt , David Miller , Martin Schwidefsky , Russell King , Paul Mundt , Jeff Dike , Richard Weinberger , "Luck, Tony" , KAMEZAWA Hiroyuki , Mel Gorman , Nick Piggin , Namhyung Kim , "Shi, Alex" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "Rafael J. Wysocki" On Thu, Jun 16, 2011 at 2:06 PM, Linus Torvalds wrote: > On Thu, Jun 16, 2011 at 2:05 PM, Linus Torvalds > wrote: >> >> This patch is UNTESTED! > > It was also UNATTACHED! Hmm. And it doesn't work. We deadlock when we free the anon_vma because the *freeing* path wants to take the anon_vma lock. See that horrid code in anon_vma_free(). So now we now hold the root over the whole series of frees, and get an instant deadlock. We also can happen to free the root anon_vma before we release the lock in it, which is another slight problem ;) So the unlink_anon_vmas() case is actually much more complicated than the clone case. In other words, just forget that second patch. I'll have to think about it. Linus -- 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