Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932710Ab1FQSsv (ORCPT ); Fri, 17 Jun 2011 14:48:51 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:52871 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932429Ab1FQSst (ORCPT ); Fri, 17 Jun 2011 14:48:49 -0400 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> <1308310080.2355.19.camel@twins> <1308334688.12801.19.camel@laptop> <1308335557.12801.24.camel@laptop> From: Linus Torvalds Date: Fri, 17 Jun 2011 11:41:55 -0700 Message-ID: Subject: Re: REGRESSION: Performance regressions from switching anon_vma->lock to mutex To: Peter Zijlstra Cc: Hugh Dickins , Tim Chen , Andi Kleen , Shaohua Li , Andrew Morton , 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" Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1082 Lines: 23 On Fri, Jun 17, 2011 at 11:39 AM, Linus Torvalds wrote: > > Having gone over it a bit more, I actually think I prefer to just > special-case the allocation instead. Just to explain my thinking: the thing I disliked most about doing an allocation while holding the lock wasn't that I thought we would deadlock on page reclaim. I don't claim that kind of far-sight. No, the thing I disliked was that if we're low on memory and actually have to wait, I disliked having the lack of concurrency. I'm ok with holding the mutex over a few more CPU cycles, but anything longer might actually hurt throughput. So the patch I just sent out should fix both the page reclaim deadlock, and avoid any problems with delays due to holding the critical lock over an expensive allocation. Linus -- 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/