From: Davide Libenzi <davidel@xmailserver.org>
To: Howard Chu <hyc@symas.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: epoll optimizations
Date: Thu, 29 Jan 2009 16:10:14 -0800 (PST) [thread overview]
Message-ID: <alpine.DEB.1.10.0901291606260.16141@alien.or.mcafeemobile.com> (raw)
In-Reply-To: <4981C648.3000108@symas.com>
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
prev parent reply other threads:[~2009-01-30 0:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-07 0:34 [patch 3/3] epoll optimizations and cleanups Davide Libenzi
2009-01-29 15:07 ` epoll optimizations Howard Chu
2009-01-30 0:10 ` Davide Libenzi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.1.10.0901291606260.16141@alien.or.mcafeemobile.com \
--to=davidel@xmailserver.org \
--cc=hyc@symas.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®