Re: apparent lock contention

From: Robert Watson <rwatson_at_freebsd.org>
Date: Thu, 22 Jan 2004 14:36:57 -0500 (EST)
On Wed, 21 Jan 2004 bn_at_donut.ugcs.caltech.edu wrote:

> Under moderate levels of I/O and light processing load, I experience
> what appears to be severe contention on Giant with several processes at
> a time holding in state "*Giant*"  for several seconds each. 
> 
> The problem was initiated by a umount operation on a UFS fs which
> completed successfully after about ten minutes of whirling. 
> 
> This is a SMP system running 5.2-R. 
> 
> Can anyone tell me how I might better diagnose what is going on? 

Well, the first thing to be aware of is that our process monitoring tools
all grab Giant when pulling entries out of the kernel.  So during the
snapshot taking of the kernel, you're guaranteed that *someone* is holding
Giant, which increases the chance ot getting contention substantially.

Right now we don't have a contention measurement tool, but we've been
talking about how best to add one.  I think a good start would be simply
to add contention counters to the mutex profiling implementation.  It
wouldn't necessarily indicate the length of contention and average wait
times, but it would give a basic measurement of "heat" that would be quite
useful.

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert_at_fledge.watson.org      Senior Research Scientist, McAfee Research
Received on Thu Jan 22 2004 - 10:39:11 UTC

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