mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@engr.sgi.com>
To: Andi Kleen <ak@muc.de>
Cc: davidm@hpl.hp.com, Christoph Lameter <clameter@sgi.com>,
	Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua>,
	Dave Hansen <haveblue@us.ibm.com>, Andrew Morton <akpm@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Mel Gorman <mel@csn.ul.ie>,
	linux-ia64@vger.kernel.org, Jens.Maurer@gmx.net
Subject: Re: [PATCH] add a clear_pages function to clear pages of higher order
Date: Mon, 28 Mar 2005 17:58:30 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0503281752280.7580@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20050327171220.GA18506@muc.de>

On Sun, 27 Mar 2005, Andi Kleen wrote:

> > Clearly, if the CPU that's clearing the page is likely to use that
> > same page soon after, it'd be useful to use temporal stores.
>
> That is always the case in the current code (without Christophers
> pre cleaning daemon). The page fault handler clears and user space
> is guaranteed to need at least one cacheline from the fresh page
> because it just did a page fault on it. With non temporal stores
> you guarantee at least one hard cache miss directly after
> the return to user space.

It is not the case that *all* the cachelines of a page are going to be
used right after zeroing. For the page fault case it is only guaranteed that
*one* cacheline will be used. In the PTE/PMD/PUD page allocation cases it
is likely that only a single cacheline is used.

There are some cases in the code (apart from the fault handler)
where zeroed pages are allocated with no guarantee of use (f.e. the
allocations for buffers for shared memory or pipes).

> I suspect even with precleaning the average time from cleaning to use will be
> quite short.

If the time is short then hot cleaning is the right way to go and then
prezeroing is of no benefit. Prezeroing can only be of benefit if there is
sufficient time between the zeroing and the use of the data. It must be
sufficiently long to cause the the cachelines to no longer be in
in the caches. Then the loading of these cachelines may be avoided which
yields the performance benefit.

  parent reply	other threads:[~2005-03-29  1:59 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-10 20:35 Christoph Lameter
2005-03-10 21:38 ` Dave Hansen
2005-03-10 22:46   ` Christoph Lameter
2005-03-11  1:03   ` Christoph Lameter
2005-03-11  8:08     ` Denis Vlasenko
2005-03-17  1:33       ` Christoph Lameter
2005-03-18  9:54         ` Denis Vlasenko
2005-03-18 15:00           ` Christoph Lameter
2005-03-18 19:28             ` Andi Kleen
2005-03-18 20:19               ` Christoph Lameter
2005-03-21 15:30               ` Denis Vlasenko
2005-03-24 18:34               ` David Mosberger
2005-03-24 18:41                 ` Christoph Lameter
2005-03-24 19:03                   ` David S. Miller
2005-03-24 22:49                     ` Christoph Lameter
2005-03-24 23:13                       ` David S. Miller
2005-03-25  2:29                       ` David S. Miller
2005-03-25  2:43                         ` Christoph Lameter
2005-03-27 17:12                 ` Andi Kleen
2005-03-27 18:23                   ` David S. Miller
2005-03-29  1:58                   ` Christoph Lameter [this message]
2005-04-06  0:15                 ` Christoph Lameter
2005-04-06  0:23                   ` David Mosberger
2005-04-06  0:33                     ` Christoph Lameter
2005-04-06  4:48                       ` David Mosberger
2005-04-06  5:15                         ` Gerrit Huizenga
2005-04-06 16:03                           ` Grant Grundler
2005-03-18 10:12       ` Andi Kleen

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=Pine.LNX.4.58.0503281752280.7580@schroedinger.engr.sgi.com \
    --to=clameter@engr.sgi.com \
    --cc=Jens.Maurer@gmx.net \
    --cc=ak@muc.de \
    --cc=akpm@osdl.org \
    --cc=clameter@sgi.com \
    --cc=davidm@hpl.hp.com \
    --cc=haveblue@us.ibm.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mel@csn.ul.ie \
    --cc=vda@port.imtp.ilyichevsk.odessa.ua \
    /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

all inboxes | Powered by JetHome®