Hi, On Thu, Feb 08, 2001 at 12:15:13AM +0100, Pavel Machek wrote: > > > EAGAIN is _not_ a valid return value for block devices or for regular > > files. And in fact it _cannot_ be, because select() is defined to always > > return 1 on them - so if a write() were to return EAGAIN, user space would > > have nothing to wait on. Busy waiting is evil. > > So you consider inability to select() on regular files _feature_? Select might make some sort of sense for sequential access to files, and for random access via lseek/read but it makes no sense at all for pread and pwrite where select() has no idea _which_ part of the file the user is going to want to access next. > How do you write high-performance ftp server without threads if select > on regular file always returns "ready"? Select can work if the access is sequential, but async IO is a more general solution. Cheers, Stephen - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
- Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound e... Linus Torvalds
- Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound e... Marcelo Tosatti
- Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound e... Linus Torvalds
- select() returning busy for regular files [was Re: [Kio... Pavel Machek
- Re: select() returning busy for regular files [was Re: ... Ben LaHaise
- Re: select() returning busy for regular files [was Re: ... Linus Torvalds
- Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound e... Ben LaHaise
- Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound e... Marcelo Tosatti
- Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound e... Marcelo Tosatti
- Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound e... Pavel Machek
- Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound e... Stephen C. Tweedie
- Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound e... Marcelo Tosatti
- Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound e... Mikulas Patocka
- Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound e... Marcelo Tosatti
- Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound e... Mikulas Patocka
- Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound e... Marcelo Tosatti
- Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound e... Rik van Riel
- Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound e... James Sutherland
- Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound e... Linus Torvalds
- Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound e... Martin Dalecki
- Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound e... Jens Axboe