Re: and nicer too - Re: [PATCH] epoll more scalable than poll

From: bert hubert (ahu@ds9a.nl)
Date: Mon Oct 28 2002 - 19:53:32 EST


On Mon, Oct 28, 2002 at 04:57:12PM -0800, Davide Libenzi wrote:

> > If that code dares to read immediatly from the fd without having an explicit
> > POLLIN event, which also means that epoll can only be used in this fashion
> > with nonblocking sockets.
>
> The epoll interface has to be used with non-blocking fds. The EAGAIN

Ok, so that is two things that need to be in the manpage and probably in
bold:

        1) epoll only works on pipes and sockets
              (not on tty, not on files)

        2) epoll must be used on non-blocking sockets only
              (and describe the race that happens otherwise)

If you send me the source of your manpages I'll work it in if you want.

I still vote for checking at insert time however unless that is too
expensive. Yes, we want people to read the manpages and heed them, but we
also not want to create interfaces that are needlessly errorprone.

Regards,

bert

-- 
http://www.PowerDNS.com          Versatile DNS Software & Services
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Oct 31 2002 - 22:00:40 EST