From: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
Suresh B Siddha <suresh.b.siddha@intel.com>,
Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>,
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>
Subject: Re: [RFC PATCH v2 5/7] sched: nominate preferred wakeup cpu
Date: Mon, 8 Sep 2008 19:13:17 +0530 [thread overview]
Message-ID: <20080908134317.GL4801@dirshya.in.ibm.com> (raw)
In-Reply-To: <1220880091.12278.16.camel@twins.programming.kicks-ass.net>
* Peter Zijlstra <a.p.zijlstra@chello.nl> [2008-09-08 15:21:31]:
> On Mon, 2008-09-08 at 18:51 +0530, Vaidyanathan Srinivasan wrote:
> > When the system utilisation is low and more cpus are idle,
> > then the process waking up from sleep should prefer to
> > wakeup an idle cpu from semi-idle cpu package (multi core
> > package) rather than a completely idle cpu package which
> > would waste power.
> >
> > Use the sched_mc balance logic in find_busiest_group() to
> > nominate a preferred wakeup cpu.
> >
> > This info can be sored in appropriate sched_domain, but
> > updating this info in all copies of sched_domain is not
> > practical. For now lets try with a global variable.
> >
> > Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
> > ---
> >
> > kernel/sched.c | 10 ++++++++++
> > 1 files changed, 10 insertions(+), 0 deletions(-)
> >
> > diff --git a/kernel/sched.c b/kernel/sched.c
> > index 569fc8d..4ae79f5 100644
> > --- a/kernel/sched.c
> > +++ b/kernel/sched.c
> > @@ -3380,6 +3380,9 @@ out_balanced:
> >
> > if (this == group_leader && group_leader != group_min) {
> > *imbalance = min_load_per_task;
> > + if (sched_mc_power_savings >= POWERSAVINGS_BALANCE_WAKEUP)
> > + sched_mc_preferred_wakeup_cpu =
> > + first_cpu(group_leader->cpumask);
> > return group_min;
> > }
> > #endif
> > @@ -6911,6 +6914,13 @@ static void sched_domain_node_span(int node, cpumask_t *span)
> > int sched_smt_power_savings = 0, sched_mc_power_savings = 0;
> >
> > /*
> > + * Preferred wake up cpu nominated by sched_mc balance that will be used when
> > + * most cpus are idle in the system indicating overall very low system
> > + * utilisation. Triggered at POWERSAVINGS_BALANCE_WAKEUP (2).
> > + */
> > +unsigned int sched_mc_preferred_wakeup_cpu;
>
> This cannot be a global variable, what happens when we have two disjoint
> load-balance domains?
Agreed this is certainly a problem. I tried adding this to the
sched_domain, but accessing the correct 'copy' for sched_domain that
holds this variable from any cpu is not fast.
Thank you for pointing this out. I will find a alternative
implementation.
--Vaidy
next prev parent reply other threads:[~2008-09-08 13:42 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-08 13:14 [RFC PATCH v2 0/7] Tunable sched_mc_power_savings=n Vaidyanathan Srinivasan
2008-09-08 13:16 ` [RFC PATCH v2 1/7] sched: arch_reinit_sched_domains() must destroy domains to force rebuild Vaidyanathan Srinivasan
2008-09-08 13:17 ` [RFC PATCH v2 2/7] sched: Fix __load_balance_iterator() for cfq with only one task Vaidyanathan Srinivasan
2008-09-08 13:18 ` [RFC PATCH v2 3/7] sched: Framework for sched_mc/smt_power_savings=N Vaidyanathan Srinivasan
2008-09-08 13:20 ` [RFC PATCH v2 4/7] sched: favour lower logical cpu number for sched_mc balance Vaidyanathan Srinivasan
2008-09-08 13:21 ` [RFC PATCH v2 5/7] sched: nominate preferred wakeup cpu Vaidyanathan Srinivasan
2008-09-08 13:21 ` Peter Zijlstra
2008-09-08 13:43 ` Vaidyanathan Srinivasan [this message]
2008-09-08 13:22 ` [RFC PATCH v2 6/7] sched: bias task wakeups to preferred semi-idle packages Vaidyanathan Srinivasan
2008-09-08 13:23 ` [RFC PATCH v2 7/7] sched: activate active load balancing in new idle cpus Vaidyanathan Srinivasan
2008-09-08 13:25 ` [RFC PATCH v2 0/7] Tunable sched_mc_power_savings=n Peter Zijlstra
2008-09-08 13:48 ` Vaidyanathan Srinivasan
2008-09-08 13:56 ` Peter Zijlstra
2008-09-09 1:20 ` Suresh Siddha
2008-09-09 6:18 ` Peter Zijlstra
2008-09-09 6:31 ` Nick Piggin
2008-09-09 6:54 ` Peter Zijlstra
2008-09-09 7:59 ` Nick Piggin
2008-09-09 8:25 ` Peter Zijlstra
2008-09-09 9:03 ` Nick Piggin
2008-09-08 13:58 ` Andi Kleen
2008-09-10 13:45 ` 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=20080908134317.GL4801@dirshya.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=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