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>,
Arjan van de Ven <arjan@infradead.org>
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>,
Gregory Haskins <gregory.haskins@gmail.com>,
Mike Galbraith <efault@gmx.de>,
Thomas Gleixner <tglx@linutronix.de>,
Arun Bharadwaj <arun@linux.vnet.ibm.com>,
Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Subject: [RFC PATCH v1 2/3] sched: threshold helper functions
Date: Mon, 27 Apr 2009 02:16:57 +0530 [thread overview]
Message-ID: <20090426204657.17495.21835.stgit@drishya.in.ibm.com> (raw)
In-Reply-To: <20090426204029.17495.46609.stgit@drishya.in.ibm.com>
Define group capacity threshold as a multiple of
impalance percentage at higher levels of sched_mc settings.
sched_mc=3 Group capacity increased by 25% (5 tasks on quad core)
sched_mc=4 Group capacity increased by 50% (6 tasks on quad core)
sched_mc=5 Group capacity increased by 100% (8 tasks on quad core)
*** RFC patch for discussion ***
Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
---
kernel/sched.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index b902e58..f88ed04 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -3291,6 +3291,21 @@ static inline int get_sd_load_idx(struct sched_domain *sd,
#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT)
+
+static inline unsigned int group_capacity_bump_pct(struct sched_domain *sd)
+{
+ if (sched_mc_power_savings >= POWERSAVINGS_INCREASE_GROUP_CAPACITY_3)
+ return 100+(sd->imbalance_pct-100)*4;
+
+ if (sched_mc_power_savings >= POWERSAVINGS_INCREASE_GROUP_CAPACITY_2)
+ return 100+(sd->imbalance_pct-100)*2;
+
+ if (sched_mc_power_savings >= POWERSAVINGS_INCREASE_GROUP_CAPACITY_1)
+ return sd->imbalance_pct;
+
+ return 100;
+}
+
/**
* init_sd_power_savings_stats - Initialize power savings statistics for
* the given sched_domain, during load balancing.
@@ -3433,6 +3448,12 @@ static inline int check_power_save_busiest_group(struct sd_lb_stats *sds,
{
return 0;
}
+
+static inline unsigned int group_capacity_bump_pct(struct sched_domain *sd)
+{
+ return 100;
+}
+
#endif /* CONFIG_SCHED_MC || CONFIG_SCHED_SMT */
next prev parent reply other threads:[~2009-04-26 20:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-26 20:46 [RFC PATCH v1 0/3] Saving power by cpu evacuation using sched_mc=n Vaidyanathan Srinivasan
2009-04-26 20:46 ` [RFC PATCH v1 1/3] sched: add more levels of sched_mc Vaidyanathan Srinivasan
2009-04-26 20:46 ` Vaidyanathan Srinivasan [this message]
2009-04-26 20:47 ` [RFC PATCH v1 3/3] sched: loadbalancer hacks for forced packing of tasks Vaidyanathan Srinivasan
2009-04-27 3:52 ` [RFC PATCH v1 0/3] Saving power by cpu evacuation using sched_mc=n Ingo Molnar
2009-04-27 5:43 ` Vaidyanathan Srinivasan
2009-04-27 5:53 ` Ingo Molnar
2009-04-27 6:39 ` Vaidyanathan Srinivasan
2009-04-27 7:01 ` Balbir Singh
2009-04-27 5:54 ` Dipankar Sarma
2009-04-27 10:09 ` Peter Zijlstra
2009-04-27 14:20 ` Vaidyanathan Srinivasan
2009-04-28 8:33 ` Peter Zijlstra
2009-04-28 8:52 ` Ingo Molnar
2009-04-28 16:15 ` Vaidyanathan Srinivasan
2009-04-28 16:11 ` Vaidyanathan Srinivasan
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=20090426204657.17495.21835.stgit@drishya.in.ibm.com \
--to=svaidy@linux.vnet.ibm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=andi@firstfloor.org \
--cc=arjan@infradead.org \
--cc=arun@linux.vnet.ibm.com \
--cc=balbir@linux.vnet.ibm.com \
--cc=dipankar@in.ibm.com \
--cc=efault@gmx.de \
--cc=ego@in.ibm.com \
--cc=gregory.haskins@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
--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