linux-mips
[Top] [All Lists]

Re: memcpy and prefetch

To: Michael Sundius <msundius@cisco.com>
Subject: Re: memcpy and prefetch
From: David Daney <ddaney@caviumnetworks.com>
Date: Tue, 27 Jan 2009 15:07:45 -0800
Cc: linux-mips@linux-mips.org, "VomLehn, David" <dvomlehn@cisco.com>, msundius@sundius.com
In-reply-to: <497F9214.1000609@cisco.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <497F9214.1000609@cisco.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Thunderbird 2.0.0.19 (X11/20090105)
Michael Sundius wrote:
I know this topic has been written about but so excuse me if I am redundant. I saw lots of talk in the archives but I don't know if a solution was ever arrived
at. so:

what is the current state of the use of prefetch in memcpy()? it seems that
it is #undef-ed if CONFIG_DMA_COHERENT is not turned on.

is this still because the memcpy does not check to prevent a prefetch of
addresses beyond the end of the buffer?

If so, what was the reason a solution was abandoned....

also  has anyone out there written a memcopy that does use prefetch
intelligently (for mips32 that is)?


The Cavium OCTEON port overrides the default memcpy and does use prefetch. It was recently merged (2.6.29-rc2). Look at octeon-memcpy.S

I have thought that memcpy could be generated by mm/page.c as copy_page and clear_page are.

David Daney

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