[lkml]   [2001]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] zero^H^H^H^Hsingle copy pipe
From: "Ben LaHaise" <>
> Any particular reason for not using davem's single copy kiobuf based
> code?
The main problem is that map_user_kiobuf() locks pages into memory.
It's a bad idea for pipes. Either we must severely limit the maximum
amount of data in the direct-copy buffers, or we must add a swap file
based backing store. If I understand the BSD direct-pipe code correctly
it has a swap file based backing store. I think that's insane. And
limiting the direct copy buffers to a few kB defeats the purpose of
direct copy.
Instead pipe_write just queues (tsk,addr,len), and then pipe_read() uses
a modified access_process_vm() function to copy directly. Currently I've
copied the code from kernel/ptrace.c, but I plan to merge
copy_user_to_user() back into access_process_vm().

And the current pipe_{read,write} are a total mess with nested loops and
gotos. It's possible to create wakeup storms. I rewrote them as well ;-)

But the new code still contains one deadlock :-(

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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