Simon 'corecode' Schubert wrote:
Using it for spinlocks is rather easy, because there is just one variable to monitor.

Just as a data point:

checking sysctl every second, I get about:
5-10 spinlock_contested1
0 spinlock_contested2
30000-200000 cpu_idle_spincnt
1400 cpu_idle_hltcnt

this is on an idle system, except for the statistics gathering. without statistics, I get even less contested spinlocks.

So spinlocks basically do not contribute to wasted cpu time. A bigger offender is the idle spin, but that's also not sooo much. Still something that could be optimized.

I'll see if I can import the latest ACPI from freebsd, they have some nice changes for the apci idle hook, which hopefully will make my laptop run cooler (maybe I should simply boot freebsd to check).

cheers
  simon

Reply via email to