Messages in this thread | | | Subject | Re: Non-blocking read | Date | Tue, 15 Jun 1999 07:25:17 +0200 (MEST) | From | (Rogier Wolff) |
| |
Arjan van de Ven wrote: > Hi, > > I want to do a non-blocking read from a file, from within the kernel. > Is this, at all, possible? I have been tracing how userspace does this, > but the userspace does not seem to be non-blocking either. > > What I'd expect is this: > > * non-blocking read is issued > * if the pages are in the pagecache, they are copied to my buffer > * if they are not, an asynchronous read-ahead is issued and the > read-funtion returns -EAGAIN > > By looking at the code (2.3.6), there seems to be no possibility to do > this. Am I wrong or is it not worth the effort (I might disagree) or just > impossible?
Hi,
Yes, for the user-space issue, it was deemed not worth the effort. Please disagree :-)
You also should make "select" work if you find the time to implement it.
I think you should be able to issue a "read" request, and then not go to sleep if you're in the kernel.
Roger.
-- ** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 ** *-- BitWizard writes Linux device drivers for any device you may have! --* ------ Microsoft SELLS you Windows, Linux GIVES you the whole house ------
- 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/
| |