Re: kgmacros, showallmtx
Re: kgmacros, showallmtx
- Subject: Re: kgmacros, showallmtx
- From: Derek Kumar <email@hidden>
- Date: Fri, 15 Dec 2006 13:04:27 -0500
Correct, those fields indicate the number of acquisition attempts,
acquisition attempt misses, and the number of misses which caused the
acquisition attempt to block respectively (essentially, the mutex
routines can spin briefly before blocking if the thread holding the
mutex is active on another processor). However, these lock contention
statistics are gathered only if either the kernel was booted with the
"lcks=3" boot-arg (this enables statistics gathering for all lock
groups), or if the statistics and debug attributes have been enabled
programmatically for a particular lock group (via
lck_grp_attr_setstat) and the mutex (via lck_attr_setdebug). Note
that this applies to lck_mtx_lock and variants; the deprecated mutex_
style routines don't collect contention statistics. Also, and whilst
I've addressed this for Leopard/x86 (along with additional
statistics), the asm mutex implementations on the 10.4 series x86
kernels don't gather contention statistics (but the PowerPC
implementations do). There is an interface to collect these
statistics from user space, and a program to do so (lockstat, which
has options such as periodic stats delta display), but I don't think
it's been packaged up for external use. If you think you'll find that
useful, feel free to contact me off-list and I'll send you a copy.
Derek
On Dec 15, 2006, at 12:07 PM, Matt Darland wrote:
What do the 'util', 'miss', and 'wait' fields indicate in the
showallmtx macro of the kgmacros package? Does this give an idea as
to the relative level of contention for locks within a lock group?
----
Thanks,
Matt
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden