Re: Note describing poor dcache utilization under high memory pressure

Daniel Phillips (phillips@bonn-fries.net)
Wed, 30 Jan 2002 00:21:47 +0100


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/