From: Daniel Phillips <phillips@arcor.de>
To: Andrew Morton <akpm@digeo.com>, Daniel Phillips <phillips@arcor.de>
Cc: Dave McCracken <dmccr@us.ibm.com>,
linux-mm@kvack.org, Linus Torvalds <torvalds@transmeta.com>
Subject: Re: shared pagetable benchmarking
Date: Fri, 27 Dec 2002 16:59:09 +0100 [thread overview]
Message-ID: <E18RwtV-0001up-00@starship> (raw)
In-Reply-To: <3E0C2462.ADF727C7@digeo.com>
Hi Andrew,
On Friday 27 December 2002 10:58, Andrew Morton wrote:
> > A feature of my original demonstration patch was that I could
> > enable/disable sharing with a per-fork granularity. This is a good
> > thing. You can use this by detecting the case you can't optimize, i.e.,
> > forking from bash, and essentially using the old code. The sawoff for
> > improved efficiency comes in somewhere over 4 meg worth of shared memory,
> > which just doesn't happen in fork+exec from bash. Then there is
> > always-unshare situation with the stack, which I'm sure you're aware of,
> > where it's never worth doing the share.
>
> Yes, Dave did a prototype of that, and I am sure that it will pull back
> the small additional cost of pagetable sharing in those cases.
>
> But that's not the problem. The problem is that it doesn't *speed up*
> that case. Which appears to be the only thing which interests Linus
> in shared pagetables at this time: he "_hate_"s the fact that fork/exec
> got slower.
Did you ask Linus? To my thinking, if it breaks even on small forks and wins
on the big forks that are bothering the database people etc (and aren't we
all database people in the end) it's a clear win.
> > That said, was not Ingo working on a replacement for fork+exec that
> > doesn't do the useless fork? Would this not make the vast majority of
> > impossible-to-optimize cases go away?
>
> That's news to me.
>
> posix_spawn() has been suggested by Ulrich, and he says that things like
> bash could easily be converted.
Yes, that's the reference. I somehow got Ingo mixed in there because they
were doing the thread cleanups together at the time, which quite possibly
inspired that rather badly needed improvement.
> I don't how much it would gain - possibly not a huge amount; the rmap
> setup in exec seems to be where the major cost lies. Plus there's still
> exit().
What you'd lose is the useless setup/teardown of three page table pages every
fork+exec, a good thing regardless of page table sharing, but especially
convenient for sharing, as it carves away a good percentage of the
non-improved cases, allowing the improved ones to stand out more.
Anyway, I'll bow out of the rmap-optimizing game until next cycle. There are
still some nice optimizations that can be done, but what's the hurry? There
is plenty of longstanding kernel badness that dwarves this in importance
(knfsd comes to mind). I am just glad that rmap has stuck, as I am very
happy to trade a few percentage points of speed in some applications that
suck by design, in return for a VM that actually gives BSD a run for its
money in terms of stability.
I guess that if pte sharing doesn't make it into Linus's tree then Redhat
will be only too pleased to make it part of Advanced Server, as there are a
couple of ridiculously big tech companies I could name that need it so badly
it hurts.
Regards,
Daniel
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
next prev parent reply other threads:[~2002-12-27 15:59 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-20 11:11 Andrew Morton
2002-12-20 11:13 ` William Lee Irwin III
2002-12-20 16:30 ` Dave McCracken
2002-12-20 19:59 ` Andrew Morton
2002-12-23 16:15 ` Dave McCracken
2002-12-23 23:54 ` Andrew Morton
2002-12-27 9:39 ` Daniel Phillips
2002-12-27 9:58 ` Andrew Morton
2002-12-27 15:59 ` Daniel Phillips [this message]
2002-12-27 20:02 ` Linus Torvalds
2002-12-27 20:16 ` Dave McCracken
2002-12-27 20:18 ` Linus Torvalds
2002-12-27 20:45 ` Dave McCracken
2002-12-27 20:50 ` Linus Torvalds
2002-12-27 23:56 ` Daniel Phillips
2002-12-28 0:45 ` Martin J. Bligh
2002-12-28 2:34 ` Andrew Morton
2002-12-28 3:10 ` Linus Torvalds
2002-12-28 6:58 ` Andrew Morton
2002-12-28 7:39 ` Ingo Molnar
2002-12-28 7:47 ` Linus Torvalds
2002-12-28 23:28 ` Andrew Morton
2002-12-28 3:19 ` Martin J. Bligh
2002-12-23 18:19 ` Dave McCracken
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=E18RwtV-0001up-00@starship \
--to=phillips@arcor.de \
--cc=akpm@digeo.com \
--cc=dmccr@us.ibm.com \
--cc=linux-mm@kvack.org \
--cc=torvalds@transmeta.com \
/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