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

From: Jeff Moyer
Date: Wed Oct 13 2004 - 09:37:00 EST


==> Regarding Re: [patch rfc] towards supporting O_NONBLOCK on regular files; Pavel Machek <pavel@xxxxxx> adds:

pavel> Hi!
>> 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.

pavel> This looks very nice. Does it mean that aio and friends are
pavel> instantly obsolete?

I dont' think so. This only addresses the read() path, for one. Plus, in
it's current form, it will not perform any I/O if the data is not present.
So, you will need another thread/process to do kick off the I/O.

pavel> Does it have comparable performance to aio?

I haven't run any tests. One advantage this has to current aio is that it
can operate without O_DIRECT.

-Jeff
-
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/