From: Vincent Guittot <vincent.guittot@linaro.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, kernellwp@gmail.com
Subject: Re: [PATCH] sched/schedutil : optimize utilization scaling for guest kernel
Date: Wed, 29 Aug 2018 16:06:38 +0200 [thread overview]
Message-ID: <20180829140638.GA7483@linaro.org> (raw)
In-Reply-To: <20180829124503.GU24124@hirez.programming.kicks-ass.net>
Le Wednesday 29 Aug 2018 à 14:45:03 (+0200), Peter Zijlstra a écrit :
> On Wed, Aug 29, 2018 at 10:51:42AM +0200, Vincent Guittot wrote:
> > Scaling the utilization of CPUs with irq util_avg in schedutil doesn't give
> > any benefit and just waste CPU cycles when irq time is not accounted but
> > only steal time.
> > Add an internal _scale_irq_capacity() for scale_rt_capacity but scale
> > cpu utilization in schedutil only if we are accounting irq time.
>
> This makes a mess of things; also it doesn't really do what it says.
you're right. I forgot to not add irq util_avg in this case.
What about the below instead ?
sched/schedutil : optimize computation of utilization in schedutil
Scaling the utilization of CPUs with irq util_avg in schedutil doesn't give
any benefit and just waste CPU cycles when irq time is not accounted but
only steal time.
Skip the irq scaling when irq time is not accounted
Suggested-by: Wanpeng Li <kernellwp@gmail.com>
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
---
kernel/sched/cpufreq_schedutil.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
index 3fffad3..edbc4d2 100644
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -238,6 +238,7 @@ static unsigned long sugov_get_util(struct sugov_cpu *sg_cpu)
if ((util + cpu_util_dl(rq)) >= max)
return max;
+#ifdef CONFIG_IRQ_TIME_ACCOUNTING
/*
* There is still idle time; further improve the number by using the
* irq metric. Because IRQ/steal time is hidden from the task clock we
@@ -249,6 +250,7 @@ static unsigned long sugov_get_util(struct sugov_cpu *sg_cpu)
*/
util = scale_irq_capacity(util, irq, max);
util += irq;
+#endif
/*
* Bandwidth required by DEADLINE must always be granted while, for
--
2.7.4
>
> Even if we have CONFIG_IRQ_TIME_ACCOUNTING, that doesn't mean we do it,
> just that it is capable.
>
>
prev parent reply other threads:[~2018-08-29 14:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-29 8:51 [PATCH] sched/schedutil : optimize utilization scaling for guest kernel Vincent Guittot
2018-08-29 12:45 ` Peter Zijlstra
2018-08-29 14:06 ` Vincent Guittot [this message]
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=20180829140638.GA7483@linaro.org \
--to=vincent.guittot@linaro.org \
--cc=kernellwp@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.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).