public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@novell.com>
To: "Martin J. Bligh" <mbligh@aracnet.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: PG_zero
Date: Mon, 1 Nov 2004 23:34:19 +0100	[thread overview]
Message-ID: <20041101223419.GG3571@dualathlon.random> (raw)
In-Reply-To: <161650000.1099332236@flay>

On Mon, Nov 01, 2004 at 10:03:56AM -0800, Martin J. Bligh wrote:
> [..] it was to stop cold
> allocations from eating into hot pages [..]

exactly, and I believe that hurts. bouncing on the global lock is going to
hurt more than preserving an hot page (at least on a 512-way). Plus the
cold page may very soon become hot too.

Plus you should at least allow an hot allocation to eat into the cold
pages (which didn't happen IIRC).

I simply believe using the lru ordering is a more efficient way to
implement hot/cold behaviour and it will save some minor ram too (with
big lists the reservation might even confuse the oom conditions, if the
allocation is hot, but the VM frees in the cold "stopped" list). I know
the cold list was a lot smaller so this is probably only a theoretical
issue.

> Yeah, we got bugger-all benefit out of it. The only think it might do
> is lower the latency on inital load-spikes, but basically you end up
> paying the cache fetch cost twice. But ... numbers rule - if you can come
> up with something that helps a real macro benchmark, I'll eat my non-existant
> hat ;-)

I've no idea if it will help... I only knows it helps the micro ;), but I
don't measure any slowdown.

Note that my PG_zero will boost 200% the micro benchmark even without
the idle zeroing enabled, if a big app quits all ptes will go in PG_zero
quicklist and the next 2M allocation of anonymous memory won't require
clearing. That has no downside at all. That's not something that can be
achieved with slab, plus slab wastes ram as well and it has more
overhead than PG_zero.

  reply	other threads:[~2004-11-02  5:13 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-30 14:10 PG_zero Andrea Arcangeli
2004-10-30 21:07 ` PG_zero Andrew Morton
2004-10-30 22:45   ` PG_zero Andrea Arcangeli
2004-10-31 15:35     ` PG_zero Martin J. Bligh
2004-11-01 21:57       ` PG_zero Andrea Arcangeli
2004-11-01 22:05         ` PG_zero Martin J. Bligh
2004-11-02  3:41         ` PG_zero William Lee Irwin III
2004-10-31 15:17   ` PG_zero Martin J. Bligh
2004-11-02 13:53     ` PG_zero Andy Whitcroft
2004-11-02 19:39       ` PG_zero Andrea Arcangeli
2004-11-01 17:26 ` PG_zero Nick Piggin
2004-11-01 18:03   ` PG_zero Martin J. Bligh
2004-11-01 22:34     ` Andrea Arcangeli [this message]
2004-11-01 23:47       ` PG_zero Martin J. Bligh
2004-11-02  1:47       ` PG_zero Nick Piggin
2004-11-02  2:21       ` PG_zero Andrea Arcangeli
2004-11-02  2:54         ` PG_zero Nick Piggin
2004-11-02 15:42         ` PG_zero Martin J. Bligh
2004-11-02 19:50           ` PG_zero Andrea Arcangeli
2004-11-02 22:41             ` PG_zero Martin J. Bligh
2004-11-03  1:26               ` PG_zero Andrea Arcangeli
2004-11-02 21:09           ` PG_zero Andrew Morton
2004-11-02 21:56             ` PG_zero Andrea Arcangeli
2004-11-02 22:41               ` PG_zero Martin J. Bligh
2004-11-03  1:09                 ` PG_zero Andrea Arcangeli
2004-11-03  1:18                   ` PG_zero Martin J. Bligh
2004-11-03  1:23                   ` PG_zero Nick Piggin
2004-11-03  2:05                     ` PG_zero Andrea Arcangeli
2004-11-03 11:53                       ` PG_zero Andrea Arcangeli
2004-11-03 12:10       ` PG_zero Pavel Machek
2004-11-01 22:24   ` PG_zero Andrea Arcangeli

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=20041101223419.GG3571@dualathlon.random \
    --to=andrea@novell.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@aracnet.com \
    --cc=nickpiggin@yahoo.com.au \
    /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