Re: [PATCH] locking/mutex: Reduce chance of setting HANDOFF bit on unlocked mutex

From: Waiman Long
Date: Wed Jun 30 2021 - 10:13:24 EST


On 6/30/21 9:56 AM, Peter Zijlstra wrote:
On Wed, Jun 30, 2021 at 09:50:11AM -0400, Waiman Long wrote:

The code looks good to me. It is an even better approach to make sure that
the HANDOFF will never be set on an unlocked mutex.

Reviewed-by: Waiman Long <longman@xxxxxxxxxx>
Thanks, what about that XXX? Should we not check sigpending before doing
the optimistic spinning thing?

Sorry, I missed the XXX comment:-)

This is a generic problem as other waiters that go into the spinning loop also don't check for sigpending. On the other hand, I am fine with doing the pending signal check before doing the optimistic spinning.

Cheers,
Longman