> > BTW, where are the zerocopy patches for pipes? Maybe I'm missing > > something but it seems that pipes inside the kernel are still > > implememented by copying into the kernel and then copying out. > > Whatever method the zerocopy pipes use is probably what I'm looking > > for though. > > Ask DaveM or look through l-k archives for URL of recent variant... I've attached the latest patch. I didn't send it to Linus yet - it isn't really a bug fix, and there are a few open issures: * I still hope that zero-copy (actually single copy) is possible for PIPE_BUF (4096) byte transfers. Unfortunately that would be a user space visible change: void main() { int pipes[2]; pipe(pipes); write(pipes[1],buf,PIPE_BUF); } would block, every other Unix version I tested doesn't block. (or write(,,PIPE_BUF) after poll(POLLOUT) - I'm sure that there are apps where the O_NONBLOCK is missing) But since glibc by default uses 4096 byte writes it would speed up the transfers. * > 64 kB chunks * memory pressure. Not that important for 64 kB transfers, but required for larger buffers. I tested the patch with 2.4.1, and it compiles with 2.4.2-ac11. -- Manfred