Change ia64 prefetch to use lfetch.fault
I don't remember whether this has been discussed earlier, won't it make sense to use the fault variant of lfetch for prefetch() and prefetchw()? After all, the caller has high confidence that the cache line will be used in the future.
include/asm-ia64/processor.h renamed from include/asm-ia64/processor.h.orig +2 -2
@@ -682,13 +682,13 @@ ia64_imva (void *addr)static inline void prefetch (const void *x) { -ia64_lfetch (ia64_lfhint_none, x); +ia64_lfetch_fault (ia64_lfhint_none, x); }static inline void prefetchw (const void *x) { -ia64_lfetch_excl (ia64_lfhint_none, x); +ia64_lfetch_fault_excl (ia64_lfhint_none, x); }#define spin_lock_prefetch (x) prefetchw(x)
No, it doesn't --- it actually hurt performance last time I measured it. Basically, Linux uses prefetch() too often with bad/NULL pointers, IIRC. Check my earlier mails where I fixed the IVT code to properly handle lfetch.fault (from a couple of months ago).
--david
Quoted 32 lines · Kenneth W
I don't remember whether this has been discussed earlier, won't it make sense to use the fault variant of lfetch for
prefetch()andprefetchw()? After all, the caller has high confidence that the cache line will be used in the future.Signed-off-by Ken Chen <[email protected]>include/asm-ia64/processor.h 2005-07-28 14:48:17.037721485 -0700 renamed from include/asm-ia64/processor.h.orig 2005-07-28 14:46:26.629519713 -0700 +2
-3@@ -682,13 +682,13 @@ ia64_imva (void *addr) static inline void prefetch (const void *x) { - ia64_lfetch(ia64_lfhint_none, x); + ia64_lfetch_fault(ia64_lfhint_none, x); } static inline void prefetchw (const void *x) { - ia64_lfetch_excl(ia64_lfhint_none, x); + ia64_lfetch_fault_excl(ia64_lfhint_none, x); } #define spin_lock_prefetch(x) prefetchw(x) -To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 3 lines
Mosberger Consulting LLC, voice/fax: 510-744-9372, http://www.mosberger-consulting.com/ 35706 Runckel Lane, Fremont, CA 94536