All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Low <jason.low2@hp.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org, efault@gmx.de,
	pjt@google.com, preeti@linux.vnet.ibm.com,
	akpm@linux-foundation.org, mgorman@suse.de, riel@redhat.com,
	aswin@hp.com, scott.norton@hp.com, srikar@linux.vnet.ibm.com
Subject: Re: [RFC][PATCH v4 3/3] sched: Periodically decay max cost of idle balance
Date: Mon, 09 Sep 2013 13:40:33 -0700	[thread overview]
Message-ID: <1378759233.10318.4.camel@j-VirtualBox> (raw)
In-Reply-To: <20130909114453.GR31370@twins.programming.kicks-ass.net>

On Mon, 2013-09-09 at 13:44 +0200, Peter Zijlstra wrote:
> On Tue, Sep 03, 2013 at 11:02:59PM -0700, Jason Low wrote:
> > On Fri, 2013-08-30 at 12:29 +0200, Peter Zijlstra wrote:
> > >  	rcu_read_lock();
> > >  	for_each_domain(cpu, sd) {
> > > +		/*
> > > +		 * Decay the newidle max times here because this is a regular
> > > +		 * visit to all the domains. Decay ~0.5% per second.
> > > +		 */
> > > +		if (time_after(jiffies, sd->next_decay_max_lb_cost)) {
> > > +			sd->max_newidle_lb_cost =
> > > +				(sd->max_newidle_lb_cost * 254) / 256;
> > 
> > I initially picked 0.5%, but after trying it out, it appears to decay very
> > slowing when the max is at a high value. Should we increase the decay a
> > little bit more? Maybe something like:
> > 
> > sd->max_newidle_lb_cost = (sd->max_newidle_lb_cost * 63) / 64;
> 
> So the half-life in either case is is given by:
> 
>   n = ln(1/2) / ln(x)
> 
> which gives 88 seconds for x := 254/256 or 44 seconds for x := 63/64.
> 
> I don't really care too much, but obviously something like:
> 
>  256*exp(ln(.5)/60) ~= 253
> 
> Is attractive ;-)
> 
> > > +		/*
> > > +		 * Stop the load balance at this level. There is another
> > > +		 * CPU in our sched group which is doing load balancing more
> > > +		 * actively.
> > > +		 */
> > > +		if (!continue_balancing) {
> > 
> > Is "continue_balancing" named "balance" in older kernels?
> 
> Yeah, this patch crossed paths with a series remodeling the
> load-balancer a bit, that should all be pushed-out to tip/master.
> 
> In particular see commit: 
>   23f0d20 sched: Factor out code to should_we_balance()
> 
> > Here are the AIM7 results with the other 2 patches + this patch with the
> > slightly higher decay value.
> 
> Just to clarify, 'this patch' is the one I sent?

Yes, I was referring to the one you sent out. Also, I did the
s/smp_processor_id()/this_cpu/ on patch 2.



  reply	other threads:[~2013-09-09 20:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29 20:05 [PATCH v4 0/3] sched: Limiting idle balance Jason Low
2013-08-29 20:05 ` [PATCH v4 1/3] sched: Reduce overestimating rq->avg_idle Jason Low
2013-09-02  6:36   ` Srikar Dronamraju
2013-08-29 20:05 ` [PATCH v4 2/3] sched: Consider max cost of idle balance per sched domain Jason Low
2013-08-30  9:46   ` Peter Zijlstra
2013-09-02  6:54   ` Srikar Dronamraju
2013-09-03 21:06     ` Jason Low
2013-08-29 20:05 ` [RFC][PATCH v4 3/3] sched: Periodically decay max cost of idle balance Jason Low
2013-08-30 10:18   ` Peter Zijlstra
2013-08-30 10:29     ` Peter Zijlstra
2013-09-04  6:02       ` Jason Low
2013-09-09 11:44         ` Peter Zijlstra
2013-09-09 20:40           ` Jason Low [this message]
2013-09-04  7:10     ` Jason Low
2013-09-09 11:49       ` Peter Zijlstra
2013-09-09 21:07         ` Jason Low
2013-09-10  1:40           ` Mike Galbraith
2013-09-12 10:31 ` [PATCH v4 0/3] sched: Limiting " 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=1378759233.10318.4.camel@j-VirtualBox \
    --to=jason.low2@hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=aswin@hp.com \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --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 \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.