Re: 4BSD/ULE numbers...

From: Peter Jeremy <PeterJeremy_at_optushome.com.au>
Date: Tue, 27 Sep 2005 19:17:49 +1000
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
Received on Tue Sep 27 2005 - 07:17:58 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:44 UTC