public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@linux.intel.com>
To: Christoph Lameter <cl@linux.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
Subject: Re: [x86] Fix prefetch instruction
Date: Fri, 05 Aug 2011 14:22:11 -0700	[thread overview]
Message-ID: <4E3C5F03.8090100@linux.intel.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1108051608110.4821@router.home>

On 08/05/2011 02:10 PM, Christoph Lameter wrote:
>>
>> Have you done any performance analysis on this versus the null case?  I
>> know there are some workloads where it helps, but if it hurts as many as
>> it helps...
> 
> No I have not. prefetch IMHO means that the cacheline is fetched early so
> that the cacheline is fully available like any other to the code.
> prefetchnta does fetch the cacheline too but its not treated like the other cacheline but
> preferably thrown out again. Its a "streamfetch" designed for apps that
> scan over large amounts of memory and want to avoid cache pollution.
> 
> This is surprising to the end user as far as I can tell.
> 

Right.  However, Linus has brought up the hypothesis that prefetch might
actually be a net loss on x86, because current x86 processors are
generally doing a good job with prefetching in hardware.  Directed
prefetches can thus be a net minus.

	-hpa

  reply	other threads:[~2011-08-05 21:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-05 16:18 [x86] Fix prefetch instruction Christoph Lameter
2011-08-05 20:13 ` H. Peter Anvin
2011-08-05 21:10   ` Christoph Lameter
2011-08-05 21:22     ` H. Peter Anvin [this message]
2011-08-05 23:32       ` Christoph Lameter
2011-08-05 23:53         ` H. Peter Anvin

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=4E3C5F03.8090100@linux.intel.com \
    --to=hpa@linux.intel.com \
    --cc=ak@linux.intel.com \
    --cc=cl@linux.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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