Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Mar 2004 18:50:13 -0500 (EST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        current@FreeBSD.org
Subject:   Giant and timeouts and more timeouts, and more timeouts... and NFS.
Message-ID:  <Pine.NEB.3.96L.1040306184054.77813M-100000@fledge.watson.org>

next in thread | raw e-mail | index | archive | help

I was playing a bit with mutex profiling this weekend, measuring mutex use
on the netperf_socket branch (which has the IPv4 and socket code running
Giant-free).  I was a bit surprised to find a massive number of
timeout/callouts that require Giant running every second.  I added a
little instrumentation to see just how much Giant was getting used, and
found the following in a short sample (1 second) on an idle system: 

  none:/tmp> sysctl debug.to_gsample_reset=1 ; sleep 10 ; sysctl
    debug.to_gsample > /tmp/sample ; wc /tmp/sample
  debug.to_gsample_reset: 0 -> 0

  paprika:/tmp> ./process.pl | ./count.pl | sort -nr
  uhci_poll_hub: 41
  scrn_timer: 253
  rpcclnt_timer: 1007
  nfsrv_timer: 1007
  nfs_timer: 1007
  nd6_timer: 10
  loadav: 1
  in6_rr_timer: 2
  if_slowtimo: 10
  dasendorderedtag: 1
  comwakeup: 10

So that's 3000 timeouts a second for the NFS server and client code (even
though neither is used on this machine), each one of which will grab and
release Giant.  That seems a little gratuitous to me...

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert@fledge.watson.org      Senior Research Scientist, McAfee Research



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1040306184054.77813M-100000>