Interrupt latency problems
Bakul Shah
bakul at bitblocks.com
Sun May 11 17:31:57 PDT 2003
> >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.
More information about the freebsd-current
mailing list