Messages in this thread |  | | Date | Thu, 8 Feb 2001 13:22:18 +0000 | From | "Stephen C. Tweedie" <> | Subject | Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait |
| |
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 majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |