Re: [patch rfc] towards supporting O_NONBLOCK on regular files

From: Rik van Riel
Date: Tue Oct 05 2004 - 10:45:22 EST


On Fri, 1 Oct 2004, Jeff Moyer wrote:

> This patch makes an attempt at supporting the O_NONBLOCK flag for
> regular files. It's pretty straight-forward. One limitation is that we
> still call into the readahead code, which I believe can block.
> However, if we don't do this, then an application which only uses
> non-blocking reads may never get it's data.

I like it, though for programs which are real serious about
O_NONBLOCK we might want to hand off readahead to a helper
thread instead of starting readahead in the same context...

Not sure if we would always want this, though ;)

--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan

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