linux-mips
[Top] [All Lists]

Promblem with PREF (prefetching) in memcpy

To: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
Subject: Promblem with PREF (prefetching) in memcpy
From: Carsten Langgaard <carstenl@mips.com>
Date: Fri, 04 Oct 2002 09:50:36 +0200
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
I think we have a problem with the PREF instructions spread out in the
memcpy function.
We are prefetching outside the area we are copying. That's usually not a
problem, but if we are prefetching outside the physical memory area
(with an unmapped kseg address), anything could happen.
We could get a bus error (which we potentially could handle), but even
worse we could have mapped the PCI space immediately following the the
RAM area and then anything could happen.

So I think, we either need to make sure not to prefetch outside a page
boundary or we make sure the last page in physical memory doesn't get
use for unmapped kernel addresses.

Any comments ?

/Carsten



--
_    _ ____  ___   Carsten Langgaard   Mailto:carstenl@mips.com
|\  /|||___)(___   MIPS Denmark        Direct: +45 4486 5527
| \/ |||    ____)  Lautrupvang 4B      Switch: +45 4486 5555
  TECHNOLOGIES     2750 Ballerup       Fax...: +45 4486 5556
                   Denmark             http://www.mips.com




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