lkml.org 
[lkml]   [1997]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Interesting pentium-memcpy results
Date
> On Tue, 29 Jul 1997, Albert D. Cahalan wrote:
>
>> I think it shows that the memcpy size test is significant.
>> Perhaps the FPU is best used only when explicitly requested
>> for large operations. That would mean page clearing I guess.
>
> if you take a look at the patch, you would see the following code:
>
> +__memcpy_g (void *_to, const void *_from, __kernel_size_t _bytes)
> +{
> + if (bytes >= 1024) {

That is what I meant: the test itself adds overhead.
(the kernel became both slower and faster with the patch)
For small memcpys, that is a problem. It may be better to:

>> big_aligned_memcpy() and big_aligned_clear() perhaps?
>> For 512 bytes and up, optimized for each arch.

Then normal memcpy does not even test for size and
the FPU version does not test for alignment.
On other architectures, some other operation may be used.
In any case, the bulk memcpy does not check for alignment.

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.046 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site