[Top] [All Lists]

Re: Promblem with PREF (prefetching) in memcpy

To: "Kevin D. Kissell" <>
Subject: Re: Promblem with PREF (prefetching) in memcpy
From: Alan Cox <>
Date: 04 Oct 2002 14:15:30 +0100
Cc: Carsten Langgaard <>, Dominic Sweetman <>, Ralf Baechle <>,
In-reply-to: <00fe01c26ba6$04943480$10eca8c0@grendel>
Original-recipient: rfc822;
References: <><> <> <> <00fe01c26ba6$04943480$10eca8c0@grendel>
On Fri, 2002-10-04 at 14:00, Kevin D. Kissell wrote:
> The issue isn't that anyone would deliberately use memcpy() in I/O
> space.  Rather, it's that memcpy() prefetches quite a ways ahead,
> and if one has I/O space assigned just after the end of physical
> memory, Bad Things might happen on a perfectly legal memcpy()
> that references the last couple hundred bytes of memory in a 
> way that not even a clever and well-informed bus error handler 
> could undo.

Then your memcpy function is IMHO broken. Fix it to note prefetch beyond
the end of the area you actually will copy and life should be a lot

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