diff options
author | Siddha, Suresh B <suresh.b.siddha@intel.com> | 2006-06-27 05:54:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-27 20:32:45 -0400 |
commit | 5c45bf279d378d436ce45825c0f136696c7b6109 (patch) | |
tree | 80e2fcf4866b84fccb787562e1a83b16f4bc8850 /arch/i386 | |
parent | 369381694ddcf03f1de403501c8b97099b5109ec (diff) |
[PATCH] sched: mc/smt power savings sched policy
sysfs entries 'sched_mc_power_savings' and 'sched_smt_power_savings' in
/sys/devices/system/cpu/ control the MC/SMT power savings policy for the
scheduler.
Based on the values (1-enable, 0-disable) for these controls, sched groups
cpu power will be determined for different domains. When power savings
policy is enabled and under light load conditions, scheduler will minimize
the physical packages/cpu cores carrying the load and thus conserving
power(with a perf impact based on the workload characteristics... see OLS
2005 CMP kernel scheduler paper for more details..)
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Con Kolivas <kernel@kolivas.org>
Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/kernel/smpboot.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index ab5275beddf7..89e7315e539c 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -448,10 +448,12 @@ cpumask_t cpu_coregroup_map(int cpu) | |||
448 | struct cpuinfo_x86 *c = cpu_data + cpu; | 448 | struct cpuinfo_x86 *c = cpu_data + cpu; |
449 | /* | 449 | /* |
450 | * For perf, we return last level cache shared map. | 450 | * For perf, we return last level cache shared map. |
451 | * TBD: when power saving sched policy is added, we will return | 451 | * And for power savings, we return cpu_core_map |
452 | * cpu_core_map when power saving policy is enabled | ||
453 | */ | 452 | */ |
454 | return c->llc_shared_map; | 453 | if (sched_mc_power_savings || sched_smt_power_savings) |
454 | return cpu_core_map[cpu]; | ||
455 | else | ||
456 | return c->llc_shared_map; | ||
455 | } | 457 | } |
456 | 458 | ||
457 | /* representing cpus for which sibling maps can be computed */ | 459 | /* representing cpus for which sibling maps can be computed */ |