From: Robert Hancock <hancockr@shaw.ca>
To: ppak_98@yahoo.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: unexpected extra pollout events from epoll
Date: Sun, 26 Oct 2008 10:43:02 -0600 [thread overview]
Message-ID: <49049E16.1090802@shaw.ca> (raw)
In-Reply-To: <fa.YTdIGxaBsWvyaUnxBGIS1f8F2BM@ifi.uio.no>
Paul P wrote:
> I am programming a server using the epoll interface and have the receive portion of the server working fine, but for some reason as I implement the send portion, I noticed a few things that seem like strange behaviors in the implementation of epoll in the kernel.
>
> I'm running Opensuse 11 and it has a 2.6.25 kernel.
>
> The behavior that I can seeing is when I do a full read on an edge triggered fd, for some reason, it seems to be triggering an epollout event after each loop of the read events on a socket. (before I've done any writes at all to the socket)
>
> This is very strange behavior as I would expect that the epollout event would only be triggered if I did a write and the socket recieved an ack which cleared out the send buffer.
>
> The documentation on epollout is really sparse, so any help at all from the list would be very much appreciated. Do I need to manually arm the epollout flag after a write? I thought this was only necessary for level triggered epoll.
>
> I was hoping someone more knowledgeable on the subject here might be able to help explain the epollout behavior and whether or not the extra events are normal and if so, what is the traditional way to handle these extra events in an edge triggered scenario.
I'm not too familiar with the edge triggered mode, but you shouldn't be
requesting EPOLLOUT notifications if you don't care about them (i.e. if
you are not trying to write anything).
next parent reply other threads:[~2008-10-26 16:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <fa.YTdIGxaBsWvyaUnxBGIS1f8F2BM@ifi.uio.no>
2008-10-26 16:43 ` Robert Hancock [this message]
[not found] <fa.iE6LeMsZ2b+Y7nnAUJEFSvwEiiU@ifi.uio.no>
[not found] ` <fa.KeDEgbYh8k5LzzH6uv7u00N5twU@ifi.uio.no>
2008-10-27 5:59 ` unexpected extra pollout events from epoll Robert Hancock
2008-10-27 0:58 Paul P
2008-10-27 1:18 ` Davide Libenzi
2008-10-27 1:23 ` Davide Libenzi
2008-10-27 3:48 ` Paul P
-- strict thread matches above, loose matches on Subject: below --
2008-10-26 14:42 Paul P
2008-10-26 22:07 ` Davide Libenzi
2008-10-26 22:48 ` Paul P
2008-10-26 23:12 ` Davide Libenzi
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=49049E16.1090802@shaw.ca \
--to=hancockr@shaw.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=ppak_98@yahoo.com \
/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