From: Byungchul Park <byungchul.park@lge.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: <mingo@kernel.org>, <linux-kernel@vger.kernel.org>,
<kernel-team@lge.com>
Subject: Re: [PATCH] sched: Wake up all non-exclusive waiters in __wake_up_common()
Date: Tue, 21 Mar 2017 08:13:54 +0900 [thread overview]
Message-ID: <20170320231354.GI11100@X58A-UD3R> (raw)
In-Reply-To: <20170320104147.bqmwsnnzs7tdoepm@hirez.programming.kicks-ass.net>
On Mon, Mar 20, 2017 at 11:41:47AM +0100, Peter Zijlstra wrote:
> On Wed, Mar 08, 2017 at 09:21:52AM +0900, Byungchul Park wrote:
> > __wake_up_common() should wake up all non-exclusive waiters and
> > exclusive waiters as many as nr_exclusive, but currently it does not.
> >
> > Consider a wait queue like the following for example:
> >
> > A(exclusive) -> B(non-exclusive) -> C(non-exclusive)
> >
> > Current code will wake up only A when nr_exclusive = 1, but has to wake
> > up A, B and C. Make it do as we expect.
>
> You have the list oredered the wrong way around. We add exclusive
> waiters to the tail, therefore we'll have woken up all the !exclusive
> waiters before we start decrementing nr_exclusive.
You're right. I proposed the patch because of __add_wait_queue_exclusive(),
which queues an item at the head. But it was my mistake. Sorry.
prev parent reply other threads:[~2017-03-20 23:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-08 0:21 Byungchul Park
2017-03-10 7:00 ` Byungchul Park
2017-03-20 10:41 ` Peter Zijlstra
2017-03-20 23:13 ` Byungchul Park [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=20170320231354.GI11100@X58A-UD3R \
--to=byungchul.park@lge.com \
--cc=kernel-team@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®