From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org,
Vincent Guittot <vincent.guittot@linaro.org>
Subject: Re: [PATCH] cpufreq: schedutil: govern how frequently we change frequency with rate_limit
Date: Wed, 15 Feb 2017 23:52:49 +0100 [thread overview]
Message-ID: <4960111.i7trI6xaX7@aspire.rjw.lan> (raw)
In-Reply-To: <6429586.HoWBhxDx3r@aspire.rjw.lan>
On Wednesday, February 15, 2017 11:35:29 PM Rafael J. Wysocki wrote:
> On Wednesday, February 15, 2017 10:45:47 PM Viresh Kumar wrote:
>
> First of all, [RFC] pretty please on things like this.
>
> > For an ideal system (where frequency change doesn't incur any penalty)
> > we would like to change the frequency as soon as the load changes for a
> > CPU. But the systems we have to work with are far from ideal and it
> > takes time to change the frequency of a CPU. For many ARM platforms
> > specially, it is at least 1 ms. In order to not spend too much time
> > changing frequency, we have earlier introduced a sysfs controlled
> > tunable for the schedutil governor: rate_limit_us.
> >
> > Currently, rate_limit_us controls how frequently we reevaluate frequency
> > for a set of CPUs controlled by a cpufreq policy. But that may not be
> > the ideal behavior we want.
> >
> > Consider for example the following scenario. The rate_limit_us tunable
> > is set to 10 ms. The CPU has a constant load X and that requires the
> > frequency to be set to Y. The schedutil governor changes the frequency
> > to Y, updates last_freq_update_time and we wait for 10 ms to reevaluate
> > the frequency again. After 10 ms, the schedutil governor reevaluates the
> > load and finds it to be the same. And so it doesn't update the
> > frequency, but updates last_freq_update_time before returning. Right
> > after this point, the scheduler puts more load on the CPU and the CPU
> > needs to go to a higher frequency Z. Because last_freq_update_time was
> > updated just now, the schedutil governor waits for additional 10ms
> > before reevaluating the load again.
> >
> > Normally, the time it takes to reevaluate the frequency is negligible
> > compared to the time it takes to change the frequency.
>
> This should be "the time it takes to reevaluate the load is negligible
> relative to the time it takes to change the frequency" I suppose?
>
> Specifically, the "to reevaluate the frequency" phrase is ambiguous.
>
> > And considering
> > that in the above scenario, as we haven't updated the frequency for over
> > 10ms, we should have changed the frequency as soon as the load changed.
>
> Why should we?
>
> > This patch changes the way rate_limit_us is used, i.e. It now governs
> > "How frequently we change the frequency" instead of "How frequently we
> > reevaluate the frequency".
>
> That's questionable IMO.
It actually changes the meaning of rate_limit_us, which may not be wrong in
principle, but really the question is what its meaning *should* be.
Thanks,
Rafael
next prev parent reply other threads:[~2017-02-15 22:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-15 17:15 Viresh Kumar
2017-02-15 22:35 ` Rafael J. Wysocki
2017-02-15 22:52 ` Rafael J. Wysocki [this message]
2017-02-16 0:02 ` Rafael J. Wysocki
2017-02-16 10:12 ` Viresh Kumar
2017-02-16 12:36 ` Peter Zijlstra
2017-02-17 12:15 ` Rafael J. Wysocki
2017-02-17 12:48 ` Peter Zijlstra
2017-02-20 9:58 ` Viresh Kumar
2017-02-20 13:49 ` Rafael J. Wysocki
2017-02-20 14:53 ` Rafael J. Wysocki
2017-02-16 6:27 ` Viresh Kumar
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=4960111.i7trI6xaX7@aspire.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--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
all inboxes | Powered by JetHome®