Andi Kleen wrote:
On Thu, Aug 04, 2005 at 11:07:00PM +1000, Nick Piggin wrote:
Is this any good?
The counter argument would be that one might prefetch a
spinlock in the head of a data structure, and expect
the rest of the cacheline to be in cache as well. Though
in that case, maybe prefetch/prefetchw should be used
instead.
Can you describe what the supposed improvement of the patch is?
From include/linux/prefetch.h:
"spin_lock_prefetch(x) - prefectches the spinlock *x for taking"
So this would reduce icache footprint and possibly memory
traffic on UP where taking a spinlock is a noop.
Granted, there aren't many users of spin_lock_prefetch at the
moment.
--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com