Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753967Ab2F1Lbv (ORCPT ); Thu, 28 Jun 2012 07:31:51 -0400 Received: from casper.infradead.org ([85.118.1.10]:43318 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751473Ab2F1Lbt convert rfc822-to-8bit (ORCPT ); Thu, 28 Jun 2012 07:31:49 -0400 Message-ID: <1340883048.28750.25.camel@twins> Subject: Re: [PATCH 08/20] mm: Optimize fullmm TLB flushing From: Peter Zijlstra To: Martin Schwidefsky Cc: Linus Torvalds , 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 , Tony Luck , Paul Mundt , Jeff Dike , Richard Weinberger , Ralf Baechle , Kyle McMartin , James Bottomley , Chris Zankel Date: Thu, 28 Jun 2012 13:30:48 +0200 In-Reply-To: <20120628131950.0afe39f0@de.ibm.com> References: <20120627211540.459910855@chello.nl> <20120627212831.137126018@chello.nl> <1340838154.10063.86.camel@twins> <1340838807.10063.90.camel@twins> <1340880904.28750.13.camel@twins> <20120628131950.0afe39f0@de.ibm.com> Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Mailer: Evolution 3.2.2- Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1229 Lines: 29 On Thu, 2012-06-28 at 13:19 +0200, Martin Schwidefsky wrote: > The cpu can create speculative TLB entries, but only if it runs in the > mode that uses the respective mm. We have two mm's active at the same > time, the kernel mm (init_mm) and the user mm. While the cpu runs only > in kernel mode it is not allowed to create TLBs for the user mm. > While running in user mode it is allowed to speculatively create TLBs. OK, that's neat. > Basically we have two special requirements on s390: > 1) do not modify ptes while attached to another cpu except with the > special IPTE / IDTE instructions Right, and your fullmm case works by doing a global invalidate after all threads have ceased userspace execution, this allows you to do away with the IPTE/IDTE instructions since there's no other active cpus on the userspace mm anymore. > 2) do a TLB flush before freeing any kind of page table page, s390 > needs a flush for pud, pmd & pte tables. Right, we do that (now).. -- 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/