lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 29 Jan 2009 16:10:14 -0800 (PST)
From:	Davide Libenzi <davidel@...ilserver.org>
To:	Howard Chu <hyc@...as.com>
cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: epoll optimizations

On Thu, 29 Jan 2009, Howard Chu wrote:

> Something I tripped over recently, that might be nice to change... HANGUP
> events are always reported, and apparently can't be turned off. In
> level-triggered mode, if your event loop treats Hangups as lower priority than
> read/write events, an outstanding Hangup will continue to be signaled every
> time you call epoll_wait() until it's finally disposed of. It would be nice if
> Hangups were always oneshot events, regardless of whether the FD was
> configured level, edge, or oneshot. Certainly we know that the *cause* of a
> Hangup can only happen once on any descriptor, so it makes no sense for it to
> be reported more than once.

Since epoll does not have the concept of priority, that means that you 
have to scan the whole array of returned events anyway. It is sufficient 
that when you notice a POLLHUP, you do a quick handling with a simple 
epoll_ctl(DEL), append the fd to a lazy-handling queue, and take care of 
it when time comes.



- Davide


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ