James Carlson wrote:
Andrew Gallatin writes:
It has been a while since I've had a zero-copy FS to play with.  I can
tell you that with the 10GbE nic I do drivers for, the CPU overhead
drops by 50-60% when you skip the copy on socket writes from userspace
(sendfile vs write) on both opteron and T2000.  This translates to
more than doubling the single stream bandwidth on anemic CPUs (like a
single core on a T2000).

Doing zero-copy from user space to kernel means flipping page table
entries.  When we've looked into this in the recent past, we've[1]
found that the cost of doing this completely dwarfs the cost of
copying the data on fairly modern architectures.

Yes and no.

Our stance is, we won't do VM tricks such as page flip for receive or COW for send because A) they're more expensive on an SMP than just copying the data, and B) the code is dicey support those kinds of tricks. ;) In the new VM it will be up to the top levels to insure the buffer is immutable.

However, I believe on receive you can do zero copy if you have RDMA support, since the buffers can belong to the process address space prior to setup for data receive. On transmit you can use a synchronous sockets API which blocks until the data is transmitted or use a new zero copy aware API such as fast buffers where the application guarantees buffer integrity until the transmit is completed.

- Eric
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to