Re: epoll (was Re: [PATCH] async poll for 2.5)

From: John Myers (jgmyers@netscape.com)
Date: Fri Oct 18 2002 - 19:55:21 EST


Davide Libenzi wrote:

>No, the concept of edge triggered APIs is that you have to use the fd
>until EAGAIN.
>
Which my code does, given the postulate.

>It's a very simple concept. That means that after a
>connect()/accept() you have to start using the fd because I/O space might
>be available for read()/write(). Dropping an event is an attempt of using
>the API like poll() & Co., where after an fd born, it is put inside the
>set to be later wake up. You're basically saying "the kernel should drop an
>event at creation time" and I'm saying that, to keep the API usage
>consistent to "use the fd until EAGAIN", you have to use the fd as soon as
>it'll become available.
>
Here's where your argument is inconsistent with the Linux philosophy.

Linux has a strong philosophy of practicality. The goal of Linux is to
do useful things, including provide applications with the semantics they
need to do useful things. The criteria for deciding what goes into
Linux is heavily weighted towards what works best in practice.

Whether or not some API matches someone's Platonic ideal of of an OS
interface is not a criterion. In Linux, APIs are judged by their
practical merits. This is why Linux does not have such things as
message passing and separate address spaces for drivers.

So whether or not a proposed set of epoll semantics is consistent with
your Platonic ideal of "use the fd until EAGAIN" is simply not an issue.
 What matters is what works best in practice.

-
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 : Wed Oct 23 2002 - 22:00:45 EST