Re: [PATCH] Mantaining turnstile aligned to 128 bytes in i386 CPUs

From: Chuck Swiger <cswiger_at_mac.com>
Date: Thu, 18 Jan 2007 14:17:57 -0800
On Jan 18, 2007, at 1:57 PM, Maxim Sobolev wrote:
> Heh, it's so complex, so machine-dependent....

Well, yes.  :)

> That makes me wonder why we still don't have 3 simple to use  
> instructions that do equivalent of memmove(), memcpy() and memset()  
> all in hardware in the best possible way with the respect of block  
> size, alignment, caches, chipset, you-name-it? Virtually every  
> program would benefit from such instructions.

Unfortunately, there are simply different tradeoffs between  
mechanisms for copying depending on whether you want to use or avoid  
using/thrashing the L1/L2 caches, whether the data is cache-aligned,  
and so forth; the CPU can't infer what you want to occur-- you have  
to tell it.  I find it interesting that some of the architectures (PA- 
RISC, SPARC) do allow for simple instructions with cache-control  
hinting:

   http://gcc.gnu.org/projects/prefetch.html

-- 
-Chuck
Received on Thu Jan 18 2007 - 21:17:59 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:04 UTC