Page MenuHomeFreeBSD

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

Authored by olce on Feb 23 2024, 5:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 10, 8:57 AM
Unknown Object (File)
Thu, May 9, 2:49 AM
Unknown Object (File)
Fri, Apr 26, 3:38 AM
Unknown Object (File)
Mon, Apr 22, 1:00 PM
Unknown Object (File)
Apr 5 2024, 1:19 PM
Unknown Object (File)
Feb 27 2024, 11:07 AM
Unknown Object (File)
Feb 26 2024, 9:17 PM
Subscribers

Details

Summary

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'.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

olce requested review of this revision.Feb 23 2024, 5:38 PM

Trying to coalesce other umtx_lock-ed regions in this loop (and after it) might be even more useful.

This revision is now accepted and ready to land.Feb 26 2024, 4:38 PM