[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fd999d01-167b-3233-d527-def3a1c79913@redhat.com>
Date: Mon, 15 Nov 2021 19:09:03 -0500
From: Waiman Long <longman@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
linux-kernel@...r.kernel.org, Davidlohr Bueso <dave@...olabs.net>,
mazhenhua <mazhenhua@...omi.com>,
Hillf Danton <hdanton@...a.com>,
Maria Yu <quic_aiquny@...cinc.com>
Subject: Re: [PATCH v4] locking/rwsem: Make handoff bit handling more
consistent
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
Powered by blists - more mailing lists