lkml.org 
[lkml]   [2005]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] mm/slab.c : prefetchw the start of new allocated objects
From
From: Eric Dumazet <dada1@cosmosbay.com>
Date: Fri, 29 Jul 2005 11:05:09 +0200

> Some CPU lacks a prefetchw() and currently do nothing, so I ask this
> question : Should'nt make prefetchw() do at least a prefetch() ? A
> read hint is better than nothing.

This is not true, especially on SMP. If the only prefetch variant
available does a "prefetch for read", the cpu will only grab the
cacheline in shared state if other cpus have a dirty copy.

And, as a result, when the write to the cache line occurs yet
another bus transaction will go out in order to get exclusive
access to the cache line on the local cpu. This is extremely
inefficient.

So it's better in this case to make no prefetch, and thus only
incur one bus transaction when the memory access occurs.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-30 21:36    [W:0.068 / U:0.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site