Re: [patch] nonempty pipe does not select for write

Wakko Warner (kernel@kvack.org)
Sun, 19 Dec 1999 17:51:25 -0500 (EST)


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/