Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 18 Feb 2002 19:23:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 18 Feb 2002 19:23:25 -0500 Received: from dsl-213-023-040-169.arcor-ip.net ([213.23.40.169]:26769 "EHLO starship.berlin") by vger.kernel.org with ESMTP id ; Mon, 18 Feb 2002 19:23:05 -0500 Content-Type: text/plain; charset=US-ASCII From: Daniel Phillips To: Hugh Dickins Subject: Re: [RFC] Page table sharing Date: Tue, 19 Feb 2002 01:27:42 +0100 X-Mailer: KMail [version 1.3.2] Cc: Linus Torvalds , dmccr@us.ibm.com, Kernel Mailing List , linux-mm@kvack.org, Robert Love , Rik van Riel , mingo@redhat.com, Andrew Morton , manfred@colorfullife.com, wli@holomorphy.com In-Reply-To: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Message-Id: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On February 19, 2002 01:03 am, Hugh Dickins wrote: > On Tue, 19 Feb 2002, Daniel Phillips wrote: > > On February 18, 2002 08:04 pm, Hugh Dickins wrote: > > > On Mon, 18 Feb 2002, Daniel Phillips wrote: > > > > On February 18, 2002 09:09 am, Hugh Dickins wrote: > > > > > Since copy_page_range would not copy shared page tables, I'm wrong to > > > > > point there. But __pte_alloc does copy shared page tables (to unshare > > > > > them), and needs them to be stable while it does so: so locking against > > > > > swap_out really is required. It also needs locking against read faults, > > > > > and they against each other: but there I imagine it's just a matter of > > > > > dropping the write arg to __pte_alloc, going back to pte_alloc again. > > > > I'm not sure what you mean here, you're not suggesting we should unshare the > > page table on read fault are you? > > I am. But I can understand that you'd prefer not to do it that way. > Hugh No, that's not nearly studly enough ;-) Since we have gone to all the trouble of sharing the page table, we should swap in/out for all sharers at the same time. That is, keep it shared, saving memory and cpu. Now I finally see what you were driving at: before, we could count on the mm->page_table_lock for exclusion on read fault, now we can't, at least not when ptb->count is great than one[1]. So let's come up with something nice as a substitute, any suggestions? [1] I think that's a big, broad hint. -- Daniel - 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/