Re: Interrupt latency problems

From: Bakul Shah <bakul_at_bitblocks.com>
Date: Sun, 11 May 2003 17:31:54 -0700
> >Is it possible to cheaply check how long a mutex was held?
> 
> Have WITNESS store a timestamp when mutex is grabbed.  Check delta-T
> when mutes is releases.  Whine if above ?

Yeah, something like it!  I was thinking of this more as a
way to find (and fix!) slow uses -- logging this is probably
not of much use as a user can't do anything about it (except
you have more user complaints!).  Mutex holdtime distribution
seems more useful: if only a few uses have long holdtimes
they should be looked at first.  If most uses are long, time
to sit back and figure out something better.  If a mutex is
released in only a few machine cycles, may be a spinlock is
better....  If the distribution suddenly changes for the
worse from version N to version N+1 of the kernel you don't
have to wait until someone complains to know something broke
and you know where to look.

I'd use a different define from WITNESS.
Received on Sun May 11 2003 - 15:31:57 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:07 UTC