From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [PATCH 08/20] mm: Optimize fullmm TLB flushing Date: Wed, 27 Jun 2012 15:26:18 -0700 Message-ID: References: <20120627211540.459910855@chello.nl> <20120627212831.137126018@chello.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: In-Reply-To: <20120627212831.137126018@chello.nl> Sender: owner-linux-mm@kvack.org To: Peter Zijlstra Cc: 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 , Benjamin Herrenschmidt , David Miller , Russell King , Catalin Marinas , Chris Metcalf , Martin Schwidefsky , Tony Luck , Paul Mundt , Jeff Dike , Richard Weinberger , Hans-Christian Egtvedt List-Id: linux-arch.vger.kernel.org On Wed, Jun 27, 2012 at 2:15 PM, Peter Zijlstra wrote: > This originated from s390 which does something similar and would allow > s390 to use the generic TLB flushing code. > > The idea is to flush the mm wide cache and tlb a priory and not bother > with multiple flushes if the batching isn't large enough. > > This can be safely done since there cannot be any concurrency on this > mm, its either after the process died (exit) or in the middle of > execve where the thread switched to the new mm. I think we actually *used* to do the final TLB flush from within the context of the process that died. That doesn't seem to ever be the case any more, but it does worry me a bit. Maybe a VM_BUG_ON(current->active_mm == mm); or something for the fullmm case? 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/ . Don't email: email@kvack.org