All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Liu <iwtbavbm@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, mingo@redhat.com,
	dietmar.eggemann@arm.com, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, rostedt@goodmis.org,
	bsegall@google.com, mgorman@suse.de, qais.yousef@arm.com,
	morten.rasmussen@arm.com, valentin.schneider@arm.com
Subject: Re: [PATCH v2] sched/fair: fix sgc->{min,max}_capacity miscalculate
Date: Mon, 6 Jan 2020 22:52:27 +0800	[thread overview]
Message-ID: <20200106145227.GB15532@iZj6chx1xj0e0buvshuecpZ> (raw)
In-Reply-To: <20200106102341.GM2810@hirez.programming.kicks-ass.net>

On Mon, Jan 06, 2020 at 11:23:41AM +0100, Peter Zijlstra wrote:
> On Sat, Jan 04, 2020 at 09:08:28PM +0800, Peng Liu wrote:
> > commit bf475ce0a3dd ("sched/fair: Add per-CPU min capacity to
> > sched_group_capacity") introduced per-cpu min_capacity.
> > 
> > commit e3d6d0cb66f2 ("sched/fair: Add sched_group per-CPU max capacity")
> > introduced per-cpu max_capacity.
> > 
> > Here, capacity is the accumulated sum of (maybe) many CPUs' capacity.
> > Compare with capacity to get {min,max}_capacity makes no sense. Instead,
> > we should compare one by one in each iteration to get
> > sgc->{min,max}_capacity of the group.
> > 
> > Also, the only CPU in rq->sd->groups should be rq's CPU. Thus,
> > capacity_of(cpu_of(rq)) should be equal to rq->sd->groups->sgc->capacity.
> > Code can be simplified by removing the if/else.
> > 
> > Signed-off-by: Peng Liu <iwtbavbm@gmail.com>
> > Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
> > ---
> > v1: https://lkml.org/lkml/2019/12/30/502
> 
> Please (for future use); use the form:
> 
>   https://lkml.kernel.org/r/$msgid

Peter, thanks, I will.

> 

  reply	other threads:[~2020-01-06 14:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-04 13:08 [PATCH v2] sched/fair: fix sgc->{min,max}_capacity miscalculate Peng Liu
2020-01-06  9:25 ` Dietmar Eggemann
2020-01-06 10:28   ` Peter Zijlstra
2020-01-06 14:49   ` Peng Liu
2020-01-06 10:23 ` Peter Zijlstra
2020-01-06 14:52   ` Peng Liu [this message]
2020-01-17 10:08 ` [tip: sched/core] sched/fair: Fix sgc->{min,max}_capacity calculation for SD_OVERLAP tip-bot2 for Peng Liu

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=20200106145227.GB15532@iZj6chx1xj0e0buvshuecpZ \
    --to=iwtbavbm@gmail.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=morten.rasmussen@arm.com \
    --cc=peterz@infradead.org \
    --cc=qais.yousef@arm.com \
    --cc=rostedt@goodmis.org \
    --cc=valentin.schneider@arm.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 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.