cvs commit: src/sys/conf options src/sys/kern kern_mutex.c kern_rwlock.c kern_sx.c kern_thread.c sched_4bsd.c sched_ule.c subr_lock.c src/sys/sys _lock.h lock_profile.h proc.h sx.h

Jeff Roberson jroberson at chesapeake.net
Sat Dec 15 15:23:15 PST 2007


On Sat, 15 Dec 2007, Jeff Roberson wrote:

> jeff        2007-12-15 23:13:32 UTC
>
>  FreeBSD src repository
>
>  Modified files:
>    sys/conf             options
>    sys/kern             kern_mutex.c kern_rwlock.c kern_sx.c
>                         kern_thread.c sched_4bsd.c sched_ule.c
>                         subr_lock.c
>    sys/sys              _lock.h lock_profile.h proc.h sx.h

Some of you may complain about the inclusion of lock_profile.h in 
sys/proc.h.  I hope you will forgive this since lock profiling now no 
longer disturbs the ABI and will work with binary modules as well.

Kip really deserves credit for most of this.  I just picked up some of his 
ideas and polished it off a bit.  You can attribute whatever went right to 
him and whatever went wrong to me.

Cheers,
Jeff


>  Log:
>   - Re-implement lock profiling in such a way that it no longer breaks
>     the ABI when enabled.  There is no longer an embedded lock_profile_object
>     in each lock.  Instead a list of lock_profile_objects is kept per-thread
>     for each lock it may own.  The cnt_hold statistic is now always 0 to
>     facilitate this.
>   - Support shared locking by tracking individual lock instances and
>     statistics in the per-thread per-instance lock_profile_object.
>   - Make the lock profiling hash table a per-cpu singly linked list with a
>     per-cpu static lock_prof allocator.  This removes the need for an array
>     of spinlocks and reduces cache contention between cores.
>   - Use a seperate hash for spinlocks and other locks so that only a
>     critical_enter() is required and not a spinlock_enter() to modify the
>     per-cpu tables.
>   - Count time spent spinning in the lock statistics.
>   - Remove the LOCK_PROFILE_SHARED option as it is always supported now.
>   - Specifically drop and release the scheduler locks in both schedulers
>     since we track owners now.
>
>  In collaboration with:  Kip Macy
>  Sponsored by:   Nokia
>
>  Revision  Changes    Path
>  1.613     +0 -1      src/sys/conf/options
>  1.203     +6 -20     src/sys/kern/kern_mutex.c
>  1.33      +7 -24     src/sys/kern/kern_rwlock.c
>  1.58      +9 -25     src/sys/kern/kern_sx.c
>  1.263     +2 -0      src/sys/kern/kern_thread.c
>  1.112     +6 -1      src/sys/kern/sched_4bsd.c
>  1.219     +6 -0      src/sys/kern/sched_ule.c
>  1.19      +433 -221  src/sys/kern/subr_lock.c
>  1.15      +0 -25     src/sys/sys/_lock.h
>  1.16      +27 -112   src/sys/sys/lock_profile.h
>  1.497     +2 -0      src/sys/sys/proc.h
>  1.38      +1 -3      src/sys/sys/sx.h
>


More information about the cvs-src mailing list