From: Ingo Molnar <mingo@elte.hu>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Tejun Heo <htejun@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Matthew Wilcox <matthew@wil.cx>,
Miklos Szeredi <miklos@szeredi.hu>,
arjan@linux.intel.com,
Linus Torvalds <torvalds@linux-foundation.org>,
hch@infradead.org, rminnich@sandia.gov, ericvh@gmail.com,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-fsdevel@vger.kernel.org
Subject: Re: poll: allow f_op->poll to sleep, take #3
Date: Sun, 23 Nov 2008 09:59:02 +0100 [thread overview]
Message-ID: <20081123085902.GI30453@elte.hu> (raw)
In-Reply-To: <alpine.DEB.1.10.0811221831550.19456@alien.or.mcafeemobile.com>
* Davide Libenzi <davidel@xmailserver.org> wrote:
> On Sun, 23 Nov 2008, Tejun Heo wrote:
>
> > +static int pollwake(wait_queue_t *wait, unsigned mode, int sync, void *key)
> > +{
> > + struct poll_wqueues *pwq = wait->private;
> > + DECLARE_WAITQUEUE(dummy_wait, pwq->polling_task);
> > +
> > + set_mb(pwq->triggered, 1);
> > +
> > + /* perform the default wake up operation */
> > + return default_wake_function(&dummy_wait, mode, sync, key);
> > +}
>
> Wouldn't it be nicer to un-static try_to_wake_up() (or a wrapper)
> instead of setting up a fake wait queue just to use
> default_wake_function(), just to wake up a task?
the already existing single-task-wakeup shortcut method made available
by the scheduler is wake_up_process(). A number of primitives where
waitqueue overhead is of concern already make use of it.
(mutexes/rtmutexes and more)
if you need a different mode flag, then please extend the
wake_up_process() family of APIs.
Ingo
next prev parent reply other threads:[~2008-11-23 8:59 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-22 8:58 [PATCH fwd] poll: allow f_op->poll to sleep Miklos Szeredi
2008-11-22 9:27 ` Andrew Morton
2008-11-22 12:39 ` Matthew Wilcox
2008-11-22 12:43 ` Tejun Heo
2008-11-22 18:53 ` Andrew Morton
2008-11-23 1:26 ` poll: allow f_op->poll to sleep, take #3 Tejun Heo
2008-11-23 2:35 ` Davide Libenzi
2008-11-23 3:05 ` Tejun Heo
2008-11-23 3:34 ` Brad Boyer
2008-11-23 3:48 ` Tejun Heo
2008-11-23 8:59 ` Ingo Molnar [this message]
2008-11-23 9:14 ` Tejun Heo
2008-11-23 9:34 ` Ingo Molnar
2008-11-23 9:43 ` Tejun Heo
2008-11-23 9:45 ` Ingo Molnar
2008-11-24 4:29 ` Tejun Heo
2008-11-24 4:57 ` Davide Libenzi
2008-11-24 5:05 ` Davide Libenzi
2008-11-24 6:09 ` [PATCH] poll: allow f_op->poll to sleep, take #4 Tejun Heo
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=20081123085902.GI30453@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=arjan@linux.intel.com \
--cc=davidel@xmailserver.org \
--cc=ericvh@gmail.com \
--cc=hch@infradead.org \
--cc=htejun@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=miklos@szeredi.hu \
--cc=rminnich@sandia.gov \
--cc=torvalds@linux-foundation.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.