Re: 2.5.50-BK + 24 CPUs

Manfred Spraul (manfred@colorfullife.com)
Mon, 09 Dec 2002 18:03:10 +0100


David S. Miller wrote:

>On Sun, 2002-12-08 at 13:28, William Lee Irwin III wrote:
>
>
>>Hmm. What happened to that pipe buffer size increase patch? That sounds
>>like it might help here, but only if those things are trying to shove
>>more than 4KB through the pipe at a time.
>>
>>
>
>You probably mean the zero-copy pipe patches, which I think really
>should go in. The most recent version of the diffs I saw didn't
>use the zero copy bits unless the trasnfers were quite large so it
>should be ok and not pessimize small transfers.
>
>That patch has been gathering cobwebs for more than a year now when I
>first did it, let's push this in already :-)
>
>
Unfortunately zero-copy doesn't help to avoid the schedules:
Zero copy just avoid the copy to kernel - you still need one schedule
for each page to be transfered.

writer calls
for(;;){
prepare_data(buf);
write(fd,buf,PAGE_SIZE);
}
reader calls
for(;;) {
read(fd,buf,PAGE_SIZE);
use_data(buf);
}

What's needed is a large kernel buffer - I've seen buffers between 64
and 256 kB in other unices.
zero copy only helps lmbench and other apps where the whole working set
fits into the cpu cache.

The difference between
main-mem->cache;cache->main_mem [non-zerocopy]
and
main-mem->main-mem [zerocopy, the copy to kernel is skipped]
is small.

--
    Manfred

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/