[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170320104147.bqmwsnnzs7tdoepm@hirez.programming.kicks-ass.net>
Date: Mon, 20 Mar 2017 11:41:47 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Byungchul Park <byungchul.park@....com>
Cc: mingo@...nel.org, linux-kernel@...r.kernel.org, kernel-team@....com
Subject: Re: [PATCH] sched: Wake up all non-exclusive waiters in
__wake_up_common()
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.
Powered by blists - more mailing lists