[lkml]   [2004]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: epoll reporting events when it hasn't been asked to
Davide Libenzi wrote:

>On Fri, 2 Apr 2004, Ben Mansell wrote:
>>>If an exception occurs (example a socket is disconnected) the socket
>>>should be removed from the fd list. There is really no point in passing
>>>in an excepted fd.
>>Is there any difference, speed-wise, between turning off all events to
>>listen to with EPOLL_MOD, and removing the file descriptor with
>>EPOLL_DEL? I had vaguely assumed that the former would be faster
>>(especially if you might later want to resume listening for events),
>>although that was just a guess.

I'd like to weigh in on this issue as I'm having the same issue as Ben.
My application doesnt consider these to be exceptional events, but
normal expected events, and thus
I need them to be handled like normal events. (I can explain more off
list if you'd like)
So I just want to ignore all events for some time and then deal with any
HUP's or ERR's at the appropriate time.
When I used poll(), I always accomplished this by leaving this fd out of
the poll fd set.
This wasnt a huge hit because I basically had to rebuild the poll fd set
at every iteration anyway as it changes rapidly.

Now I'm switching to epoll, and the great thing about the epoll
interface is I don't have to rebuild the entire fd set at every iteration.
Like Ben, I'd prefer to be able to disable ALL events on a fd descriptor
for some time, instead of removing it entirely.
Since with poll I had to rebuild the set anyway, this 'disable' feature
wasnt really useful, but would be a nice-to-have for epoll.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:02    [W:0.105 / U:13.280 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site