[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0gitV7vk1=-1r57SPaQLFnNLXMrXowKMzvm1ebmhse0-g@mail.gmail.com>
Date: Sat, 11 Oct 2025 14:29:26 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Yaxiong Tian <tianyaxiong@...inos.cn>
Cc: rafael@...nel.org, christian.loehle@....com, dietmar.eggemann@....com,
linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org, lukasz.luba@....com,
srinivas.pandruvada@...ux.intel.com
Subject: Re: [PATCH v1 3/3] cpufreq: intel_pstate: Simplify the energy model
for hybrid systems
On Sat, Oct 11, 2025 at 10:51 AM Yaxiong Tian <tianyaxiong@...inos.cn> wrote:
>
> > Since em_cpu_energy() computes the cost of using a given CPU to
> > do work as a product of the utilization of that CPU and a constant
> > positive cost coefficient supplied through an energy model, EAS
> > evenly distributes the load among CPUs represented by identical
> > one-CPU PDs regardless of what is there in the energy model.
> >
> > Namely, two CPUs represented by identical PDs have the same energy
> > model data and if the PDs are one-CPU, max_util is always equal to the
> > utilization of the given CPU, possibly increased by the utilization
> > of a task that is waking up. The cost coefficient is a monotonically
> > increasing (or at least non-decreasing) function of max_util, so the
> > CPU with higher utilization will generally get a higher (or at least
> > not lower) cost coefficient. After multiplying that coefficient by
> > CPU utilization, the resulting number will always be higher for the
> > CPU with higher utilization. Accordingly, whenever these two CPUs
> > are compared, the cost of running a waking task will always be higher
> > for the CPU with higher utilization which leads to the even distribution
> > of load mentioned above.
> >
> > For this reason, the energy model can be adjusted in arbitrary
> > ways without disturbing the even distribution of load among CPUs
> > represented by indentical one-CPU PDs. In particular, for all of
> > those CPUs, the energy model can provide one cost coefficient that
> > does not depend on the performance level.
>
> But if the cost is a constant that does not depend on performance levels,
> then the energy increment for running a waking task on these CPUs would be
> the same. For example, for a task with utilization u, whether it is placed
> on CPU A or CPU B, since the cost is the same, the energy increment generated
> would be identical. In this case, EAS should not perform load balancing
> between them.
Right, what matters is the delta between base_energy and energy
including the waking task utilization.
I got confused somehow, sorry for the noise.
Powered by blists - more mailing lists