git: kernel - Refactor lwkt_token shared lock release

Matthew Dillon dillon at
Tue Oct 31 10:49:59 PDT 2017

commit 5abad2c526ea9231c114989501291f43a30b438b
Author: Matthew Dillon <dillon at>
Date:   Mon Oct 23 19:08:13 2017 -0700

    kernel - Refactor lwkt_token shared lock release
    * We can finally get rid of the atomic_cmpset*() loop in the token
      release code.  The exclusive release can now simply clear the
      TOK_EXCLUSIVE bit, and the shared release can now simply reduce
      tok->t_count by TOK_INCR.
    * This significantly improves heavily constested shared token

Summary of changes:
 sys/kern/lwkt_token.c | 52 +++++++++++++++++++++------------------------------
 1 file changed, 21 insertions(+), 31 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list