From: Jason Low <jason.low2@hp.com>
To: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Mike Galbraith <efault@gmx.de>,
Thomas Gleixner <tglx@linutronix.de>,
Paul Turner <pjt@google.com>, Alex Shi <alex.shi@intel.com>,
Preeti U Murthy <preeti@linux.vnet.ibm.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Morten Rasmussen <morten.rasmussen@arm.com>,
Namhyung Kim <namhyung@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Kees Cook <keescook@chromium.org>, Mel Gorman <mgorman@suse.de>,
Rik van Riel <riel@redhat.com>,
aswin@hp.com, scott.norton@hp.com, chegu_vinod@hp.com, "Bui,
Tuan" <tuan.d.bui@hp.com>, Waiman Long <Waiman.Long@hp.com>,
"Makphaibulchoke, Thavatchai" <thavatchai.makpahibulchoke@hp.com>,
"Bueso, Davidlohr" <davidlohr.bueso@hp.com>
Subject: Re: [PATCH] sched: Give idle_balance() a break when it does not move tasks.
Date: Mon, 12 Aug 2013 13:19:59 -0700 [thread overview]
Message-ID: <1376338799.2697.18.camel@j-VirtualBox> (raw)
In-Reply-To: <20130812110045.GA1925@linux.vnet.ibm.com>
On Mon, 2013-08-12 at 16:30 +0530, Srikar Dronamraju wrote:
> > /*
> > @@ -5298,6 +5300,8 @@ void idle_balance(int this_cpu, struct rq *this_rq)
> > continue;
> >
> > if (sd->flags & SD_BALANCE_NEWIDLE) {
> > + load_balance_attempted = true;
> > +
> > /* If we've pulled tasks over stop searching: */
> > pulled_task = load_balance(this_cpu, this_rq,
> > sd, CPU_NEWLY_IDLE, &balance);
> > @@ -5322,6 +5326,10 @@ void idle_balance(int this_cpu, struct rq *this_rq)
> > */
> > this_rq->next_balance = next_balance;
> > }
> > +
> > + /* Give idle balance on this CPU a break when it isn't moving tasks */
> > + if (load_balance_attempted && !pulled_task)
> > + this_rq->next_newidle_balance = jiffies + (HZ / 100);
> > }
>
> Looks reasonable. However should we do this per sd and not per rq. i.e
> move the next_newidle_balance to sched_domain. So if we find a
> load_balance in newly_idle context that wasn't successful, we skip
> load_balance for that sd in the next newly idle balance.
I wonder, if we skip newidle balance for a domain after a newidle
balance attempt for a CPU did not move tasks, would that potentially
cause some "unfairness" for all the other CPUS within the domain?
Perhaps we can reduce the duration that idle balance is blocked from 10
ms to a much smaller duration if we were to block on a per domain basis.
Peter, any thoughts on which method is preferable?
Thanks for the suggestion,
Jason
prev parent reply other threads:[~2013-08-12 20:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-12 8:42 [PATCH] sched: Give idle_balance() a break when it does not move tasks Jason Low
2013-08-12 11:00 ` Srikar Dronamraju
2013-08-12 20:19 ` Jason Low [this message]
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=1376338799.2697.18.camel@j-VirtualBox \
--to=jason.low2@hp.com \
--cc=Waiman.Long@hp.com \
--cc=akpm@linux-foundation.org \
--cc=alex.shi@intel.com \
--cc=aswin@hp.com \
--cc=chegu_vinod@hp.com \
--cc=davidlohr.bueso@hp.com \
--cc=efault@gmx.de \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=morten.rasmussen@arm.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=preeti@linux.vnet.ibm.com \
--cc=riel@redhat.com \
--cc=scott.norton@hp.com \
--cc=srikar@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--cc=thavatchai.makpahibulchoke@hp.com \
--cc=torvalds@linux-foundation.org \
--cc=tuan.d.bui@hp.com \
--cc=vincent.guittot@linaro.org \
/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