Re: Interrupt latency problems

From: Poul-Henning Kamp <phk_at_phk.freebsd.dk>
Date: Mon, 12 May 2003 01:06:19 +0200
In message <200305112258.h4BMwWPF029180_at_bitblocks.com>, Bakul Shah writes:

>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 ?

We already have a similar check for timeout functions, the policy
I opted for there was to only whine if the duration was longer than
the previous higest duration.

Output looks like:
	Expensive timeout(9) function: 0xc03d01f0(0) 0.003696815 s

This should be simple to implement for mutex'es too.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk_at_FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.
Received on Sun May 11 2003 - 14:06:33 UTC

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