git: kernel - Refactor the lwkt_token code, making it faster

Matthew Dillon dillon at crater.dragonflybsd.org
Sun Dec 20 19:40:43 PST 2009


commit c6fbe95aea00066c24a4d2c2f84bb848374c08c7
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sun Dec 20 19:33:07 2009 -0800

    kernel - Refactor the lwkt_token code, making it faster
    
    * Rewrite the core token functions and revamp the structures.  The
      lwkt_token structure now contains just a single element, a pointer
      to the on-stack lwkt_tokref.  The lwkt_tokref now contains the
      owner id.
    
    * Recursive tokens are still fully supported and coded trivially.
    
    * Critical sections and spinlocks are no longer needed or used by
      the lwkt_token code.  Token aquisition is basically a single
      atomic_cmpset_ptr() call in the critical path.  Everything runs
      ultra clean now.
    
    * Improve the pool token API.
    
    * Remove extranious cruft

Summary of changes:
 sys/ddb/db_ps.c       |    2 +-
 sys/kern/kern_lockf.c |    2 +-
 sys/kern/lwkt_token.c |  484 ++++++++++++++++++++++++++-----------------------
 sys/sys/thread.h      |   49 +----
 sys/sys/thread2.h     |    4 +-
 5 files changed, 270 insertions(+), 271 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/c6fbe95aea00066c24a4d2c2f84bb848374c08c7


-- 
DragonFly BSD source repository





More information about the Commits mailing list