DragonFly kernel List (threaded) for 2007-09
DragonFly BSD
DragonFly kernel List (threaded) for 2007-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Detangle lwkt_switch() and the idle thread and consolidate sleep variables


From: "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>
Date: Mon, 03 Sep 2007 01:48:59 +0200

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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]