Re: Non-blocking I/O

Richard Gooch (Richard.Gooch@atnf.CSIRO.AU)
Tue, 21 Jul 1998 18:36:52 +1000


Chris Wedgwood writes:
> On Fri, Jul 17, 1998 at 05:10:08PM +1000, Richard Gooch wrote:
>
> > > I don't even know if its worth it, because I think someone (Gooch?) has
> > > already modified glibc2 so that the aio_* calls already do this.
> >
> > Er, I don't think it was me: I haven't modified any glibc2
> > code. Perhaps you're referring to something else I've done/am working
> > on (such as the migrating FDs code)? I've not paid much attention to
> > this thread, so the context is lost on me. Do you have an executive
> > summary? ;-)
>
> - Me bleats that O_NONBLOCK should work on regular files for open(2),
> read(2), and write(2)
>
> I suggest a dynamically sizing set of kernel threads for this because
> I'm too lazy to do it in userspace and have had trouble making it work
> right before
>
> - Alan says, it belongs in user space, and rightly it does, only I can't
> make it work right
>
> - I suggestion someone (you) has already done something along these line
> for glibc2, which I guess must be wrong....

Nope, not me. I'm fiddling with something else: reducing the impact of
select(2) and poll(2) when you have zillions of FDs.

Note that glibc 2.1 has the aio_*() functions, which give you what you
want with reading and writing. Doesn't help with open(2) since the
aio_*() functions need a FD to work. I've often wondered why we can't
have non-blocking I/O with regular files. It doesn't seem like it
would be impossibly hard to implement.

Regards,

Richard....

-
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.altern.org/andrebalsa/doc/lkml-faq.html