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

看板DFBSD_commit作者時間16年前 (2009/12/21 12:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit c6fbe95aea00066c24a4d2c2f84bb848374c08c7 Author: Matthew Dillon <dillon@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
文章代碼(AID): #1BBlC4Bi (DFBSD_commit)