Re: [PATCH] 2.5.14 IDE 56

Andi Kleen
2002-05-10T00:33:38Z

Andrew Morton <akpm@zip.com.au> writes:

> For bulk read() and write() I/O the best sized buffer is 8 kbytes. 4k is
> pretty good, too. Anything larger blows the user-side buffer out of L1.
> This is for x86.

Modern x86 support prefetch hints for the CPU to tell it to not
pollute the caches with "streaming data". I bet using them would
be a big win. The rep ; movsl loop used in copy*user isn't
very good on modern x86 anyways (it is ok on PPro, but loses on Athlon
and P4)

I'm (slowly) working on such functions for x86-64, it should be eventually
possible to backport them to i386.

-Andi