lkml.org 
[lkml]   [1999]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] nonempty pipe does not select for write
On Sun, 19 Dec 1999 stano@trillian.eunet.sk wrote:

> The kernel pipe code is actually prepared for changing
> this and differentiates between PIPE_BUF and PIPE_SIZE.
> I am appending a patch against 2.3.33 that allocates
> 2 * PIPE_BUF and allows a poll for write when there
> is at least PIPE_BUF space free. Could someone please
> review it if it makes sense? - it works for me, but
> I am no kernel expert and do not know the exact semantics
> behind kernel poll routines etc.

You've just managed to make the probability of pipe creation failing raise
by a non-trivial amount because you're allocating an order 1 page instead
of order zero. I'd strongly suggest making the pipe buffers remain the
size of 1 page and allocate them dynamically. This goes towards another
pipe optimization that has been suggested: where possible, one could flip
a full page into the reader's address space rather than copying, making
for a substantial gain in pipe bandwidth.

-ben


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

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