linux-mips
[Top] [All Lists]

Re: Promblem with PREF (prefetching) in memcpy

To: alan@lxorguk.ukuu.org.uk (Alan Cox)
Subject: Re: Promblem with PREF (prefetching) in memcpy
From: Hartvig Ekner <hartvige@mips.com>
Date: Fri, 4 Oct 2002 15:07:02 +0200 (MEST)
Cc: carstenl@mips.com (Carsten Langgaard), dom@algor.co.uk (Dominic Sweetman), ralf@linux-mips.org (Ralf Baechle), linux-mips@linux-mips.org
In-reply-to: <1033736983.31861.26.camel@irongate.swansea.linux.org.uk> from "Alan Cox" at Oct 04, 2002 02:09:43 PM
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Yes, I think that must be the safest solution.

Any kernel routine which uses PREF instructions (but actually also user
space code as Ralf's example pointed out), must guarantee that it does
not issue prefetches to addresses which it is not specifically being
asked to mess around with. 

The other solutions seem too fragile, and will break at some point.

/Hartvig

Alan Cox writes:
> 
> On Fri, 2002-10-04 at 13:35, Carsten Langgaard wrote:
> > That's exactly the problem.
> > The actually loads and stores in memcpy is fine, it's the prefetching that
> > prefetch too much.
> 
> Then fix your prefetching code 8). We had problems with that on x86 too,
> prefetching off the last page into ISA space -> death. Was umm fun to
> debug
> 
> 
> 


-- 
 _    _   _____  ____     Hartvig Ekner        Mailto:hartvige@mips.com
 |\  /| | |____)(____                          Direct: +45 4486 5503
 | \/ | | |     _____)    MIPS Denmark         Switch: +45 4486 5555
T E C H N O L O G I E S   http://www.mips.com  Fax...: +45 4486 5556

<Prev in Thread] Current Thread [Next in Thread>