lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Jan 26, 2006 at 05:36:07PM -0500, Jon Smirl wrote:
> On 1/26/06, Klaus Ripke <paul-lua@malete.org> wrote:
> 
> > right, but see notes on AIO e.g. in http://www.kegel.com/c10k.html
> 
> That document has not been updated since 2003. It does not reflect the
> current state of Linux 2.6.
It has a bunch of links to quite up to date information.
Anyway, nothing has changed w regard to O_NONBLOCK on seekable files,
and aio has been around on some unixes for ten years.

> Both Apache and Lighttpd use non-blocking IO via sendfile(). I'm
> looking at the source right now. sendfile() in 2.6 definitely works in
> non-blocking mode, I have an strace of it happening.
sendfile has been supporting O_NONBLOCK for years on the socket.
Yet it blocks on the file (for quite good reasons).

> Check out Lighttpd. Lighttd is entirely non-blocking and event driven.
I know. But try serving from a floppy drive.

> Checking the current 2.6 kernel tree, the file systems that implement
> non-blocking IO are: cifs, ext2, ext3, jffs, nfs, ocfs, xfs and pipes.
> Of course the level of implementation varies in the file systems but
> each offers some non-blocking IO.
Only if you count AIO in the broad category of non-blocking IO.
The topic in question here was O_NONBLOCK and select(),
which works entirely different from io_submit()/io_getevents().


regards