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>,
linux-pm@vger.kernel.org,
Vincent Guittot <vincent.guittot@linaro.org>,
linux-kernel@vger.kernel.org, smuckle.linux@gmail.com,
juri.lelli@arm.com, Morten.Rasmussen@arm.com,
patrick.bellasi@arm.com, eas-dev@lists.linaro.org
Subject: Re: [PATCH V2 0/4] sched: cpufreq: Allow remote callbacks
Date: Thu, 13 Jul 2017 01:22:09 +0200 [thread overview]
Message-ID: <2305602.EUg3iPzbWS@aspire.rjw.lan> (raw)
In-Reply-To: <cover.1498712046.git.viresh.kumar@linaro.org>
On Thursday, June 29, 2017 10:56:29 AM Viresh Kumar wrote:
> Hi,
>
> Here is the second version of this series. The first [1] version was
> sent several months back.
>
> With Android UI and benchmarks the latency of cpufreq response to
> certain scheduling events can become very critical. Currently, callbacks
> into schedutil are only made from the scheduler if the target CPU of the
> event is the same as the current CPU. This means there are certain
> situations where a target CPU may not run schedutil for some time.
>
> One testcase to show this behavior is where a task starts running on
> CPU0, then a new task is also spawned on CPU0 by a task on CPU1. If the
> system is configured such that new tasks should receive maximum demand
> initially, this should result in CPU0 increasing frequency immediately.
> Because of the above mentioned limitation though this does not occur.
> This is verified using ftrace with the sample [2] application.
>
> Maybe the ideal solution is to always allow remote callbacks but that
> has its own challenges:
>
> o There is no protection required for single CPU per policy case today,
> and adding any kind of locking there, to supply remote callbacks,
> isn't really a good idea.
>
> o If is local CPU isn't part of the same cpufreq policy as the target
> CPU, then we wouldn't be able to do fast switching at all and have to
> use some kind of bottom half to schedule work on the target CPU to do
> real switching. That may be overkill as well.
>
>
> Taking above challenges into consideration, this version proposes a much
> simpler diff as compared to the first version.
>
> This series only allows remote callbacks for target CPUs that share the
> cpufreq policy with the local CPU. Locking is mostly in place everywhere
> and we wouldn't be required to change a lot of things.
>
> This series is tested with couple of usecases (Android: hackbench,
> recentfling, galleryfling, vellamo, Ubuntu: hackbench) on ARM hikey
> board (64 bit octa-core, single policy). Only galleryfling showed minor
> improvements, while others didn't had much deviation.
>
> The reason being that this patchset only targets a corner case, where
> following are required to be true to improve performance and that
> doesn't happen too often with these tests:
>
> - Task is migrated to another CPU.
> - The task has maximum demand initially, and should take the CPU to
> higher OPPs.
> - And the target CPU doesn't call into schedutil until the next tick.
>
>
> V1->V2:
> - Don't support remote callbacks for unshared cpufreq policies.
> - Don't support remote callbacks where local CPU isn't part of the
> target CPU's cpufreq policy.
> - Dropped dvfs_possible_from_any_cpu flag.
I would rearrange the changes.
You need two patches for that IMO, one moving the smp_processor_id() check from
the callers of cpufreq_update_util()/cpufreq_update_this_cpu() to the callbacks
in all governors and the other one modifying schedutil to work with cross-CPU
updates.
That at least would reduce the confusion factor somewhat. :-)
Thanks,
Rafael
prev parent reply other threads:[~2017-07-12 23:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-29 5:26 Viresh Kumar
2017-06-29 5:26 ` [PATCH V2 1/4] cpufreq: schedutil: Process remote callback for shared policies Viresh Kumar
2017-06-29 5:26 ` [PATCH V2 2/4] cpufreq: governor: " Viresh Kumar
2017-06-29 5:26 ` [PATCH V2 3/4] intel_pstate: Ignore scheduler cpufreq callbacks on remote CPUs Viresh Kumar
2017-06-29 21:23 ` Srinivas Pandruvada
2017-06-30 3:27 ` Viresh Kumar
2017-07-12 23:27 ` Rafael J. Wysocki
2017-06-29 5:26 ` [PATCH V2 4/4] sched: cpufreq: Enable remote sched cpufreq callbacks Viresh Kumar
2017-06-29 20:30 ` [PATCH V2 0/4] sched: cpufreq: Allow remote callbacks Rafael J. Wysocki
2017-06-30 3:24 ` Viresh Kumar
2017-07-12 23:22 ` Rafael J. Wysocki [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=2305602.EUg3iPzbWS@aspire.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=Morten.Rasmussen@arm.com \
--cc=eas-dev@lists.linaro.org \
--cc=juri.lelli@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=patrick.bellasi@arm.com \
--cc=peterz@infradead.org \
--cc=smuckle.linux@gmail.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
all inboxes | Powered by JetHome®