From: Patrick Bellasi <patrick.bellasi@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
"open list:THERMAL" <linux-pm@vger.kernel.org>,
Ingo Molnar <mingo@redhat.com>,
"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
Viresh Kumar <viresh.kumar@linaro.org>,
Juri Lelli <juri.lelli@redhat.com>,
Joel Fernandes <joelaf@google.com>,
Steve Muckle <smuckle@google.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Morten Rasmussen <morten.rasmussen@arm.com>
Subject: Re: [PATCH] sched/fair: schedutil: update only with all info available
Date: Tue, 10 Apr 2018 12:04:12 +0100 [thread overview]
Message-ID: <20180410110412.GG14248@e110439-lin> (raw)
In-Reply-To: <CAKfTPtCkZ1x-LS7sfJ7K2cgsKK=hYnDo1Fi3toPcGT0331Vpog@mail.gmail.com>
Hi Vincent,
On 09-Apr 10:51, Vincent Guittot wrote:
> Hi Patrick
>
> On 6 April 2018 at 19:28, Patrick Bellasi <patrick.bellasi@arm.com> wrote:
> > Schedutil is not properly updated when the first FAIR task wakes up on a
> > CPU and when a RQ is (un)throttled. This is mainly due to the current
> > integration strategy, which relies on updates being triggered implicitly
> > each time a cfs_rq's utilization is updated.
> >
> > Those updates are currently provided (mainly) via
> > cfs_rq_util_change()
> > which is used in:
> > - update_cfs_rq_load_avg()
> > when the utilization of a cfs_rq is updated
> > - {attach,detach}_entity_load_avg()
> > This is done based on the idea that "we should callback schedutil
> > frequently enough" to properly update the CPU frequency at every
> > utilization change.
> >
> > Since this recent schedutil update:
> >
> > commit 8f111bc357aa ("cpufreq/schedutil: Rewrite CPUFREQ_RT support")
> >
> > we use additional RQ information to properly account for FAIR tasks
> > utilization. Specifically, cfs_rq::h_nr_running has to be non-zero
> > in sugov_aggregate_util() to sum up the cfs_rq's utilization.
>
> Isn't the use of cfs_rq::h_nr_running, the root cause of the problem ?
Not really...
> I can now see a lot a frequency changes on my hikey with this new
> condition in sugov_aggregate_util().
> With a rt-app UC that creates a periodic cfs task, I have a lot of
> frequency changes instead of staying at the same frequency
I don't remember a similar behavior... but I'll check better.
> Peter,
> what was your goal with adding the condition "if
> (rq->cfs.h_nr_running)" for the aggragation of CFS utilization
The original intent was to get rid of sched class flags, used to track
which class has tasks runnable from within schedutil. The reason was
to solve some misalignment between scheduler class status and
schedutil status.
The solution, initially suggested by Viresh, and finally proposed by
Peter was to exploit RQ knowledges directly from within schedutil.
The problem is that now schedutil updated depends on two information:
utilization changes and number of RT and CFS runnable tasks.
Thus, using cfs_rq::h_nr_running is not the problem... it's actually
part of a much more clean solution of the code we used to have.
The problem, IMO is that we now depend on other information which
needs to be in sync before calling schedutil... and the patch I
proposed is meant to make it less likely that all the information
required are not aligned (also in the future).
--
#include <best/regards.h>
Patrick Bellasi
next prev parent reply other threads:[~2018-04-10 11:04 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-06 17:28 [PATCH] sched/fair: schedutil: update only with all info available Patrick Bellasi
2018-04-06 23:48 ` Joel Fernandes
2018-04-10 11:44 ` Patrick Bellasi
2018-04-09 8:51 ` Vincent Guittot
2018-04-10 11:04 ` Patrick Bellasi [this message]
2018-04-11 6:57 ` Vincent Guittot
2018-04-11 10:15 ` Patrick Bellasi
2018-04-11 11:56 ` Vincent Guittot
2018-04-11 14:33 ` Patrick Bellasi
2018-04-11 21:34 ` Joel Fernandes
2018-04-12 7:01 ` Vincent Guittot
2018-04-12 18:06 ` Joel Fernandes
2018-04-11 15:14 ` Peter Zijlstra
2018-04-11 15:29 ` Vincent Guittot
2018-04-11 15:37 ` Peter Zijlstra
2018-04-11 15:41 ` Vincent Guittot
2018-04-11 16:00 ` Peter Zijlstra
2018-04-11 16:10 ` Vincent Guittot
2018-04-11 16:15 ` Peter Zijlstra
2018-04-11 16:51 ` Vincent Guittot
2018-04-26 11:15 ` Patrick Bellasi
2018-04-26 11:52 ` Peter Zijlstra
2018-04-11 7:57 ` Vincent Guittot
2018-04-11 9:27 ` Patrick Bellasi
2018-04-11 14:53 ` 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=20180410110412.GG14248@e110439-lin \
--to=patrick.bellasi@arm.com \
--cc=dietmar.eggemann@arm.com \
--cc=joelaf@google.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=morten.rasmussen@arm.com \
--cc=peterz@infradead.org \
--cc=rafael.j.wysocki@intel.com \
--cc=smuckle@google.com \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@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