From: Eric Wong <normalperson@yhbt.net>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Martin Sustrik <sustrik@250bpm.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
Sha Zhengju <handai.szj@taobao.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] eventfd: implementation of EFD_MASK flag
Date: Fri, 8 Feb 2013 22:08:17 +0000 [thread overview]
Message-ID: <20130208220817.GA4256@dcvr.yhbt.net> (raw)
In-Reply-To: <CALCETrXEy5hLh6i7nTGH607gnc=kd0S+of9i0-nt828MGwbQZQ@mail.gmail.com>
Andy Lutomirski <luto@amacapital.net> wrote:
> On Thu, Feb 7, 2013 at 12:11 PM, Martin Sustrik <sustrik@250bpm.com> wrote:
> > On 07/02/13 20:12, Andy Lutomirski wrote:
> >> On 02/06/2013 10:41 PM, Martin Sustrik wrote:
> >>> The value of 'events' should be any combination of event flags as defined
> >>> by
> >>> poll(2) function (POLLIN, POLLOUT, POLLERR, POLLHUP etc.) Specified
> >>> events will
> >>> be signaled when polling (select, poll, epoll) on the eventfd is done
> >>> later on.
> >>> 'ptr' is an opaque pointer that is not interpreted by eventfd object.
> >>
> >> How does this interact with EPOLLET?
> >
> > That's an interesting question. The original eventfd code doesn't do
> > anything specific to either edge or level mode. Neither does my patch.
> >
> > Inspection of the code seems to suggest that edge vs. level distinction is
> > handled elsewhere (ep_send_events_proc) where there is a separate list of
> > ready events and the function, after returning the event, decides whether to
> > leave the event in the list (level) or delete it from the list (edge).
Right, the edge vs. level distinction is internal to epoll.
> Hmm. Having looked at the eventpoll.c source again, I remain
> unconvinced that EPOLLET works the way that any userspace developer
> would expect it to.
As as userspace developer, EPOLLET seems to work as expected/documented;
but I realized EPOLLONESHOT is what I want to be using instead.
> > In any case, review from someone with experience with epoll implementation
> > would help.
I'm no expert, but I don't think eventfd (or any file type) needs to
care about what I/O notification scheme/options it's used with.
next prev parent reply other threads:[~2013-02-08 22:08 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-07 6:41 [PATCH 1/1] eventfd: implementation of EFD_MASK flag Martin Sustrik
2013-02-07 19:12 ` Andy Lutomirski
2013-02-07 20:11 ` Martin Sustrik
2013-02-08 1:03 ` Andy Lutomirski
2013-02-08 5:26 ` Martin Sustrik
2013-02-08 6:36 ` Andy Lutomirski
2013-02-08 6:55 ` Martin Sustrik
2013-02-08 22:08 ` Eric Wong [this message]
2013-02-09 3:26 ` Martin Sustrik
2013-02-07 22:44 ` Andrew Morton
2013-02-07 23:30 ` Martin Sustrik
2013-02-08 12:43 ` Martin Sustrik
2013-02-08 22:21 ` Eric Wong
2013-02-09 2:40 ` Martin Sustrik
2013-02-09 3:54 ` Eric Wong
2013-02-09 7:36 ` Martin Sustrik
2013-02-09 11:51 ` Eric Wong
2013-02-09 12:04 ` Martin Sustrik
-- strict thread matches above, loose matches on Subject: below --
2013-02-07 23:29 Martin Sustrik
2013-02-15 2:45 ` Michał Mirosław
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=20130208220817.GA4256@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=akpm@linux-foundation.org \
--cc=handai.szj@taobao.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=sustrik@250bpm.com \
--cc=viro@zeniv.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).