From: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>,
Suresh B Siddha <suresh.b.siddha@intel.com>,
Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>, Dipankar Sarma <dipankar@in.ibm.com>,
Balbir Singh <balbir@linux.vnet.ibm.com>,
Vatsa <vatsa@linux.vnet.ibm.com>,
Gautham R Shenoy <ego@in.ibm.com>,
Andi Kleen <andi@firstfloor.org>,
David Collier-Brown <davecb@sun.com>,
Tim Connors <tconnors@astro.swin.edu.au>,
Max Krasnyansky <maxk@qualcomm.com>,
Gregory Haskins <gregory.haskins@gmail.com>,
Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Subject: [RFC PATCH v4 0/7] Tunable sched_mc_power_savings=n
Date: Fri, 21 Nov 2008 14:00:39 +0530 [thread overview]
Message-ID: <20081121082533.27075.12056.stgit@drishya.in.ibm.com> (raw)
Hi,
The existing power saving loadbalancer CONFIG_SCHED_MC attempts to run
the workload in the system on minimum number of CPU packages and tries
to keep rest of the CPU packages idle for longer duration. Thus
consolidating workloads to fewer packages help other packages to be in
idle state and save power. The current implementation is very
conservative and does not work effectively across different workloads.
Initial idea of tunable sched_mc_power_savings=n was proposed to
enable tuning of the power saving load balancer based on the system
configuration, workload characteristics and end user requirements.
The power savings and performance of the given workload in an under
utilised system can be controlled by setting values of 0, 1 or 2 to
/sys/devices/system/cpu/sched_mc_power_savings with 0 being highest
performance and least power savings and level 2 indicating maximum
power savings even at the cost of slight performance degradation.
Please refer to the following discussions and article for details.
[1]Making power policy just work
http://lwn.net/Articles/287924/
[2][RFC v1] Tunable sched_mc_power_savings=n
http://lwn.net/Articles/287882/
[3][RFC PATCH v2 0/7] Tunable sched_mc_power_savings=n
http://lwn.net/Articles/297306/
[4][RFC PATCH v3 0/5] Tunable sched_mc_power_savings=n
http://lkml.org/lkml/2008/11/10/260
The following series of patch demonstrates the basic framework for
tunable sched_mc_power_savings.
This version of the patch incorporates comments and feedback
received on the previous post. Thanks to Peter Zijlstra, Gregory
Haskins, and Vatsa for the review and comments.
Changes from v3:
----------------
* Fixed the locking code with double_lock_balance() in
active-balance-newidle.patch
* Moved sched_mc_preferred_wakeup_cpu to root_domain structure so that
each partitioned sched domain will get independent nominated cpu
* More comments in active-balance-newidle.patch
* Reverted sched MC level and CPU level fine tuning in v2.6.28-rc4 for
now. These affect consolidation since SD_BALANCE_NEWIDLE is
removed. I will rework the tuning in the next iteration to
selectively enable them at sched_mc=2
* Patch series on 2.6.28-rc6 kernel
Changes from v2:
----------------
* Fixed locking order issue in active-balance new-idle
* Moved the wakeup biasing code to wake_idle() function and preserve
wake_affine function. Previous version would break wake affine in
order to aggressively consolidate tasks
* Removed sched_mc_preferred_wakeup_cpu global variable and moved to
doms_cur/dattr_cur and added a per_cpu pointer to appropriate
storage in partitioned sched domain. This changed is needed to
preserve functionality in case of partitioned sched domains
* Patch on 2.6.28-rc3 kernel
Results:
--------
Basic functionality of the code has not changed and the power vs
performance benefits for kernbench are similar to the ones posted
earlier.
KERNBENCH Runs: make -j4 on a x86 8 core, dual socket quad core cpu
package system
SchedMC Run Time Package Idle Energy Power
0 80.04 52.77% 53.23% 1.00x J 1.00y W
1 81.41 37.03% 69.67% 0.97x J 0.95y W
2 76.25 20.26% 85.86% 0.92x J 0.97y W
*** This is RFC code and not for inclusion ***
Please feel free to test, and let me know your comments and feedback.
Thanks,
Vaidy
Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
---
Gautham R Shenoy (1):
sched: Framework for sched_mc/smt_power_savings=N
Vaidyanathan Srinivasan (6):
sched: fine-tune SD_MC_INIT -- revert
sched: re-tune balancing -- revert
sched: activate active load balancing in new idle cpus
sched: bias task wakeups to preferred semi-idle packages
sched: nominate preferred wakeup cpu
sched: favour lower logical cpu number for sched_mc balance
arch/x86/include/asm/topology.h | 7 +--
include/linux/sched.h | 11 +++++
include/linux/topology.h | 6 +--
kernel/sched.c | 89 +++++++++++++++++++++++++++++++++++++--
kernel/sched_fair.c | 17 +++++++
5 files changed, 118 insertions(+), 12 deletions(-)
--
next reply other threads:[~2008-11-21 8:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-21 8:30 Vaidyanathan Srinivasan [this message]
2008-11-21 8:30 ` [RFC PATCH v4 1/7] sched: Framework for sched_mc/smt_power_savings=N Vaidyanathan Srinivasan
2008-11-21 19:45 ` David Collier-Brown
2008-11-22 18:06 ` Vaidyanathan Srinivasan
2008-11-21 8:31 ` [RFC PATCH v4 2/7] sched: favour lower logical cpu number for sched_mc balance Vaidyanathan Srinivasan
2008-11-21 8:31 ` [RFC PATCH v4 3/7] sched: nominate preferred wakeup cpu Vaidyanathan Srinivasan
2008-11-23 2:03 ` Peter Zijlstra
2008-11-24 6:14 ` Vaidyanathan Srinivasan
2008-11-21 8:31 ` [RFC PATCH v4 4/7] sched: bias task wakeups to preferred semi-idle packages Vaidyanathan Srinivasan
2008-11-21 8:31 ` [RFC PATCH v4 5/7] sched: activate active load balancing in new idle cpus Vaidyanathan Srinivasan
2008-11-21 8:31 ` [RFC PATCH v4 6/7] sched: re-tune balancing -- revert Vaidyanathan Srinivasan
2008-11-21 8:31 ` [RFC PATCH v4 7/7] sched: fine-tune SD_MC_INIT " Vaidyanathan Srinivasan
2008-11-23 2:09 ` [RFC PATCH v4 0/7] Tunable sched_mc_power_savings=n Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081121082533.27075.12056.stgit@drishya.in.ibm.com \
--to=svaidy@linux.vnet.ibm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=andi@firstfloor.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=davecb@sun.com \
--cc=dipankar@in.ibm.com \
--cc=ego@in.ibm.com \
--cc=gregory.haskins@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maxk@qualcomm.com \
--cc=mingo@elte.hu \
--cc=suresh.b.siddha@intel.com \
--cc=tconnors@astro.swin.edu.au \
--cc=vatsa@linux.vnet.ibm.com \
--cc=venkatesh.pallipadi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®