DragonFly BSD
DragonFly commits List (threaded) for 2010-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: kernel - Optimize idle thread halt


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 19 Dec 2010 11:22:34 -0800 (PST)

commit be71787bd3c8d2d199af9bb30ffb6df730c6b858
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Sun Dec 19 11:17:36 2010 -0800

    kernel - Optimize idle thread halt
    
    * Count the number of times the idle thread is entered on a cpu without
      switching to a non-idle thread.  Use the fast-halt (non-ACPI) until the
      count exceeds a reasonable machdep.cpu_idle_repeat.
    
      This improves the default performance to levels closer to cpu_idle_hlt
      mode 1 but still gives us the power savings from mode 3.  Performanced is
      improved significantly because many threads on SMP boxes are event
      or pipe oriented and only sleep for short periods of time or ping-pong
      back and forth.  For example, a cc -pipe, or typical kernel threads
      blocking on tokens or locks for short periods of time.
    
    * Adjust machdep.cpu_idle_hlt modes:
    
        0	Never halt, the idle thread just spins.
    
        1	Always use a fast HLT/MONITOR/MWAIT
    
        2	Hybrid approach use (1) up to a certain point, then use (3).
    	(this is the default)
    
        3	Always use the ACPI halt

Summary of changes:
 sys/kern/lwkt_thread.c             |    4 ++
 sys/platform/pc32/i386/machdep.c   |   55 ++++++++++++++++++++++++++++++-----
 sys/platform/pc64/x86_64/machdep.c |   47 ++++++++++++++++++++++++++----
 sys/sys/globaldata.h               |    5 ++-
 4 files changed, 96 insertions(+), 15 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/be71787bd3c8d2d199af9bb30ffb6df730c6b858


-- 
DragonFly BSD source repository



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