Re: [beta patch] SSE copy_page() / clear_page()

From: Pavel Machek (pavel@suse.cz)
Date: Tue Feb 20 2001 - 15:52:16 EST


> > > + __asm__ __volatile__(
> > > + "mov %1, %0\n\t"
> > > + : "=r" (i)
> > > + : "r" (kaddr+offset)); /* load tlb entry */
> > > + for(i=0;i<size;i+=64) {
> > > + __asm__ __volatile__(
> > > + "prefetchnta (%1, %0)\n\t"
> > > + "prefetchnta 32(%1, %0)\n\t"
> > > + : /* no output */
> > > + : "r" (i), "r" (kaddr+offset));
> > > + }
> > > + }
> > > left = __copy_to_user(desc->buf, kaddr + offset, size);
> > > kunmap(page);
> >
> > This seems bogus -- you need to handle faults --
> > i.e. __prefetchnta_to_user() ;-).
>
> It wants wrapping nicely. A generic prefetch and prefetchw does help some other
> cases (scheduler for one).
>
> Does the prefetch instruction fault on PIII/PIV then - the K7 one appears not
> to be a source of faults

My fault. I was told that prefetch instructions are always
non-faulting.

                                Pavel

-- 
The best software in life is free (not shareware)!		Pavel
GCM d? s-: !g p?:+ au- a--@ w+ v- C++@ UL+++ L++ N++ E++ W--- M- Y- R+
-
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/



This archive was generated by hypermail 2b29 : Fri Feb 23 2001 - 21:00:23 EST