lkml.org 
[lkml]   [2004]   [Apr]   [2]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 2 Apr 2004 07:22:31 -0800 (PST)
FromDavide Libenzi <>
SubjectRe: epoll reporting events when it hasn't been asked to
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.

It is faster. OTOH nothing prevent you to use your current method. You 
have only to handle exceptional condition instead of ignoring them. 
Handling by, for example, removing the fd from the epoll set and 
unregistering/freeing the associated data structures. IMO we can leave the 
current behaviour, but if someone sees huge problems with this, the fix is 
a one-liner.



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

\
 
 \ /
  Last update: 2005-03-22 13:02    [from the cache]
©2003-2008