From: tip-bot for Vincent Guittot <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mingo@kernel.org, linux-kernel@vger.kernel.org,
vincent.guittot@linaro.org, srikar@linux.vnet.ibm.com,
tglx@linutronix.de, torvalds@linux-foundation.org, hpa@zytor.com,
peterz@infradead.org
Subject: [tip:sched/core] sched/fair: Fix scale_rt_capacity() for SMT
Date: Mon, 10 Sep 2018 03:07:48 -0700 [thread overview]
Message-ID: <tip-287cdaac5700c5b8970d739f73d742d863d3e2ca@git.kernel.org> (raw)
In-Reply-To: <20180904093626.GA23936@linaro.org>
Commit-ID: 287cdaac5700c5b8970d739f73d742d863d3e2ca
Gitweb: https://git.kernel.org/tip/287cdaac5700c5b8970d739f73d742d863d3e2ca
Author: Vincent Guittot <vincent.guittot@linaro.org>
AuthorDate: Tue, 4 Sep 2018 11:36:26 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 10 Sep 2018 10:13:47 +0200
sched/fair: Fix scale_rt_capacity() for SMT
Since commit:
523e979d3164 ("sched/core: Use PELT for scale_rt_capacity()")
scale_rt_capacity() returns the remaining capacity and not a scale factor
to apply on cpu_capacity_orig. arch_scale_cpu() is directly called by
scale_rt_capacity() so we must take the sched_domain argument.
Reported-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: 523e979d3164 ("sched/core: Use PELT for scale_rt_capacity()")
Link: http://lkml.kernel.org/r/20180904093626.GA23936@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/sched/fair.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index c6b7d6daab20..f12d004be6a1 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -7488,10 +7488,10 @@ static inline int get_sd_load_idx(struct sched_domain *sd,
return load_idx;
}
-static unsigned long scale_rt_capacity(int cpu)
+static unsigned long scale_rt_capacity(struct sched_domain *sd, int cpu)
{
struct rq *rq = cpu_rq(cpu);
- unsigned long max = arch_scale_cpu_capacity(NULL, cpu);
+ unsigned long max = arch_scale_cpu_capacity(sd, cpu);
unsigned long used, free;
unsigned long irq;
@@ -7513,7 +7513,7 @@ static unsigned long scale_rt_capacity(int cpu)
static void update_cpu_capacity(struct sched_domain *sd, int cpu)
{
- unsigned long capacity = scale_rt_capacity(cpu);
+ unsigned long capacity = scale_rt_capacity(sd, cpu);
struct sched_group *sdg = sd->groups;
cpu_rq(cpu)->cpu_capacity_orig = arch_scale_cpu_capacity(sd, cpu);
next prev parent reply other threads:[~2018-09-10 10:08 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-29 13:19 [PATCH 0/4] sched/numa: remove unused code Vincent Guittot
2018-08-29 13:19 ` [PATCH 1/4] sched/numa: remove unused code from update_numa_stats() Vincent Guittot
2018-09-04 6:39 ` Srikar Dronamraju
2018-09-10 10:19 ` [tip:sched/core] sched/numa: Remove " tip-bot for Vincent Guittot
2018-08-29 13:19 ` [PATCH 2/4] sched/numa: remove unused nr_running field Vincent Guittot
2018-09-04 6:40 ` Srikar Dronamraju
2018-09-10 10:20 ` [tip:sched/core] sched/numa: Remove unused numa_stats::nr_running field tip-bot for Vincent Guittot
2018-08-29 13:19 ` [RFC PATCH 3/4] sched/topology: remove smt_gain Vincent Guittot
2018-08-29 14:08 ` Qais Yousef
2018-08-29 14:42 ` Vincent Guittot
2018-09-07 12:42 ` Peter Zijlstra
2018-09-10 11:23 ` Qais Yousef
2018-09-04 8:24 ` Srikar Dronamraju
2018-09-04 9:36 ` Vincent Guittot
2018-09-04 10:37 ` Srikar Dronamraju
2018-09-05 7:36 ` Vincent Guittot
2018-09-05 8:50 ` Srikar Dronamraju
2018-09-05 9:11 ` Vincent Guittot
2018-09-05 11:14 ` Srikar Dronamraju
2018-09-06 9:21 ` Vincent Guittot
2018-09-10 11:05 ` Qais Yousef
2018-09-10 10:07 ` tip-bot for Vincent Guittot [this message]
2018-12-11 15:31 ` [tip:sched/core] sched/topology: Remove the ::smt_gain field from 'struct sched_domain' tip-bot for Vincent Guittot
2018-08-29 13:19 ` [RFC PATCH 4/4] sched/topology: remove unused sd param from arch_scale_cpu_capacity() Vincent Guittot
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=tip-287cdaac5700c5b8970d739f73d742d863d3e2ca@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=srikar@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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
Powered by JetHome