[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Move huge chunks of data in kernel...
I can use memcpy(). I wanted to copy more than few pages,
So I was wondering if we can use mmx/sse since the operands
would be 128/64 bits and there are ways not to pollute the
Cache... Can u give me hints on how this shud be done?
(Is MOVUPD Mem -> Reg followed by MOVUPD Reg -> Mem the
only way? Or is there any better ways of doing this?)
Maybe we can change memcpy() to make use of mmx/sse2 if it is
really worth it?
-----Original Message-----
From: Arjan van de Ven [mailto:arjanv@redhat.com]
Sent: Wednesday, December 10, 2003 11:59 PM
To: Sivasankaran, Vijay
Cc: kernelnewbies@nl.linux.org
Subject: Re: Move huge chunks of data in kernel...
On Thu, 2003-12-11 at 00:18, Sivasankaran, Vijay wrote:
> Hello,
>
> Anyone know how to move move huge chunks of data in x86 kenel?
> I know I can use %esi and %edi as source and destination and
> use ecx to specify the number of bytes. I am wondering if there
> is any better way of doing it using SSE2 (128 bit) registers?
> Imagine we don't have to worry abt context-switching or saving
> registers
why don't you use memcpy() which will be optimized for your platform ? (and
yes it can use mmx/sse2 etc if it is faster (which it btw not really is
unless you use weakly ordered stores, which have the side-effect of clearing
the cache so are not generally a win)
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/