[lkml]   [2010]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] Remove implicit list prefetches for most cases
On Wed, 2010-09-08 at 10:59 +0200, Andi Kleen wrote:
> From: Andi Kleen <>
> We've had explicit list prefetches in list_for_each and friends
> for quite some time. According to Arjan they were originally
> added for K7 where they were a slight win.
> It's doubtful they help very much today, especially on newer CPUs with
> aggressive prefetching. Most list_for_eachs bodies are quite short and
> the prefetch does not help if it doesn't happen sufficiently in advance
> or when the data is not really cache cold.
> The feedback from CPU designers is that they don't like us using explicit
> prefetches unless there is a very good reason (and list_for_each* alone
> clearly isn't one)
> Also the prefetches cause the list walks to generate bad code,
> increase the number of registers needed.

If prefetch() is generally considered a "Bad Thing", I'm OK with just
removing them from NetLabel; no need to rename and conditionalize. I
put them in the netlbl_af[4,6]list_*() routines because those routines
were modeled after the normal list routines which had prefetches and I
just assumed someone much smarter had found them to be a win.

paul moore
linux @ hp

 \ /
  Last update: 2010-09-08 14:35    [W:0.028 / U:10.372 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site