linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: Dave McCracken <dmccr@us.ibm.com>
Cc: linux-mm@kvack.org
Subject: Re: shared pagetable benchmarking
Date: Mon, 23 Dec 2002 15:54:25 -0800	[thread overview]
Message-ID: <3E07A231.5E4B3015@digeo.com> (raw)
In-Reply-To: <45600000.1040660127@baldur.austin.ibm.com>

Dave McCracken wrote:
> 
> --On Friday, December 20, 2002 11:59:12 -0800 Andrew Morton
> <akpm@digeo.com> wrote:
> 
> > So changing userspace to place its writeable memory on a new 4M boundary
> > would be a big win?
> >
> > It's years since I played with elf, but I think this is feasible.  Change
> > the linker and just wait for it to propagate.
> 
> Actually it'd require changes to both the linker and the kernel memory
> range allocator.  Right now ld.so maps all memory needed for an entire
> shared library, then uses mprotect and MAP_FIXED to modify parts of it to
> be writable (or at least that's what I see using strace).  If it was done
> using separate mmap calls we could redirect the writable regions to be in a
> different pmd.

Yup.

Over the weekend I got all this going.  With binutils patches from HJ,
a kernel patch from Bill and tons of rebuilding things I had everything
in /proc/pid/maps on a separate 4M segment.

I also fixed run-child-first-on-fork.

Summary:

		2.4.20		2.5-shpte	2.5-shpte+weekend_hacks

aim9 fork_test	1950		1300		1700
aim9 exec_test	700		545		572
patch-scripts	16.5		19.5		18.5


The fork test isn't very interesting.  When you toss in an exec(),
the benefits are small.


It appears that Linus's only interest in shared pagetables is that
it could reclaim the fork/exec overhead which the reverse mapping
introduced.  As far as I can tell he is not concerned about space
consumption issues.

And if that is the selection criterion, I do not believe that these
speedups are sufficient to warrant a merge.

> >> Let's also not lose sight of what I consider the primary goal of shared
> >> page tables, which is to greatly reduce the page table memory overhead of
> >> massively shared large regions.
> >
> > Well yes.  But this is optimising the (extremely) uncommon case while
> > penalising the (very) common one.
> 
> I guess I don't see wasting extra pte pages on duplicated mappings of
> shared memory as extremely uncommon.  Granted, it's not that significant
> for small applications, but it can make a machine unusable with some large
> applications.  I think being able to run applications that couldn't run
> before to be worth some consideration.
> 
> I also have a couple of ideas for ways to eliminate the penalty for small
> tasks.  Would you grant that it's a worthwhile effort if the penalty for
> small applications was zero?
> 

It's not my call, David.  I've been putting myself in the role of
helping to get the code working and tested, and providing Linus
with whatever info can help him make a decision.  I guess he works
by observing what people are talking about, asking about and hurting
over on the mailing lists.  As well as his own experience.  And the
issue of pagetable consumption just doesn't have any visibility.

I expect his position would be that it's a specialised, rare problem
and that the fix is more appropriate to a specialised vendor kernel.

I suggest that you discuss it with him.  If that ends up being thumbs-down
I can continue to maintain the patch across 2.6.x.
--
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/

  reply	other threads:[~2002-12-23 23:54 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 [this message]
2002-12-27  9:39       ` Daniel Phillips
2002-12-27  9:58         ` Andrew Morton
2002-12-27 15:59           ` Daniel Phillips
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=3E07A231.5E4B3015@digeo.com \
    --to=akpm@digeo.com \
    --cc=dmccr@us.ibm.com \
    --cc=linux-mm@kvack.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