Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 29 Jan 2002 18:20:04 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 29 Jan 2002 18:18:48 -0500 Received: from dsl-213-023-043-145.arcor-ip.net ([213.23.43.145]:2953 "EHLO starship.berlin") by vger.kernel.org with ESMTP id ; Tue, 29 Jan 2002 18:17:37 -0500 Content-Type: text/plain; charset=US-ASCII From: Daniel Phillips To: Oliver Xymoron Subject: Re: Note describing poor dcache utilization under high memory pressure Date: Wed, 30 Jan 2002 00:21:47 +0100 X-Mailer: KMail [version 1.3.2] Cc: Rik van Riel , Linus Torvalds , Josh MacDonald , linux-kernel , , 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 January 30, 2002 12:02 am, Oliver Xymoron wrote: > On Tue, 29 Jan 2002, Daniel Phillips wrote: > > With fork/exec, for each page table there are two cases: > > > > - The parent instantiated the page table. In this case the extra work > > to set the ptes RO (only for CoW pages) is insignificant. > > Marking the page table entries rather than the page directory entries > read-only is a lot of work on a large process. I'm still missing your point. When the parent's page table was instantiated we took a fault. Later, we walk through up to 1024 ptes setting them RO, if they are not already (which they probably are). Don't you think the cost of the former dwarves the latter? In fact, if we are worried about this, we can keep a flag on the page table telling us all the ptes are still set RO so we don't have to do it again. > And it doesn't make a lot > of sense for a large process that wants to fork/exec something tiny. > > In > fact, I'm slightly worried about the possible growth of the page > directories on really big boxes. Detaching the entire mm is comparatively > cheap and doesn't grow with process size. > > > - The parent is still sharing the page table with its parent and so the > > ptes are still set RO. > > Fork/exec is far and away the most common case, and the fork/fork case is > rare enough that it's not even worth thinking about. I'm not sure I agree with this. I matters a lot if that rare case happens to be the application your using all the time, and then it becomes the common case. -- 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/