[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0hUiWFcu17tJfQcrNra6edBQ2tXTfP8rg7ZjHTdCDoMfw@mail.gmail.com>
Date: Fri, 30 Aug 2024 13:10:55 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Shrikanth Hegde <sshegde@...ux.ibm.com>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>, x86 Maintainers <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>, Linux PM <linux-pm@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>, Peter Zijlstra <peterz@...radead.org>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
"Rafael J. Wysocki" <rafael@...nel.org>, Dietmar Eggemann <dietmar.eggemann@....com>,
Ricardo Neri <ricardo.neri@...el.com>, Tim Chen <tim.c.chen@...el.com>
Subject: Re: [PATCH v3 2/2] cpufreq: intel_pstate: Set asymmetric CPU capacity
on hybrid systems
On Fri, Aug 30, 2024 at 10:30 AM Shrikanth Hegde <sshegde@...ux.ibm.com> wrote:
>
>
>
> On 8/28/24 17:18, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> >
> [...]
> >
> > +static void hybrid_update_capacity(struct cpudata *cpu)
> > +{
> > + unsigned int max_cap_perf;
> > +
> > + mutex_lock(&hybrid_capacity_lock);
> > +
> > + if (!hybrid_max_perf_cpu)
> > + goto unlock;
> > +
> > + /*
> > + * The maximum performance of the CPU may have changed, but assume
> > + * that the performance of the other CPUs has not changed.
> > + */
> > + max_cap_perf = hybrid_max_perf_cpu->capacity_perf;
> > +
> > + intel_pstate_get_hwp_cap(cpu);
> > +
> > + hybrid_get_capacity_perf(cpu);
> > + /* Should hybrid_max_perf_cpu be replaced by this CPU? */
> > + if (cpu->capacity_perf > max_cap_perf) {
> > + hybrid_max_perf_cpu = cpu;
> > + hybrid_set_capacity_of_cpus();
> > + goto unlock;
> > + }
> > +
> > + /* If this CPU is hybrid_max_perf_cpu, should it be replaced? */
> > + if (cpu == hybrid_max_perf_cpu && cpu->capacity_perf < max_cap_perf) {
> > + hybrid_update_cpu_scaling();
> > + goto unlock;
> > + }
>
> I assume this CPU capacity is based on freq. It doesnt change based on
> irq, any upper scheduler classes such dl, rt right?
Right.
It is based on how many instructions per cycle the CPU can execute,
which does not change at all, and what its maximum possible frequency
is.
> can capacity_perf change slightly or it can change such that it always
> changes to next possible level? The reason, if it can change slightly,
> but cpu is still hybrid_max_perf_cpu, it would end up accessing all the
> percpu structures and change it, that would be costly on larger systems.
This should only change when the maximum voltage that can be supplied
to the CPU changes, so always to the next level.
Powered by blists - more mailing lists