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

Davide Libenzi (davidel@xmailserver.org)
Wed, 30 Oct 2002 21:04:31 -0800 (PST)


On Wed, 30 Oct 2002, Martin Waitz wrote:

> On Tue, Oct 29, 2002 at 06:24:27PM -0800, Davide Libenzi wrote:
> > You have two ways to know if "something" changed. You call everyone each
> > time and you ask him if his changed, or you call everyone one time by
> > saying "call me when you're changed".
> well, you don't say 'call me when you're changed' but
> 'i'm interested in your status, please be prepared to report if you
> have changed' when calling epoll_ctl.

Yes, I just don't like to write much :)

> > It's behind the "call me when you're changed" phrase that lays the
> > concept of edge triggered APIs.
> in most situations, you are not really interested in 'has it changed?'
> but in 'what has it changed to?'.
> this is the difference between edge- or level-triggered notification.
>
> e.g. the application wants to know
> 'from which fds can i read without blocking' and not which fds
> happend to change their block-state
> (perhaps there is still data available after the last read, in
> which case the application would like to be notified about this
> situation)

The state of I/O can change only in two way. From I/O space available ( 1 )
to I/O space empty ( 0 ) and reverse. You generate 1->0 transactions and I
guess that ones are not very interesting. You're very much interested in
0->1 transaction indeed, that the kernel generates.

> is it possible that www.xmailserver.org is down atm?
> i couldn't get as much docu about epoll as i wanted to,
> so please correct me if my above view about epoll is incorrect
>
> and yes, i haven't looked at any code yet,
> i just like the kevent docu better then the epoll docu... ;)
> and yes, i would like to port kevent to linux,
> but i don't have any time to do this in the next months... :(

It has always been up for what it may concern. It's a T1 but during these
days it had quite a few hits because of epoll.

- Davide

-
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/