Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 May 2003 01:06:19 +0200
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        Bakul Shah <bakul@bitblocks.com>
Cc:        "M. Warner Losh" <imp@bsdimp.com>
Subject:   Re: Interrupt latency problems 
Message-ID:  <2905.1052694379@critter.freebsd.dk>
In-Reply-To: Your message of "Sun, 11 May 2003 15:58:32 PDT." <200305112258.h4BMwWPF029180@bitblocks.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <200305112258.h4BMwWPF029180@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@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2905.1052694379>