HomeFreeBSD

Add two commands to _umtx_op system call to allow a simple mutex to be
rS179970Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

Add two commands to _umtx_op system call to allow a simple mutex to be
locked and unlocked completely in userland. by locking and unlocking mutex
in userland, it reduces the total time a mutex is locked by a thread,
in some application code, a mutex only protects a small piece of code, the
code's execution time is less than a simple system call, if a lock contention
happens, however in current implemenation, the lock holder has to extend its
locking time and enter kernel to unlock it, the change avoids this disadvantage,
it first sets mutex to free state and then enters kernel and wake one waiter
up. This improves performance dramatically in some sysbench mutex tests.

Tested by: kris
Sounds great: jeff

Details

Provenance
davidxuAuthored on
Parents
rS179969: Fix test for waiting AIFs in aac_poll(). This seems to solve the
Branches
Unknown
Tags
Unknown

Event Timeline