From: Waiman Long <longman@redhat.com>
To: John Donnelly <John.p.donnelly@oracle.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
Boqun Feng <boqun.feng@gmail.com>
Cc: linux-kernel@vger.kernel.org, Hillf Danton <hdanton@sina.com>
Subject: Re: [PATCH] locking/rwsem: Allow slowpath writer to ignore handoff bit if not set by first waiter
Date: Wed, 27 Apr 2022 19:56:50 -0400 [thread overview]
Message-ID: <eb02c830-e4ff-c1a3-f23a-0ff7b8854acb@redhat.com> (raw)
In-Reply-To: <cd1da3e3-9024-2c97-3343-2569f74018be@oracle.com>
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@vger.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.
>
>
> 3. Please add :
>
> Reported-by: Jorge Lopez <jorge.jo.lopez@oracle.com>
>
> We can likely test this, but I can't give a ETA when that will happen.
>
>
>> Signed-off-by: Waiman Long <longman@redhat.com>
>
> Acked-by: John Donnelly <john.p.donnelly@oracle.com>
Will add the that when I send out the next version.
Cheers,
Longman
next prev parent reply other threads:[~2022-04-27 23:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-27 17:31 Waiman Long
2022-04-27 23:16 ` John Donnelly
2022-04-27 23:56 ` Waiman Long [this message]
2022-04-28 0:32 ` John Donnelly
[not found] <20220428012342.3713-1-hdanton@sina.com>
2022-06-22 17:48 ` john.p.donnelly
2022-06-22 20:07 ` Waiman Long
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=eb02c830-e4ff-c1a3-f23a-0ff7b8854acb@redhat.com \
--to=longman@redhat.com \
--cc=John.p.donnelly@oracle.com \
--cc=boqun.feng@gmail.com \
--cc=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=will@kernel.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®