[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <df14f805-b4b5-9cc8-dd71-9d07c79ca15d@oracle.com>
Date: Wed, 27 Apr 2022 19:32:24 -0500
From: John Donnelly <john.p.donnelly@...cle.com>
To: Waiman Long <longman@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
Boqun Feng <boqun.feng@...il.com>
Cc: linux-kernel@...r.kernel.org, Hillf Danton <hdanton@...a.com>
Subject: Re: [PATCH] locking/rwsem: Allow slowpath writer to ignore handoff
bit if not set by first waiter
On 4/27/22 18:56, Waiman Long wrote:
> On 4/27/22 19:16, John Donnelly wrote:
>> On 4/27/22 12:31 PM, Waiman Long wrote:
>>> With commit d257cc8cb8d5 ("locking/rwsem: Make handoff bit handling more
>>> consistent"), the writer that sets the handoff bit can be interrupted
>>> out without clearing the bit if the wait queue isn't empty. This
>>> disables
>>> reader and writer optimistic lock spinning and stealing.
>>>
>>> Now if a non-first writer in the queue is somehow woken up or first
>>> entering the waiting loop, it can't acquire the lock. This is not
>>> the case before that commit as the writer that set the handoff bit
>>> will clear it when exiting out via the out_nolock path. This is less
>>> efficient as the busy rwsem stays in an unlock state for a longer time.
>>>
>>> This patch allows a non-first writer to ignore the handoff bit if it
>>> is not originally set or initiated by the first waiter.
>>>
>>> Fixes: d257cc8cb8d5 ("locking/rwsem: Make handoff bit handling more
>>> consistent")
>>
>> Hi Waiman,
>>
>> 1. You likely need :
>>
>> Cc: <stable@...r.kernel.org>
>>
>> Since d257cc8cb8d5 has been migrated to other LTS threads (5.15.y for
>> sure) .
>
> Since the commit has a fixes tag, the stable will automatically pick it up.
>
>>
>> 2. I had posted this earlier:
>>
>> [PATCH 5.15 1/1] Revert "locking/rwsem: Make handoff bit handling more
>> consistent"
>>
>> That is likely not needed now.
> Right. The patch was created to fix a problem reported by another user.
> So reverting it may not the right move.
Thanks for the quick follow up.
>>
>>
>> 3. Please add :
>>
>> Reported-by: Jorge Lopez <jorge.jo.lopez@...cle.com>
>>
>> We can likely test this, but I can't give a ETA when that will happen.
>>
>>
>>> Signed-off-by: Waiman Long <longman@...hat.com>
>>
>> Acked-by: John Donnelly <john.p.donnelly@...cle.com>
>
> Will add the that when I send out the next version.
>
> Cheers,
> Longman
>
Powered by blists - more mailing lists