Lock profiling results on TCP and an 8.x project

Robert Watson rwatson at FreeBSD.org
Sun Oct 21 06:00:03 PDT 2007


On Sat, 20 Oct 2007, Robert Watson wrote:

> * When talking about percentage of available CPUs, I make the assumption 
> that
>  due to a sufficient quantity of CPUs, in most cases lock acquisition will
>  occur as a result of adaptive spinning rather than sleeping.  In the 
> netperf
>  case, this is not true, since the number of potential workers exceeds the
>  number of CPUs, hence the turnstile contention.  However, as sleeping on
>  locks itself is very expensive, it's reasonable to assume we would recover
>  a lot of CPU none-the-less.

FYI, a feature request for lock profiling: it would be nice if we also tracked 
for each contention point time spent spinning vs. context switched waiting for 
the lock, and the number of context switches the lock acquisition point has 
caused.  This would allow us to better understand the impact of adaptive lock 
behavior for workloads and configurations.

Robert N M Watson
Computer Laboratory
University of Cambridge


More information about the freebsd-arch mailing list