lkml.org 
[lkml]   [2001]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] zero^H^H^H^Hsingle copy pipe
Date
From: "Ben LaHaise" <bcrl@redhat.com>
>
> 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 :-(
--
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/

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