From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757215Ab0DIIq3 (ORCPT ); Fri, 9 Apr 2010 04:46:29 -0400 Received: from cantor.suse.de ([195.135.220.2]:33186 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751958Ab0DIIq1 (ORCPT ); Fri, 9 Apr 2010 04:46:27 -0400 Date: Fri, 9 Apr 2010 18:46:14 +1000 From: Nick Piggin To: Peter Zijlstra Cc: Andrea Arcangeli , Avi Kivity , Thomas Gleixner , Rik van Riel , Ingo Molnar , akpm@linux-foundation.org, Linus Torvalds , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Benjamin Herrenschmidt , David Miller , Hugh Dickins , Mel Gorman Subject: Re: [PATCH 07/13] powerpc: Preemptible mmu_gather Message-ID: <20100409084614.GN5683@laptop> References: <20100408191737.296180458@chello.nl> <20100408192722.901224587@chello.nl> <20100409040756.GK5683@laptop> <1270800847.20295.3225.camel@laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1270800847.20295.3225.camel@laptop> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 09, 2010 at 10:14:07AM +0200, Peter Zijlstra wrote: > On Fri, 2010-04-09 at 14:07 +1000, Nick Piggin wrote: > > On Thu, Apr 08, 2010 at 09:17:44PM +0200, Peter Zijlstra wrote: > > > Fix up powerpc to the new mmu_gather stuffs. > > > > > > PPC has an extra batching queue to RCU free the actual pagetable > > > allocations, use the ARCH extentions for that for now. > > > > > > For the ppc64_tlb_batch, which tracks the vaddrs to unhash from the > > > hardware hash-table, keep using per-cpu arrays but flush on context > > > switch and use a TIF bit to track the laxy_mmu state. > > > > Hm. Pity powerpc can't just use tlb flush gathering for this batching, > > (which is what it was designed for). Then it could avoid these tricks. > > What's preventing this? Adding a tlb gather for COW case in > > copy_page_range? > > I'm not quite sure what about that, didn't fully investigate it, just > wanted to get something working for now. No it's not your problem, but just perhaps a good add-on to your patchset. Thanks for thinking about it, though. > > Of of the things is that both power and sparc need more than the struct > page we normally gather. > > I did think of making the mmu_gather have something like > > struct mmu_page { > struct page *page; > #ifdef HAVE_ARCH_TLB_VADDR > unsigned long vaddr; > #endif > }; Well you could also have a per-arch struct for this, which they can fill in their own info with (I think powerpc takes the pte as well) > > struct mmu_gather { > ... > unsigned int nr; > struct mmu_page *pages; > }; > > > and doing that vaddr collection right along with it in the same batch. > > I think that that would work, Ben, Dave?