4BSD/ULE numbers...
Peter Jeremy
PeterJeremy at optushome.com.au
Tue Sep 27 02:17:58 PDT 2005
On Mon, 2005-Sep-26 18:44:53 -0400, Kris Kennaway wrote:
>I'd love a way to measure sched_lock contention..I'm sure it's a
>factor on e.g. my machines with >=10 CPUs, but mutex profiling doesn't
>see it because it's a spinlock.
How about adding a spincount field in struct mtx and incrementing it in
the inner loop of _mtx_lock_spin()? This wouldn't be perfect but you
could get a rough idea of the lock contention by looking at the rate
that the spincount field incremented.
Working out how many CPUs are simultaneously contending for sched_lock
would be more difficult but doable.
--
Peter Jeremy
More information about the freebsd-current
mailing list