From: Waiman Long <longman@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
linux-kernel@vger.kernel.org, Davidlohr Bueso <dave@stgolabs.net>,
mazhenhua <mazhenhua@xiaomi.com>, Hillf Danton <hdanton@sina.com>,
Maria Yu <quic_aiquny@quicinc.com>
Subject: Re: [PATCH v4] locking/rwsem: Make handoff bit handling more consistent
Date: Mon, 15 Nov 2021 19:09:03 -0500 [thread overview]
Message-ID: <fd999d01-167b-3233-d527-def3a1c79913@redhat.com> (raw)
In-Reply-To: <20211115230728.GS174703@worktop.programming.kicks-ass.net>
On 11/15/21 18:07, Peter Zijlstra wrote:
> On Mon, Nov 15, 2021 at 05:29:10PM -0500, Waiman Long wrote:
>> The handoff_set flag can only be true for a first waiter. A random waiter in
>> the middle of a wait queue will never has this flag set.
>>
>> This flag is set in two places in rwsem_try_write_lock():
> Bah, I thought it would unconditionally propagate the bit from @count. I
> missed the early exit :/
>
I am going to restructure the code there to make it easier to see that
only the first waiter will have this bit set to avoid this confusion.
Cheers,
Longman
next prev parent reply other threads:[~2021-11-16 0:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-12 4:07 Waiman Long
2021-11-12 12:10 ` Peter Zijlstra
2021-11-15 3:38 ` Waiman Long
2021-11-15 16:01 ` Peter Zijlstra
2021-11-15 22:29 ` Waiman Long
2021-11-15 23:07 ` Peter Zijlstra
2021-11-16 0:09 ` Waiman Long [this message]
2021-11-15 15:45 ` Aiqun(Maria) Yu
2021-11-15 16:58 ` 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=fd999d01-167b-3233-d527-def3a1c79913@redhat.com \
--to=longman@redhat.com \
--cc=dave@stgolabs.net \
--cc=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mazhenhua@xiaomi.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=quic_aiquny@quicinc.com \
--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®