lkml.org 
[lkml]   [2011]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [x86] Fix prefetch instruction
On 08/05/2011 04:32 PM, Christoph Lameter wrote:
>>
>> 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.
>
> This kinid of prefetch is a minus because the cache is evicted early. It
> was prefetched with a special hint so its likely very important. That does
> not seem to be very consistent and may cause regressions. Changing it to a
> full prefetch would make the important cacheline stay longer in the cache.
>

The argument applies not just to NTA prefetches, though. There is a
pipeline cost to performing the software prefetch action, it can cause
evictions if the data is not used, and it can increase TLB pressure.

As such, it would be very interesting to know if prefetch0 or nothing is
the better; agree we shouldn't nta here.

-hpa




\
 
 \ /
  Last update: 2011-08-06 01:57    [W:0.100 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site