lkml.org 
[lkml]   [2002]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Add generic prefetch xor routines
On Thu, Oct 17, 2002 at 06:01:34PM +0100, Matthew Wilcox wrote:
>
> Both PA-RISC and IA64 benefit from these generic prefetching routines.
> Maybe other CPUs will too.
>
> + do {
> + prefetchw(p1+8);
> + prefetch(p2+8);
> + p1[0] ^= p2[0];
> + p1[1] ^= p2[1];
> + p1[2] ^= p2[2];
> + p1[3] ^= p2[3];
> + p1[4] ^= p2[4];
> + p1[5] ^= p2[5];
> + p1[6] ^= p2[6];
> + p1[7] ^= p2[7];
> + p1 += 8;
> + p2 += 8;
> + } while (--lines > 0);

Won't this prefetch past the end of the buffer ?
Some CPUs have problems with prefetching non-existant areas
of RAM iirc. (Which is why the memcpy routines do a prefetching
loop, and then a non prefetching loop to copy the tail).

Dave

--
| Dave Jones. http://www.codemonkey.org.uk
-
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-03-22 13:30    [W:0.061 / U:4.408 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site