[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87mtofehps.ffs@tglx>
Date: Tue, 14 Sep 2021 09:31:27 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Peter Zijlstra <peterz@...radead.org>, boqun.feng@...il.com
Cc: linux-kernel@...r.kernel.org, peterz@...radead.org,
Ingo Molnar <mingo@...nel.org>,
Juri Lelli <juri.lelli@...hat.com>,
Steven Rostedt <rostedt@...dmis.org>,
Davidlohr Bueso <dave@...olabs.net>,
Will Deacon <will@...nel.org>,
Waiman Long <longman@...hat.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Mike Galbraith <efault@....de>,
Daniel Bristot de Oliveira <bristot@...hat.com>
Subject: Re: [PATCH 2/4] locking/rwbase: Properly match set_and_save_state()
to restore_state()
On Thu, Sep 09 2021 at 12:59, Peter Zijlstra wrote:
> Noticed while looking at the readers race.
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> ---
> kernel/locking/rwbase_rt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/kernel/locking/rwbase_rt.c
> +++ b/kernel/locking/rwbase_rt.c
> @@ -220,7 +220,7 @@ static int __sched rwbase_write_lock(str
> for (; atomic_read(&rwb->readers);) {
> /* Optimized out for rwlocks */
> if (rwbase_signal_pending_state(state, current)) {
> - __set_current_state(TASK_RUNNING);
> + rwbase_restore_current_state();
Right, that's functionally equivalent and makes the code more consistent.
Reviewed-by: Thomas Gleixner <tglx@...utronix.de>
Powered by blists - more mailing lists