From: bert hubert <ahu@ds9a.nl>
To: Mark Mielke <mark@mark.mielke.cc>
Cc: Grant Taylor <gtaylor+lkml_cjiia111802@picante.com>,
linux-kernel@vger.kernel.org, davidel@xmailserver.org
Subject: having indistinguishable events halves epoll utility
Date: Tue, 19 Nov 2002 13:33:07 +0100 [thread overview]
Message-ID: <20021119123307.GA7300@outpost.ds9a.nl> (raw)
In-Reply-To: <20021118223214.GC14649@mark.mielke.cc>
On Mon, Nov 18, 2002 at 05:32:14PM -0500, Mark Mielke wrote:
> On Mon, Nov 18, 2002 at 05:04:07PM -0500, Grant Taylor wrote:
> > OTOH, I really hate the "user pointer in struct epollfd" thing...
>
> An opaque field gives me, the event loop designer, freedom. No opaque
> field because a few event loop designers are convinced that it will be
> used as a data pointer, and they believe this to be wrong, is a
> limitation. epoll provides a very efficient alternative to poll. Forcing
If epoll only returns 'bald events' that like electrons are
indistinguishable, userspace will have to do expensive accounting. In fact,
work on MTasker (http://ds9a.nl/mtasker) already necessitated additional
accounting in user space in order to report events back to the right task.
Such double accounting really hurts epoll scalability benefits and means
doing work in the wrong place. It is like we now have kallsyms - the kernel
is well suited to contain that data and do the work. A weaker example is the
in-kernel module loader.
Another solution might be to have the kernel assign an id on epoll_ctl
insert time and store that in the struct. As we are unlikely to have >2^31
events in flight, 32 bits would suffice easily.
But in any case - the cost of preventing 'malicious users' from storing a
single pointer in the kernel is massive amounts of double work. We are in
that case not offering a useful interface.
So from me as an application & library developer, please do the opaque
pointer thing. By the way, Davide, do you think the time is ripe to wrap up
the manpages now? I could finalize them if you want.
Regards,
bert
--
http://www.PowerDNS.com Versatile DNS Software & Services
http://lartc.org Linux Advanced Routing & Traffic Control HOWTO
next prev parent reply other threads:[~2002-11-19 12:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-18 22:04 [rfc] epoll interface change and glibc bits Grant Taylor
2002-11-18 22:32 ` Mark Mielke
2002-11-19 12:33 ` bert hubert [this message]
2002-11-19 17:10 ` having indistinguishable events halves epoll utility Davide Libenzi
2002-11-18 23:07 ` [rfc] epoll interface change and glibc bits 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=20021119123307.GA7300@outpost.ds9a.nl \
--to=ahu@ds9a.nl \
--cc=davidel@xmailserver.org \
--cc=gtaylor+lkml_cjiia111802@picante.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark@mark.mielke.cc \
/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