From: Davide Libenzi <davidel@xmailserver.org>
To: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Unexpected cascaded epoll behavior - my mistake or kernel bug
Date: Mon, 26 Jan 2009 17:03:17 -0800 (PST) [thread overview]
Message-ID: <alpine.DEB.1.10.0901261652150.8049@alien.or.mcafeemobile.com> (raw)
In-Reply-To: <200901270124.40683.pisa@cmp.felk.cvut.cz>
On Tue, 27 Jan 2009, Pavel Pisa wrote:
> Hello Davide,
>
> thanks much for fast testing and patches. I have run different combination
> of the yours and mine tests on 2.6.28.2 patched by your latest fix
> and all have passed.
>
> Excuse me for long code. I have not been fast enough to prepare simpler
> test. I have tried to log straces documenting the problem at least.
> There has been another problem with test reduction, that behavior
> has been timing dependant. Your pipe ping pong test works OK
> on unpatched 2.6.28.2 for some reasons for example. The mine code
> changed behavior according to log level and output redirection.
> My updated version of code does not trigger problem as well. Only that
> archived version has been relatively "reliable" in problem exposing.
The epoll pipe ping-pong only fails in the first version patch I sent you.
It was a bug in the patch. Older kernel, and the ones using the new
version of the patch are fine, WRT that test.
> 1) is the original problem only exposed by epoll over epoll?
> If yes, then I expect, that I can use epoll over poll (glib)
> even on older kernels.
No. Epoll's poll() was broken, that means you could not add the epoll fd
inside any container (poll and select). Well, you can, but you get
spurious wakeups.
> 2) If there could be other scenario to invoke event stuck on unpatched
> kernel, what does exist some operation with epoll set gets event
> reports into sync? I would add it as workaround into library.
Look at how the epoll_test.c program I sent you, does.
> 3) the epoll with level triggered events is most simple as poll replacement,
> but EPOLLONESHOT and EPOLLET could cause less overhead on
> the kernel side. Have you some idea about expected throughput
> change?
It all depends on the application. EPOLLET departs from other event fetch
machanisms, so if you have a generic library, you may want to be careful
in its usage.
- Davide
prev parent reply other threads:[~2009-01-27 1:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-23 0:09 Pavel Pisa
2009-01-23 1:21 ` Davide Libenzi
2009-01-24 21:58 ` Davide Libenzi
2009-01-25 21:02 ` Davide Libenzi
2009-01-26 1:28 ` Pavel Pisa
2009-01-26 19:54 ` Davide Libenzi
2009-01-26 20:36 ` Davide Libenzi
2009-01-26 21:04 ` Davide Libenzi
2009-01-27 0:24 ` Pavel Pisa
2009-01-27 1:03 ` 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.0901261652150.8049@alien.or.mcafeemobile.com \
--to=davidel@xmailserver.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pisa@cmp.felk.cvut.cz \
/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®