linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Preeti U Murthy <preeti@linux.vnet.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	linux-kernel@vger.kernel.org, Mike Galbraith <efault@gmx.de>,
	Paul Turner <pjt@google.com>, Alex Shi <alex.shi@intel.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Morten Rasmussen <morten.rasmussen@arm.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Joonsoo Kim <js1304@gmail.com>
Subject: Re: [PATCH 5/6] sched, fair: Make group power more consitent
Date: Tue, 20 Aug 2013 10:54:07 +0530	[thread overview]
Message-ID: <5212FD77.6030808@linux.vnet.ibm.com> (raw)
In-Reply-To: <20130819103031.GC24092@twins.programming.kicks-ass.net>

Hi Peter,
Thank you for the clarification.

On 08/19/2013 04:00 PM, Peter Zijlstra wrote:
> On Mon, Aug 19, 2013 at 09:47:47AM +0530, Preeti U Murthy wrote:
>> Hi Peter,
>>
>> On 08/16/2013 03:42 PM, Peter Zijlstra wrote:
>>
>> I have a few comments and clarification to seek.
>>
>> 1. How are you ensuring from this patch that sgs->group_power does not
>> change over the course of load balancing?
> 
> Well, we only set it the one time when creating the sgs data.
> 
>>     The only path to update_group_power() where sg->sgp->power gets
>> updated, is from update_sg_lb_stats(). You are updating sgs->group_power
>> in update_sg_lb_stats(). Any change to group->sgp->power will get
>> reflected in sgs->group_power as well right?
> 
> Nope, we set it to whatever value group->sgp->power is at the time of
> sgs 'creation' and live with that value from then on. We do this after
> the possible update_group_power() call.
> 
> That said, it is very rare to have group->sgp->power change during the
> load-balance pass, we would have to trigger the time_after case for
> NEWLY_IDLE and then get a concurrent !NEWLY_IDLE load-balance pass.
> 
> This patch takes away that possibility and uses a consistent group power
> reading for the entire load-balance invocation as well as does away with
> that double dereference all the time.

Fair enough. I overlooked the fact that "group" can be manipulated by
multiple load balancing passes whereas "sgs" is created during every
load balance pass.

> 
>> 2. This point is aside from your patch. In the current implementation,
>> each time the cpu power gets updated in update_cpu_power(), should not
>> the power of the sched_groups comprising of that cpu also get updated?
>> Why wait till the load balancing is done at the sched_domain level of
>> that group, to update its group power?
> 
> What would be the advantage of doing so? We also take snapshots of
> cpu/group/domain load, we don't update those either. Having all that
> dynamically update during the load-balance pass would make it an
> impossible situation. 
> 
> You'd fail to meet progress guarantees that way since you'd never be
> able to pin-point a 'busiest' group/cpu because by the time you've made
> any decision you have to go back to make it again because things might
> have changed again.
> 
> So instead what we do is we take a snapshot and live with that state. If
> the values change so fast that our load-balance pass is invalid by the
> time we're finished, too bad, better luck next time.

Agree. Thank you for the clarifications.

Regards
Preeti U Murthy
> 
> 


  reply	other threads:[~2013-08-20  5:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-16 10:12 [PATCH 0/6] Various load-balance cleanups/optimizations Peter Zijlstra
2013-08-16 10:12 ` [PATCH 1/6] sched: Remove one division operation in find_busiest_queue() Peter Zijlstra
2013-08-16 10:12 ` [PATCH 2/6] sched: Factor out code to should_we_balance() Peter Zijlstra
2013-08-16 10:12 ` [PATCH 3/6] sched: Clean-up struct sd_lb_stat Peter Zijlstra
2013-08-16 10:12 ` [PATCH 4/6] sched, fair: Remove duplicate load_per_task computations Peter Zijlstra
2013-08-16 10:12 ` [PATCH 5/6] sched, fair: Make group power more consitent Peter Zijlstra
2013-08-19  4:17   ` Preeti U Murthy
2013-08-19 10:30     ` Peter Zijlstra
2013-08-20  5:24       ` Preeti U Murthy [this message]
2013-08-16 10:12 ` [PATCH 6/6] sched, fair: Rework and comment the group_imb code Peter Zijlstra
2013-08-16 10:34   ` 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=5212FD77.6030808@linux.vnet.ibm.com \
    --to=preeti@linux.vnet.ibm.com \
    --cc=alex.shi@intel.com \
    --cc=efault@gmx.de \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=js1304@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=morten.rasmussen@arm.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=pjt@google.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;
as well as URLs for NNTP newsgroup(s).