public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Martin J. Bligh" <mbligh@aracnet.com>
To: Andrea Arcangeli <andrea@novell.com>
Cc: Andrew Morton <akpm@osdl.org>, Andrew Morton <akpm@digeo.com>,
	nickpiggin@yahoo.com.au, linux-kernel@vger.kernel.org
Subject: Re: PG_zero
Date: Tue, 02 Nov 2004 17:18:31 -0800	[thread overview]
Message-ID: <253740000.1099444711@flay> (raw)
In-Reply-To: <20041103010952.GA3571@dualathlon.random>

--On Wednesday, November 03, 2004 02:09:52 +0100 Andrea Arcangeli <andrea@novell.com> wrote:

> On Tue, Nov 02, 2004 at 02:41:15PM -0800, Martin J. Bligh wrote:
>> eh? I don't see how that matters at all. After the DMA transfer, all the 
>> cache lines will have to be invalidated in every CPUs cache anyway, so
>> it's guaranteed to be stone-dead zero-degrees-kelvin cold. I don't see how
>> however hot it becomes afterwards is relevant? 
> 
> if the cold page becomes hot, it means the hot pages in the hot
> quicklist will become colder. The cache size is limited, so if something
> becomes hot, something will become cold.

Aaah. OK - I see what you mean. Not sure I agree, but at least I understand
now ;-) will think on that some more, but I'm still not sure it makes any
difference.
 
> The only difference is that the hot pages will become cold during the
> dma if we return an hot page, or the hot pages will become cold while
> the cpu touches the data of the previously cold page, if we return a
> cold page. Or are you worried that the cache snooping is measurable?

Not really, I just don't want to waste hot pages on DMA that we could
be using for something else.

...

> NOTE: I'm not talking about the freeing of cold pages. the freeing of
> cold pages definitely must not free at the head, this way hot
> allocations will keep going fast. But reserving hot pages during cold
> allocations I doubt it's measurable. I wonder if you've any measurement
> that collides with my theory. I could be wrong of course.

Mmmm. probably depends on cache size vs readahead windows, etc. I'm don't
think either of us has any numbers, so we're both postulating ;-)
 
> I can change my patch to reserve hot pages during cold allocations, no
> problem, but I'd really like to have any measurement data before doing
> that, since I feel I'd be wasting some tons of memory on a many-cpu
> lots-of-ram box for a worthless cause.

Why is it tons of memory? Shouldn't be more that cache-size * nr_cpus,
and as long as we fetch from the cold to the hot, it's not really wasted
at all, it's just sitting in the cache. I guess we don't steal from other
cpu's caches (maybe we ought to when we're under very heavy pressure),
but still ... I think it's a marginal amount of memory, not "tons" ;-)

M.


  reply	other threads:[~2004-11-03  1:24 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     ` PG_zero Andrea Arcangeli
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                   ` Martin J. Bligh [this message]
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=253740000.1099444711@flay \
    --to=mbligh@aracnet.com \
    --cc=akpm@digeo.com \
    --cc=akpm@osdl.org \
    --cc=andrea@novell.com \
    --cc=linux-kernel@vger.kernel.org \
    --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