From: David Gibson <david@gibson.dropbear.id.au>
To: Andrew Morton <akpm@osdl.org>
Cc: James Cloos <cloos@jhcloos.com>, linux-kernel@vger.kernel.org
Subject: Re: MAP_SHARED bizarrely slow
Date: Wed, 27 Oct 2004 18:20:03 +1000 [thread overview]
Message-ID: <20041027082003.GL1676@zax> (raw)
In-Reply-To: <20041027010659.15ec7e90.akpm@osdl.org>
On Wed, Oct 27, 2004 at 01:06:59AM -0700, Andrew Morton wrote:
> James Cloos <cloos@jhcloos.com> wrote:
> >
> > >>>>> "David" == David Gibson <david@gibson.dropbear.id.au> writes:
> >
> > David> http://www.ozlabs.org/people/dgibson/maptest.tar.gz
> >
> > David> On a number of machines I've tested - both ppc64 and x86 - the
> > David> SHARED version is consistently and significantly (50-100%)
> > David> slower than the PRIVATE version.
> >
> > Just gave it a test on my laptop and server. Both are p3. The
> > laptop is under heavier mem pressure; the server has just under
> > a gig with most free/cache/buff. Laptop is still running 2.6.7
> > whereas the server is bk as of 2004-10-24.
> >
> > Buth took about 11 seconds for the private and around 30 seconds
> > for the shared tests.
> >
>
> I get the exact opposite, on a P4:
>
> vmm:/home/akpm/maptest> time ./mm-sharemmap
> ./mm-sharemmap 10.81s user 0.05s system 100% cpu 10.855 total
> vmm:/home/akpm/maptest> time ./mm-sharemmap
> ./mm-sharemmap 11.04s user 0.05s system 100% cpu 11.086 total
> vmm:/home/akpm/maptest> time ./mm-privmmap
> ./mm-privmmap 26.91s user 0.02s system 100% cpu 26.903 total
> vmm:/home/akpm/maptest> time ./mm-privmmap
> ./mm-privmmap 26.89s user 0.02s system 100% cpu 26.894 total
> vmm:/home/akpm/maptest> uname -a
> Linux vmm 2.6.10-rc1-mm1 #14 SMP Tue Oct 26 23:23:23 PDT 2004 i686 i686 i386 GNU/Linux
How very odd. I've now understood what was happening (see other
post), but I'm not sure what could reverse the situation. Can you
download the test tarball again - I've put up an updated version which
pretouches the pages and gives some extra info. Running it both with
and without pretouch would be interesting (#if 0/1 in matmul.h to
change).
> It's all user time so I can think of no reason apart from physical page
> allocation order causing additional TLB reloads in one case. One is using
> anonymous pages and the other is using shmem-backed pages, although I can't
> think why that would make a difference.
>
>
> Let's back out the no-buddy-bitmap patches:
>
> vmm:/home/akpm/maptest> time ./mm-sharemmap
> ./mm-sharemmap 12.01s user 0.06s system 99% cpu 12.087 total
> vmm:/home/akpm/maptest> time ./mm-sharemmap
> ./mm-sharemmap 12.56s user 0.05s system 100% cpu 12.607 total
> vmm:/home/akpm/maptest> time ./mm-privmmap
> ./mm-privmmap 26.74s user 0.03s system 99% cpu 26.776 total
> vmm:/home/akpm/maptest> time ./mm-privmmap
> ./mm-privmmap 26.66s user 0.02s system 100% cpu 26.674 total
>
> much the same.
>
> Backing out "[PATCH] tweak the buddy allocator for better I/O merging" from
> June 24 makes no difference.
>
--
David Gibson | For every complex problem there is a
david AT gibson.dropbear.id.au | solution which is simple, neat and
| wrong.
http://www.ozlabs.org/people/dgibson
next prev parent reply other threads:[~2004-10-27 8:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-27 6:45 MAP_SHARED bizarrely slow David Gibson
2004-10-27 7:23 ` James Cloos
2004-10-27 7:59 ` David Gibson
2004-10-28 4:38 ` Ian Wienand
2004-10-27 8:06 ` Andrew Morton
2004-10-27 8:20 ` David Gibson [this message]
2004-10-27 8:30 ` James Cloos
2004-10-27 20:54 ` Bill Davidsen
2004-10-28 1:16 ` David Gibson
2004-10-28 5:54 ` dean gaudet
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=20041027082003.GL1676@zax \
--to=david@gibson.dropbear.id.au \
--cc=akpm@osdl.org \
--cc=cloos@jhcloos.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.