Re: Non-blocking read

Marc Lehmann (pcg@goof.com)
Wed, 16 Jun 1999 00:17:05 +0200


On Tue, Jun 15, 1999 at 09:32:13AM +0200, Arjan van de Ven wrote:
> > this added complication of second level indirection coming from the
> > inode.
>
> When I (= the application) ask for a non-blocking read, I don't mind getting
> a -EAGAIN if the data is _not_ available right now. As long as it will be
> available sometime in the future, it is ok since I will ask again...

I think there is a mix of concept. In general, non-blocking != async. reads.
In tcp and over pipes (where non-blocking reads are mosrt often used), a
non-blocking read returning EAGAIN does _not_ do anything to ensure that
data will arrive later, and I think this fits nice into the description.

If you want asynchroneous I/O in userspace (and thats what I'm talking
about) than you should use the aio-functions and, yes, optimize them.

--
-----==- |
----==-- _ |
---==---(_)__ __ ____ __ Marc Lehmann +--
--==---/ / _ \/ // /\ \/ / pcg@goof.com |e|
-=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE --+
The choice of a GNU generation |
|

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