diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-03-20 08:59:47 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-03-20 08:59:47 +0000 |
commit | 7b915d3eaf2802578456359b5e756af0c1246c58 (patch) | |
tree | 5cf79bd30fcd9ee1ee7a7487670fe436ef38f5e5 /tools/libxc/xc_pm.c | |
parent | cec3850d146e992d3f8452cc154d9728c4fbc647 (diff) | |
download | xen-7b915d3eaf2802578456359b5e756af0c1246c58.tar.gz xen-7b915d3eaf2802578456359b5e756af0c1246c58.tar.bz2 xen-7b915d3eaf2802578456359b5e756af0c1246c58.zip |
xenpm: Add a small scheduler knob "sched_smt_power_savings"
Current scheduler only care performance, thus always picks pCPU from
the most idle package. This knob provides another option to pick pCPU from
least idle package, for user who want performance power balance.
Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Tian Kevin <kevin.tian@intel.com>
Diffstat (limited to 'tools/libxc/xc_pm.c')
-rw-r--r-- | tools/libxc/xc_pm.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/libxc/xc_pm.c b/tools/libxc/xc_pm.c index 918c604010..13342a3121 100644 --- a/tools/libxc/xc_pm.c +++ b/tools/libxc/xc_pm.c @@ -345,3 +345,20 @@ int xc_get_cputopo(int xc_handle, struct xc_get_cputopo *info) return rc; } +/* value: 0 - disable sched_smt_power_savings + 1 - enable sched_smt_power_savings + */ +int xc_set_sched_opt_smt(int xc_handle, uint32_t value) +{ + int rc; + DECLARE_SYSCTL; + + sysctl.cmd = XEN_SYSCTL_pm_op; + sysctl.u.pm_op.cmd = XEN_SYSCTL_pm_op_set_sched_opt_smt; + sysctl.u.pm_op.cpuid = 0; + sysctl.u.pm_op.set_sched_opt_smt = value; + rc = do_sysctl(xc_handle, &sysctl); + + return rc; +} + |