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

From: Dirk Morris
Date: Wed Apr 14 2004 - 15:25:57 EST


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. :)



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/