From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx143.postini.com [74.125.245.143]) by kanga.kvack.org (Postfix) with SMTP id 6532C6B005A for ; Fri, 29 Jun 2012 04:50:58 -0400 (EDT) Message-ID: <1340959798.28750.99.camel@twins> Subject: Re: [PATCH 08/20] mm: Optimize fullmm TLB flushing From: Peter Zijlstra Date: Fri, 29 Jun 2012 10:49:58 +0200 In-Reply-To: <1340920696.20977.104.camel@pasglop> References: <20120627211540.459910855@chello.nl> <20120627212831.137126018@chello.nl> <1340838154.10063.86.camel@twins> <1340838807.10063.90.camel@twins> <20120628091627.GB8573@arm.com> <1340879984.20977.80.camel@pasglop> <1340881196.28750.16.camel@twins> <20120628145327.GA17242@arm.com> <1340900425.28750.73.camel@twins> <1340902329.28750.83.camel@twins> <1340920641.20977.103.camel@pasglop> <1340920696.20977.104.camel@pasglop> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 Sender: owner-linux-mm@kvack.org List-ID: To: Benjamin Herrenschmidt Cc: Linus Torvalds , Catalin Marinas , "linux-kernel@vger.kernel.org" , "linux-arch@vger.kernel.org" , "linux-mm@kvack.org" , Thomas Gleixner , Ingo Molnar , "akpm@linux-foundation.org" , Rik van Riel , Hugh Dickins , Mel Gorman , Nick Piggin , Alex Shi , "Nikunj A. Dadhania" , Konrad Rzeszutek Wilk , David Miller , Russell King , Chris Metcalf , Martin Schwidefsky , Tony Luck , Paul Mundt , Jeff Dike , Richard Weinberger , Ralf Baechle , Kyle McMartin , James Bottomley , Chris Zankel On Fri, 2012-06-29 at 07:58 +1000, Benjamin Herrenschmidt wrote: > On Fri, 2012-06-29 at 07:57 +1000, Benjamin Herrenschmidt wrote: > > On Thu, 2012-06-28 at 18:52 +0200, Peter Zijlstra wrote: > > > No I think you're right (as always).. also an IPI will not force > > > schedule the thread that might be running on the receiving cpu, also > > > we'd have to wait for any such schedule to complete in order to > > > guarantee the mm isn't lazily used anymore. > > >=20 > > > Bugger..=20 > >=20 > > You can still do it if the mm count is 1 no ? Ie, current is the last > > holder of a reference to the mm struct... which will probably be the > > common case for short lived programs. >=20 > Also I just remembered... x86 flushes in SMP via IPIs right ? So maybe > you can invent a "detach and flush" variant of it ?=20 Its not just x86 I worry about.. I want to share as much as possible between all our architectures. But yeah, I could do it for mm_count =3D=3D 1, but I'd still need to specia= l case s390 because they always want it. -- 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