From: Ingo Molnar <mingo@elte.hu>
To: Tejun Heo <tj@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Al Viro <viro@ZenIV.linux.org.uk>,
hch@infradead.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Eric Van Hensbergen <ericvh@gmail.com>,
Ron Minnich <rminnich@sandia.gov>,
v9fs-developer@lists.sourceforge.net
Subject: Re: [PATCH 1/2] wait: kill is_sync_wait()
Date: Tue, 26 Aug 2008 16:09:00 +0200 [thread overview]
Message-ID: <20080826140900.GA13062@elte.hu> (raw)
In-Reply-To: <48B40BD4.7040004@kernel.org>
* Tejun Heo <tj@kernel.org> wrote:
> is_sync_wait() is used to distinguish between sync and async waits.
> Basically sync waits are the ones initialized with
> init_waitqueue_entry() and async ones with init_waitqueue_func_entry().
> The sync/async distinction is used only in prepare_to_wait[_exclusive]()
> and its only function is to skip setting the current task state if the
> wait is async. This has a few problems.
>
> * No one uses it. None of func_entry users use prepare_to_wait()
> functions, so the code path never gets executed.
>
> * The distinction is bogus. Maybe back when func_entry is used only
> by aio but it's now also used by epoll and in future possibly by 9p
> and poll/select.
>
> * Taking @state as argument and ignoring it silenly depending on how
> @wait is initialized is just a bad error-prone API.
>
> * It prevents func_entry waits from using wait->private for no good
> reason.
>
> This patch kills is_sync_wait() and the associated code paths from
> prepare_to_wait[_exclusive](). As there was no user of these code
> paths, this patch doesn't cause any behavior difference.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
good spotting.
Acked-by: Ingo Molnar <mingo@elte.hu>
Ingo
prev parent reply other threads:[~2008-08-26 14:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-26 13:57 [PATCH 1/2] wait: kill is_sync_wait() Tejun Heo
2008-08-26 13:59 ` [PATCH 2/2] poll: allow f_op->poll to sleep Tejun Heo
2008-08-26 16:58 ` Linus Torvalds
2008-08-26 17:48 ` Tejun Heo
2008-08-26 19:51 ` Christoph Hellwig
2008-08-26 20:22 ` Ingo Molnar
2008-08-26 14:09 ` Ingo Molnar [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=20080826140900.GA13062@elte.hu \
--to=mingo@elte.hu \
--cc=ericvh@gmail.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rminnich@sandia.gov \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=v9fs-developer@lists.sourceforge.net \
--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