From: Hongyan Xia <hongyan.xia2@arm.com>
To: David Dai <davidai@google.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Sudeep Holla <sudeep.holla@arm.com>,
Saravana Kannan <saravanak@google.com>
Cc: Quentin Perret <qperret@google.com>,
Masami Hiramatsu <mhiramat@google.com>,
Will Deacon <will@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Vincent Guittot <vincent.guittot@linaro.org>,
Marc Zyngier <maz@kernel.org>,
Oliver Upton <oliver.upton@linux.dev>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Pavan Kondeti <quic_pkondeti@quicinc.com>,
Gupta Pankaj <pankaj.gupta@amd.com>, Mel Gorman <mgorman@suse.de>,
kernel-team@android.com, linux-pm@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 0/2] Improve VM CPUfreq and task placement behavior
Date: Mon, 13 Nov 2023 12:20:29 +0000 [thread overview]
Message-ID: <438c96fd-bcb0-4699-b81b-40f800cedca0@arm.com> (raw)
In-Reply-To: <20231111014933.1934562-1-davidai@google.com>
Hi David,
On 11/11/2023 01:49, David Dai wrote:
> Hi,
>
> This patch series is a continuation of the talk Saravana gave at LPC 2022
> titled "CPUfreq/sched and VM guest workload problems" [1][2][3]. The gist
> of the talk is that workloads running in a guest VM get terrible task
> placement and CPUfreq behavior when compared to running the same workload
> in the host. Effectively, no EAS(Energy Aware Scheduling) for threads
> inside VMs. This would make power and performance terrible just by running
> the workload in a VM even if we assume there is zero virtualization
> overhead.
>
> With this series, a workload running in a VM gets the same task placement
> and CPUfreq behavior as it would when running in the host.
>
> The idea is to improve VM CPUfreq/sched behavior by:
> - Having guest kernel do accurate load tracking by taking host CPU
> arch/type and frequency into account.
> - Sharing vCPU frequency requirements with the host so that the
> host can do proper frequency scaling and task placement on the host side.
>
> Based on feedback from RFC v1 proposal[4], we've revised our
> implementation to using MMIO reads and writes to pass information
> from/to host instead of using hypercalls. In our example, the
> VMM(Virtual Machine Manager) translates the frequency requests into
> Uclamp_min and applies it to the vCPU thread as a hint to the host
> kernel.
Sorry for not noticing this series until now.
The problem you are having with uclamp is actually the same as what
I'm tackling right now. Basically my conclusion so far is that uclamp
max aggregation faces quite many problems, which can be easily solved by
sum aggregation (summing up the clamped utilization values instead of
applying the max uclamp value to the whole rq):
https://lore.kernel.org/all/cover.1696345700.git.Hongyan.Xia2@arm.com/
What you described as util_guest sounds to me as exactly what uclamp_min
under sum aggregation does. I'm really tempted to ask you to apply my
series and see if the new uclamp_min does what you want, instead of
introducing a new util_guest signal. If you have no time for this I can
try to replicate your setup and do the experiments myself.
Also, my knowledge with KVM is limited. May I know where the vCPU fork
happens? Can't you just set the p->sched_reset_on_fork flag on fork to
not carry forward the uclamp values?
>
> [...]
Hongyan
next prev parent reply other threads:[~2023-11-13 12:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-11 1:49 David Dai
2023-11-11 1:49 ` [PATCH v4 1/2] dt-bindings: cpufreq: add virtual cpufreq device David Dai
2023-11-15 6:27 ` Viresh Kumar
2023-11-16 16:22 ` Rob Herring
2023-11-15 8:49 ` Marc Zyngier
2023-12-07 22:44 ` Saravana Kannan
2023-12-08 8:52 ` Marc Zyngier
2024-01-12 22:02 ` Saravana Kannan
2024-01-13 9:37 ` Marc Zyngier
2024-01-16 23:47 ` Saravana Kannan
2023-12-08 12:45 ` Sudeep Holla
2024-01-12 22:15 ` Saravana Kannan
2024-01-15 16:28 ` Hongyan Xia
2023-11-11 1:49 ` [PATCH v4 2/2] cpufreq: add virtual-cpufreq driver David Dai
2023-11-15 6:29 ` Viresh Kumar
2023-12-08 1:18 ` David Dai
2023-12-08 9:51 ` Viresh Kumar
2024-01-15 16:58 ` Hongyan Xia
2023-11-13 12:20 ` Hongyan Xia [this message]
2023-11-13 12:26 ` [PATCH v4 0/2] Improve VM CPUfreq and task placement behavior Marc Zyngier
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=438c96fd-bcb0-4699-b81b-40f800cedca0@arm.com \
--to=hongyan.xia2@arm.com \
--cc=conor+dt@kernel.org \
--cc=davidai@google.com \
--cc=devicetree@vger.kernel.org \
--cc=dietmar.eggemann@arm.com \
--cc=kernel-team@android.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=maz@kernel.org \
--cc=mgorman@suse.de \
--cc=mhiramat@google.com \
--cc=oliver.upton@linux.dev \
--cc=pankaj.gupta@amd.com \
--cc=peterz@infradead.org \
--cc=qperret@google.com \
--cc=quic_pkondeti@quicinc.com \
--cc=rafael@kernel.org \
--cc=robh+dt@kernel.org \
--cc=saravanak@google.com \
--cc=sudeep.holla@arm.com \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
--cc=will@kernel.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®