From: Jamie Lokier <jamie@shareable.org>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: lse-tech@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [RFC,PATCH] use rcu for fasync_lock
Date: Sun, 21 Dec 2003 14:14:56 +0000 [thread overview]
Message-ID: <20031221141456.GI3438@mail.shareable.org> (raw)
In-Reply-To: <3FE594D0.8000807@colorfullife.com>
Manfred Spraul wrote:
> >What about killing fasync_helper altogether and using the method that
> >epoll uses to register "listeners" which send a signal when the poll
> >state of a device changes?
> >
> I think it would be a step in the wrong direction: poll should go away
> from a simple wake-up to an interface that transfers the band info
> (POLL_IN, POLL_OUT, etc). Right now at least two passes over the f_poll
> functions are necessary, because the info which event actually triggered
> is lost. kill_fasync transfers the band info, thus I don't want to
> remove it.
I agree with the principle of the poll wakeup passing the event
information to the wakeup function - that would make select, poll,
epoll _and_ this new version of fsync faster. That may be easier to
implement now than it was in 2.4, because we have wakeup functions,
although it is still a big change and it would be hard to get right in
some drivers. Perhaps very hard.
We have found the performance impact of the extra ->poll calls
negligable with epoll. They're simply not slow calls. It's
only when you're doing select() or poll() of many descriptors
repeatedly that you notice, and that's already poor usage in other
ways.
So I am not convinced that such an invasive change is worthwhile,
particularly as drivers would become more complicated. (Those drivers
which already call kill_fasync have the right logic, assuming there
are no bugs, but many don't and a big ->poll interface change implies they
all have to have it).
> It's a good idea, but requires lots of changes - perhaps it will be
> necessary to change the pollwait and f_poll prototypes.
However, the two changes: fasync -> eventpoll-like waiter, and poll ->
fewer function calls are really quite orthogonal.
The fasync change is best done separately, with no changes to pollwait
and f_poll and virtually no changes to the drivers except to remove
calls to kill_fasync.
I don't think you need to change pollwait or ->poll, because the band
information for the signal is available, as you say, by calling ->poll
after the wakeup.
Put it this way: Davide thought epoll needed special hooks in all the
devices, until I convinced him they weren't needed. He tried it and
not only did all the hooks go away, epoll became simpler and smaller,
it worked with every pollable fd instead of just the ones useful for
web servers, and surprisingly ran a bit faster too.
-- Jamie
next prev parent reply other threads:[~2003-12-21 14:15 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-20 18:20 [RFC,PATCH] use rcu for fasync_lock Manfred Spraul
2003-12-20 21:10 ` [Lse-tech] " Stephen Hemminger
2003-12-20 21:35 ` Manfred Spraul
2003-12-21 11:36 ` Jamie Lokier
2003-12-21 12:40 ` Manfred Spraul
2003-12-21 14:14 ` Jamie Lokier [this message]
2003-12-21 14:59 ` Manfred Spraul
2003-12-21 15:08 ` Jamie Lokier
2004-01-02 21:15 ` Bill Davidsen
2004-01-02 22:41 ` Jamie Lokier
2004-01-03 1:09 ` Mike Fedyk
2004-01-03 21:28 ` Jamie Lokier
2004-01-04 19:01 ` Ingo Oeser
2004-01-04 19:20 ` Davide Libenzi
2004-01-05 21:17 ` Ingo Oeser
2004-01-05 22:24 ` Davide Libenzi
2003-12-21 15:14 ` Davide Libenzi
2003-12-21 15:17 ` Davide Libenzi
2003-12-21 15:28 ` Jamie Lokier
2003-12-21 18:38 ` OGAWA Hirofumi
2003-12-21 19:14 ` Manfred Spraul
2003-12-21 20:51 ` Linus Torvalds
2003-12-21 21:08 ` Manfred Spraul
2003-12-21 21:19 ` Linus Torvalds
2003-12-21 21:54 ` Manfred Spraul
2003-12-21 22:05 ` Linus Torvalds
2003-12-25 1:21 ` Manfred Spraul
2003-12-25 15:11 ` OGAWA Hirofumi
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=20031221141456.GI3438@mail.shareable.org \
--to=jamie@shareable.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lse-tech@lists.sourceforge.net \
--cc=manfred@colorfullife.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