From: Daniel Phillips <phillips@bonn-fries.net>
To: Horst von Brand <brand@jupiter.cs.uni-dortmund.de>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Note describing poor dcache utilization under high memory pressure
Date: Wed, 30 Jan 2002 11:55:55 +0100 [thread overview]
Message-ID: <E16VsPE-0000DZ-00@starship.berlin> (raw)
In-Reply-To: <200201300907.g0U97icL001965@tigger.cs.uni-dortmund.de>
In-Reply-To: <200201300907.g0U97icL001965@tigger.cs.uni-dortmund.de>
On January 30, 2002 10:07 am, Horst von Brand wrote:
> Daniel Phillips <phillips@bonn-fries.net> said:
> > On January 29, 2002 12:54 pm, Helge Hafting wrote:
> > > Momchil Velikov wrote:
>
> [...]
>
> > > > Umm, all the ptes af the parent ought to be made COW, no ?
>
> > > Sure. But quite a few of them may be COW already, if the parent
> > > itself is a result of some earlier fork.
>
> > Right, or if the parent has already forked at least one child.
>
> But most of this will be lost on exec(2).
Even if we doing nothing more than the algorithm on the table, I doubt you'll
see a measurable overhead on fork+exec. Certainly it will be as good or
better than what we have currently.
If that's not good enough, I'm considering keeping a bit on the page table
indicating whether are particular page table is currently in the 'all CoWable
ptes set RO' state, and if so, don't do it again. I think that with this
small optimization, the value of further improvements will be small indeed.
That said, Linus's suggestion of using the x86's ability to have the
writeprotect bits in a page directory override the protections at the page
level is a good one, and reduces the cost of detecting the fork+exec case to
a very small number of faults - none if we are clever. But this is entirely
secondary to the main goal of sharing page tables at all, which is a rather
fundamental shift in the way the Linux VM works. (Though it seems the patch
will be small.)
> Also, it is my impression that
> the tree of _running_ processes isn't usually very deep (Say init --> X -->
> [Random processes] --> [compilations &c], this would make 5 or 6 deep, no
> more.
Worst case is just as important as typical case here, since there will always
be x% of users out there whose normal workload consists entirely of worst
case.
> Should take a pstree(1) listing on a busy machine and work out some
> statistics... here (a personal worstation) the tree is very fat at the
> first level below init(8), and just 5 deep when running pstree(1)).
Here's my tree - on a non-very-busy laptop. Why is my X tree so much deeper?
I suppose if I was running java this would look considerably more interesting.
init-+-apache---8*[apache]
|-apmd
|-bash---bash---xinit-+-XFree86
| `-xfwm-+-xfce---gnome-terminal-+-bash---pstree
| | `-gnome-pty-helpe
| `-xfgnome
|-cardmgr
|-cupsd---http
|-5*[getty]
|-gpm
|-kapm-idled
|-kdeinit---kdeinit
|-5*[kdeinit]
|-kdesud
|-keventd
|-kmail
|-mozilla-bin---mozilla-bin---3*[mozilla-bin]
|-portmap
|-sshd
`-xchat
> Sure, all processes will all end up sharing glibc, and the graphical stuff
> will share the X &c libraries, so this would end up being a win this way.
Nobody has suggested that the sharing algorithm as described isn't a win,
IMHO, we are quibbling over the last few percent of the win. It's getting
high time to end the suspense by benchmarking the code.
Caveat: the page table sharing as described does not do a lot for shared
mmaps, such as glibc. (Unless those are inherited through a fork of course,
then it helps a lot.) Let me reiterate my goal with this patch: *Fix The
Fork Problem With Rmap* so that we can quit spending months fiddling with
virtual scanning, trying to get it to work properly (it never will).
I see the value in the various suggestions I've received, but what I don't
see is the value in delaying, or getting stuck adding new features. Let's
concentrate on making the simple thing I've described work *now* and add
features to it later.
I'm gratified that nobody has yet pointed out any fundamental flaws that
would keep it from working. I wasn't at all sure of that when I set out on
this path a month ago.
--
Daniel
next prev parent reply other threads:[~2002-01-30 10:51 UTC|newest]
Thread overview: 85+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-28 17:13 Josh MacDonald
2002-01-28 17:39 ` Linus Torvalds
2002-01-28 18:01 ` Rik van Riel
2002-01-28 18:21 ` Linus Torvalds
2002-01-28 18:37 ` Rik van Riel
2002-01-28 19:28 ` William Lee Irwin III
2002-01-28 20:01 ` Daniel Phillips
2002-01-28 21:33 ` Rick Stevens
2002-01-28 21:43 ` Rik van Riel
2002-01-28 22:00 ` Rick Stevens
2002-01-28 22:43 ` Daniel Phillips
2002-01-28 23:06 ` Rick Stevens
2002-01-28 23:51 ` [OT] " jepler
2002-01-29 2:30 ` IPmonger
2002-01-29 12:02 ` Karl & Betty Schendel
2002-01-28 22:26 ` Daniel Phillips
2002-01-28 22:34 ` Brian Gerst
2002-01-28 23:08 ` Daniel Phillips
2002-01-28 22:39 ` Daniel Phillips
2002-01-28 23:12 ` Rick Stevens
2002-01-28 23:27 ` Daniel Phillips
2002-01-28 22:01 ` Momchil Velikov
2002-01-28 22:19 ` Daniel Phillips
2002-01-29 1:29 ` Oliver Xymoron
2002-01-29 1:37 ` [reiserfs-list] " Valdis.Kletnieks
2002-01-29 1:45 ` Daniel Phillips
2002-01-29 8:39 ` Momchil Velikov
2002-01-29 8:55 ` Daniel Phillips
2002-01-29 9:20 ` William Lee Irwin III
2002-01-29 9:55 ` Daniel Phillips
2002-01-29 10:18 ` Momchil Velikov
2002-01-29 19:55 ` William Lee Irwin III
2002-01-29 20:08 ` Linus Torvalds
2002-01-29 20:39 ` William Lee Irwin III
2002-01-29 20:49 ` Linus Torvalds
2002-01-29 21:01 ` William Lee Irwin III
2002-01-29 9:20 ` Momchil Velikov
2002-01-29 10:27 ` Daniel Phillips
2002-01-29 11:54 ` Helge Hafting
2002-01-29 12:33 ` Daniel Phillips
2002-01-30 9:07 ` Horst von Brand
2002-01-30 10:55 ` Daniel Phillips [this message]
2002-01-30 14:46 ` Rik van Riel
2002-01-30 14:59 ` Daniel Phillips
2002-01-30 15:54 ` Rik van Riel
2002-01-30 16:34 ` Daniel Phillips
2002-01-29 10:59 ` Rik van Riel
2002-01-29 11:28 ` Daniel Phillips
2002-01-29 11:38 ` Rik van Riel
2002-01-29 12:01 ` Daniel Phillips
2002-01-29 16:57 ` Oliver Xymoron
2002-01-29 17:25 ` Rik van Riel
2002-01-29 20:48 ` Daniel Phillips
2002-01-29 21:00 ` Oliver Xymoron
2002-01-29 21:08 ` Linus Torvalds
2002-01-29 21:13 ` Oliver Xymoron
2002-01-29 21:50 ` Linus Torvalds
2002-01-29 22:02 ` Oliver Xymoron
2002-01-29 22:10 ` Linus Torvalds
2002-01-29 22:53 ` Daniel Phillips
2002-01-29 22:53 ` Daniel Phillips
2002-01-29 23:02 ` Oliver Xymoron
2002-01-29 23:21 ` Daniel Phillips
2002-01-28 19:25 ` [reiserfs-dev] " Hans Reiser
2002-01-28 23:52 ` Daniel Phillips
2002-01-29 0:16 ` Hans Reiser
2002-01-29 0:30 ` Alexander Viro
2002-01-29 10:46 ` Hans Reiser
2002-01-29 14:50 ` Chris Mason
2002-01-29 21:10 ` Hans Reiser
2002-01-30 7:11 ` Oliver Xymoron
2002-01-30 9:57 ` Hans Reiser
2002-01-29 17:28 ` Josh MacDonald
2002-01-29 18:44 ` [reiserfs-list] " Andreas Dilger
2002-01-29 19:55 ` Andrew Morton
2002-01-30 7:17 ` Oliver Xymoron
2002-01-30 7:32 ` [reiserfs-list] Re: [reiserfs-dev] Re: Note describing poordcache " Andrew Morton
2002-01-30 7:52 ` Oliver Xymoron
2002-01-30 10:03 ` Hans Reiser
2002-01-30 10:07 ` [reiserfs-dev] Re: Note describing poor dcache " Horst von Brand
2002-01-29 18:29 ` Horst von Brand
2002-01-29 0:51 ` Daniel Phillips
2002-01-29 1:32 ` Daniel Phillips
2002-01-28 22:46 ` Alex Bligh - linux-kernel
2002-01-29 17:27 ` Josh MacDonald
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E16VsPE-0000DZ-00@starship.berlin \
--to=phillips@bonn-fries.net \
--cc=brand@jupiter.cs.uni-dortmund.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®