Re: epoll reporting events when it hasn't been asked to

Dirk Morris
2004-04-14T20:23:01Z

Jamie Lokier wrote:

>Dirk Morris wrote:
>
>
>>I need them to be handled like normal events. (I can explain more off
>>list if you'd like)
>>
>>
>
>Did you read my explanation of how to do this using the present epoll
>behaviour using _fewer_ syscalls than you are asking for?
>
>
Ah yes, I just went back and read it.
From what I understand you're proposing to remove the fd from the set
lazily instead of immediately.
Which will save system calls in the cases were the HUP/ERR condition
does not occur during the 'disabled' time.

In my case, which you may choose to disregard, this condition is not
irregular or in any way a special case.
So the revision you have proposed is just an optimization.
You could even use this same optimization with the disable feature
(disable it lazily) and get even better performance with the same number
of syscalls you proposed.

I see no downside, except that it no longer conforms to the semantics of
poll and select.
Whether or not its worth it to deviate from this behavior over such a
detail, I don't know. :)