From: Yuyang Du <yuyang.du@intel.com>
To: peterz@infradead.org, linux-kernel@vger.kernel.org,
efault@gmx.de, mingo@kernel.org, morten.rasmussen@arm.com,
dietmar.eggemann@arm.com, vincent.guittot@linaro.org
Subject: Re: [tip:sched/core] sched/fair: Correct unit of load_above_capacity
Date: Fri, 13 May 2016 05:48:11 +0800 [thread overview]
Message-ID: <20160512214811.GB8790@intel.com> (raw)
In-Reply-To: <tip-cfa10334318d8212d007da8c771187643c9cef35@git.kernel.org>
On Thu, May 12, 2016 at 03:31:51AM -0700, tip-bot for Morten Rasmussen wrote:
> Commit-ID: cfa10334318d8212d007da8c771187643c9cef35
> Gitweb: http://git.kernel.org/tip/cfa10334318d8212d007da8c771187643c9cef35
> Author: Morten Rasmussen <morten.rasmussen@arm.com>
> AuthorDate: Fri, 29 Apr 2016 20:32:40 +0100
> Committer: Ingo Molnar <mingo@kernel.org>
> CommitDate: Thu, 12 May 2016 09:55:33 +0200
>
> sched/fair: Correct unit of load_above_capacity
>
> In calculate_imbalance() load_above_capacity currently has the unit
> [capacity] while it is used as being [load/capacity]. Not only is it
> wrong it also makes it unlikely that load_above_capacity is ever used
> as the subsequent code picks the smaller of load_above_capacity and
> the avg_load
>
> This patch ensures that load_above_capacity has the right unit
> [load/capacity].
>
> Signed-off-by: Morten Rasmussen <morten.rasmussen@arm.com>
> [ Changed changelog to note it was in capacity unit; +rebase. ]
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Mike Galbraith <efault@gmx.de>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: linux-kernel@vger.kernel.org
> Link: http://lkml.kernel.org/r/1461958364-675-4-git-send-email-dietmar.eggemann@arm.com
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> ---
> kernel/sched/fair.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 2338105..218f8e8 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -7067,9 +7067,11 @@ static inline void calculate_imbalance(struct lb_env *env, struct sd_lb_stats *s
> if (busiest->group_type == group_overloaded &&
> local->group_type == group_overloaded) {
> load_above_capacity = busiest->sum_nr_running * SCHED_CAPACITY_SCALE;
> - if (load_above_capacity > busiest->group_capacity)
> + if (load_above_capacity > busiest->group_capacity) {
> load_above_capacity -= busiest->group_capacity;
> - else
> + load_above_capacity *= NICE_0_LOAD;
> + load_above_capacity /= busiest->group_capacity;
> + } else
> load_above_capacity = ~0UL;
> }
Hi Morten,
I got the feeling this might be wrong, the NICE_0_LOAD should be scaled down.
But I hope I am wrong.
Vincent, could you take a look?
next prev parent reply other threads:[~2016-05-13 5:29 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-29 19:32 [PATCH 0/7] sched/fair: fixes and cleanups Dietmar Eggemann
2016-04-29 19:32 ` [PATCH 1/7] sched/fair: Remove remaining power aware scheduling comments Dietmar Eggemann
2016-05-05 9:42 ` [tip:sched/core] sched/fair: Remove stale " tip-bot for Dietmar Eggemann
2016-04-29 19:32 ` [PATCH 2/7] sched/fair: Fix comment in calculate_imbalance() Dietmar Eggemann
2016-05-05 9:42 ` [tip:sched/core] " tip-bot for Dietmar Eggemann
2016-04-29 19:32 ` [PATCH 3/7] sched/fair: Correct unit of load_above_capacity Dietmar Eggemann
2016-05-03 10:52 ` Peter Zijlstra
2016-05-03 14:56 ` Morten Rasmussen
2016-05-12 10:31 ` [tip:sched/core] " tip-bot for Morten Rasmussen
2016-05-12 21:48 ` Yuyang Du [this message]
2016-05-13 8:22 ` Vincent Guittot
2016-05-19 15:36 ` Morten Rasmussen
2016-05-20 8:17 ` Vincent Guittot
2016-05-23 20:24 ` Yuyang Du
2016-05-30 22:35 ` Yuyang Du
2016-04-29 19:32 ` [PATCH 4/7] sched/fair: Clean up the logic in fix_small_imbalance() Dietmar Eggemann
2016-05-03 10:12 ` Peter Zijlstra
2016-05-03 16:53 ` Dietmar Eggemann
2016-04-29 19:32 ` [PATCH 5/7] sched/fair: Remove cpu_avg_load_per_task() Dietmar Eggemann
2016-04-29 19:32 ` [PATCH 6/7] sched/fair: Reorder code in update_sd_lb_stats() Dietmar Eggemann
2016-04-29 19:32 ` [PATCH 7/7] sched/fair: Use group_cfs_rq(se) instead of se->my_q Dietmar Eggemann
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=20160512214811.GB8790@intel.com \
--to=yuyang.du@intel.com \
--cc=dietmar.eggemann@arm.com \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=morten.rasmussen@arm.com \
--cc=peterz@infradead.org \
--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