That O(n) behaviour is exactly the problem: as you get more FDs,
poll(2) takes longer and longer. For 250 000 FDs, you're talking
hundreds of milliseconds! That's each time you get activity on a
FD. This is no good for a HTTP server. I'm aiming for << O(n).
> > 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.
>
> open(2) could reasonable be made to work with O_NONBLOCK.
>
> O_NONBLOCK is meaningless for read/write because its not clear what should
> happen and how you would make the code work in practice. I think O_NONBLOCK
> for read/write is asking fro trouble, unless I can think of a sane SAPI for
> it.
How's that? We have non-blocking I/O for reading and writing right now
for ttys, pipes and sockets. The interface is simple and well
understood. How is extending that to regular files a conceptual
problem?
> Followups should probably be off the list.
Erm, still looks on-topic to me (because of the part about
non-blocking I/O for regular files).
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