git: kernel - Add hw.cpu_mwait_haltand hw.cpu_mwait_spin

Matthew Dillon dillon at crater.dragonflybsd.org
Wed Jul 31 16:41:31 PDT 2013


commit a46b4a23d8980802ae39fb00397b19320968c4d6
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Wed Jul 31 16:34:28 2013 -0700

    kernel - Add hw.cpu_mwait_haltand hw.cpu_mwait_spin
    
    * Add globals with machine-specific meanings.  This allows us to operate
      with MONITOR/MWAIT and gain the same power savings that we get with
      ACPI halt mode when idle.  Waiting on a follow-up commit to set the
      the defaults.
    
    * For example, if we sysctl hw.cpu_mwait_halt=0x44 hw.cpu_mwait_spin=0x11
      (and leaving machdep.cpu_idle_hlt=2) on a haswell cpu it will shave the
      idle power down by another 5W, from 25W to 20W on an idle Haswell Xeon
      3.4 GHz server chip without impacting wakeup performance too badly.

Summary of changes:
 sys/cpu/i386/misc/monitor.s        |  6 +++---
 sys/cpu/x86_64/misc/monitor.s      | 10 ++++++----
 sys/kern/lwkt_thread.c             |  8 ++++++--
 sys/platform/pc32/i386/machdep.c   |  6 +++++-
 sys/platform/pc64/x86_64/machdep.c |  6 +++++-
 sys/sys/systm.h                    |  6 ++++--
 6 files changed, 29 insertions(+), 13 deletions(-)

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


-- 
DragonFly BSD source repository


More information about the Commits mailing list