From: Andrew Morton <akpm@zip.com.au>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: "David S. Miller" <davem@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: large page patch
Date: Fri, 02 Aug 2002 00:30:08 -0700 [thread overview]
Message-ID: <3D4A3500.F65887D@zip.com.au> (raw)
In-Reply-To: Pine.LNX.4.33.0208012128110.1857-100000@penguin.transmeta.com
Linus Torvalds wrote:
>
> On Thu, 1 Aug 2002, David S. Miller wrote:
> >
> > Of course, if you can actually measure it, that would be
> > interesting. Naive math gives you a guess for the order of
> > magnitude effect, but nothing beats real numbers ;)
> >
> > The SYSV folks actually did have a buddy allocator a long time ago and
> > they did implement lazy coalescing because is supposedly improved
> > performance.
>
> I bet that is mainly because of CPU scalability, and being able to avoid
> touching the buddy lists from multiple CPU's - the same reason _we_ have
> the per-CPU front-ends on various allocators.
>
> I doubt it is because buddy matters past the 4MB mark. I just can't see
> how you can avoid the naive math which says that it should be 1/512th as
> common to coalesce to 4MB as it is to coalesce to 8kB.
Buddy costs tend to be down in the noise compared with the cost
of the zone->lock.
I did a per-cpu pages patch a while back which, when it takes that
lock, grabs 16 pages or frees 16 pages. Anton tested it on the
12-way: http://samba.org/~anton/linux/2.5.9/ blue -> purple
The cost of rmqueue() and __free_pages_ok went from 13% of system
time down to 2%. So that 2% speedup is all that's available by fiddling
with the buddy algorithm (I think). And I bet most of that is still taking
the lock.
Didn't submit the patch because I think a per-cpu page buffer is a bit of
a dopey cop-out. I have patches here which make most of the page-intensive
fastpaths in the kernel stop using single pages and start using 16-page batches.
That will make a 16-page allocation request just a natural thing
to do. But we will need a per-cpu buffer to wring the last drops
out of anonymous pagefaults and generic_file_write(), which do not
lend themselves to gang allocation.
next prev parent reply other threads:[~2002-08-02 7:17 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-02 0:37 large page patch Andrew Morton
2002-08-02 0:37 ` Andrew Morton
2002-08-02 0:43 ` David S. Miller
2002-08-02 0:43 ` David S. Miller
2002-08-02 1:26 ` Andrew Morton
2002-08-02 1:26 ` Andrew Morton
2002-08-02 1:19 ` David S. Miller
2002-08-02 1:19 ` David S. Miller
2002-08-02 3:23 ` Linus Torvalds
2002-08-02 1:55 ` Rik van Riel
2002-08-02 1:55 ` Rik van Riel
2002-08-02 1:50 ` David S. Miller
2002-08-02 1:50 ` David S. Miller
2002-08-02 2:29 ` Gerrit Huizenga
2002-08-02 2:29 ` Gerrit Huizenga
2002-08-02 2:23 ` David S. Miller
2002-08-02 2:23 ` David S. Miller
2002-08-02 2:53 ` Gerrit Huizenga
2002-08-02 2:53 ` Gerrit Huizenga
2002-08-02 5:24 ` David Mosberger
2002-08-02 5:24 ` David Mosberger
2002-08-02 5:20 ` David S. Miller
2002-08-02 5:20 ` David S. Miller
2002-08-02 6:26 ` David Mosberger
2002-08-02 6:26 ` David Mosberger
2002-08-02 6:33 ` Martin J. Bligh
2002-08-02 6:33 ` Martin J. Bligh
2002-08-02 6:44 ` David Mosberger
2002-08-02 6:44 ` David Mosberger
2002-08-02 10:00 ` Marcin Dalecki
2002-08-02 10:00 ` Marcin Dalecki
2002-08-02 7:08 ` Andrew Morton
2002-08-02 7:08 ` Andrew Morton
2002-08-02 7:15 ` William Lee Irwin III
2002-08-02 7:15 ` William Lee Irwin III
2002-08-02 8:20 ` David S. Miller
2002-08-02 8:20 ` David S. Miller
2002-08-02 9:05 ` Ryan Cumming
2002-08-02 9:05 ` Ryan Cumming
2002-08-02 9:06 ` David S. Miller
2002-08-02 9:06 ` David S. Miller
2002-08-02 12:52 ` Rik van Riel
2002-08-02 12:52 ` Rik van Riel
2002-08-02 13:29 ` What does this error mean? "local symbols in discarded section .text.exit" jeff millar
2002-08-02 13:52 ` Jose Luis Domingo Lopez
2002-08-02 22:50 ` jeff millar
2002-08-02 23:04 ` Thunder from the hill
2002-08-02 15:27 ` large page patch David Mosberger
2002-08-02 15:27 ` David Mosberger
2002-08-02 1:09 ` Martin J. Bligh
2002-08-02 1:09 ` Martin J. Bligh
2002-08-02 4:07 ` Linus Torvalds
2002-08-02 4:13 ` David S. Miller
2002-08-02 4:30 ` William Lee Irwin III
2002-08-02 4:32 ` Linus Torvalds
2002-08-02 5:11 ` William Lee Irwin III
2002-08-02 7:30 ` Andrew Morton [this message]
2002-08-02 4:38 ` Martin J. Bligh
2002-08-02 1:36 ` Andrew Morton
2002-08-02 1:36 ` Andrew Morton
2002-08-02 4:31 ` Daniel Phillips
2002-08-02 4:31 ` Daniel Phillips
2002-08-02 4:47 ` Andrew Morton
2002-08-02 4:47 ` Andrew Morton
2002-08-02 3:47 ` William Lee Irwin III
2002-08-02 3:47 ` William Lee Irwin III
2002-08-02 23:40 ` Chris Wedgwood
2002-08-02 23:40 ` Chris Wedgwood
-- strict thread matches above, loose matches on Subject: below --
2002-08-02 1:34 Seth, Rohit
2002-08-02 1:34 ` Seth, Rohit
2002-08-02 19:31 Seth, Rohit
2002-08-02 19:31 ` Seth, Rohit
[not found] <Pine.LNX.4.33.0208012133111.1857-100000@penguin.transmeta.com>
2002-08-06 20:51 ` Hugh Dickins
2002-08-07 0:11 Seth, Rohit
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=3D4A3500.F65887D@zip.com.au \
--to=akpm@zip.com.au \
--cc=davem@redhat.com \
--cc=linux-kernel@vger.kernel.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 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.