HomeFreeBSD

PP mutexes: lock: Reduce 'umtx_lock' holding before taking the user lock

Description

PP mutexes: lock: Reduce 'umtx_lock' holding before taking the user lock

There is no need to have it for the priority check (that the thread
doesn't have a higher priority than the mutex's ceiling), and there's
also no need to take it if the thread doesn't have privileges to set its
priority to the mutex's ceiling.

While here, turn 'su' into a 'bool' and compute the internal priority
corresponding to the mutex's ceiling once and for all, putting it in new
'new_pri'.

Reviewed by: kib
Approved by: emaste (mentor)
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44045

Details

Provenance
olceAuthored on Feb 22 2024, 9:13 AM
Reviewer
kib
Differential Revision
D44045: PP mutexes: lock: Reduce 'umtx_lock' holding before taking the user lock
Parents
rG9ac3ac9ece62: PP mutexes: lock: Check if priority is too high against base one
Branches
Unknown
Tags
Unknown