From: Ionela Voinescu <ionela.voinescu@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: linux@armlinux.org.uk, catalin.marinas@arm.com, will@kernel.org,
paul.walmsley@sifive.com, palmer@dabbelt.com,
aou@eecs.berkeley.edu, sudeep.holla@arm.com,
gregkh@linuxfoundation.org, rafael@kernel.org, mingo@redhat.com,
peterz@infradead.org, juri.lelli@redhat.com,
dietmar.eggemann@arm.com, rostedt@goodmis.org,
bsegall@google.com, mgorman@suse.de, bristot@redhat.com,
vschneid@redhat.com, viresh.kumar@linaro.org, lenb@kernel.org,
robert.moore@intel.com, lukasz.luba@arm.com,
pierre.gondois@arm.com, beata.michalska@arm.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org,
conor.dooley@microchip.com, suagrfillet@gmail.com,
ajones@ventanamicro.com, lftan@kernel.org
Subject: Re: [PATCH v6 1/7] topology: Add a new arch_scale_freq_reference
Date: Tue, 28 Nov 2023 16:00:03 +0000 [thread overview]
Message-ID: <ZWYOg1gIIgI1qXn7@arm.com> (raw)
In-Reply-To: <ZWYM0hn28RHjAalh@arm.com>
On Tuesday 28 Nov 2023 at 15:52:52 (+0000), Ionela Voinescu wrote:
> Hi Vincent,
>
> I have a small request on this patch, which is useful for [1].
> I'll detail what is needed lower in the code.
>
> [1] https://lore.kernel.org/lkml/ZWYDr6JJJzBvsqf0@arm.com/
>
> On Thursday 09 Nov 2023 at 11:14:32 (+0100), Vincent Guittot wrote:
> > @@ -279,13 +278,13 @@ void topology_normalize_cpu_scale(void)
> >
> > capacity_scale = 1;
> > for_each_possible_cpu(cpu) {
> > - capacity = raw_capacity[cpu] * per_cpu(freq_factor, cpu);
> > + capacity = raw_capacity[cpu] * per_cpu(capacity_freq_ref, cpu);
>
> The only affected code that I could find is here and below.
>
> The above line would have to change to:
> capacity = raw_capacity[cpu] * per_cpu(capacity_freq_ref, cpu) ?: 1;
>
> > capacity_scale = max(capacity, capacity_scale);
> > }
> >
> > pr_debug("cpu_capacity: capacity_scale=%llu\n", capacity_scale);
> > for_each_possible_cpu(cpu) {
> > - capacity = raw_capacity[cpu] * per_cpu(freq_factor, cpu);
> > + capacity = raw_capacity[cpu] * per_cpu(capacity_freq_ref, cpu);
>
> and here:
> capacity = raw_capacity[cpu] * per_cpu(capacity_freq_ref, cpu) ?: 1;
>
> I think it's nicer to start with capacity_freq_ref as 0 and compensate here
> for uninitialized capacity_freq_ref.
>
> Let me know if this is alright of if you'd prefer us to make this change
> in a separate patch.
>
> Thanks,
> Ionela.
>
Correction - both will need to be:
capacity = raw_capacity[cpu] * (per_cpu(capacity_freq_ref, cpu) ?: 1);
Thanks,
Ionela.
WARNING: multiple messages have this Message-ID (diff)
From: Ionela Voinescu <ionela.voinescu@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: linux@armlinux.org.uk, catalin.marinas@arm.com, will@kernel.org,
paul.walmsley@sifive.com, palmer@dabbelt.com,
aou@eecs.berkeley.edu, sudeep.holla@arm.com,
gregkh@linuxfoundation.org, rafael@kernel.org, mingo@redhat.com,
peterz@infradead.org, juri.lelli@redhat.com,
dietmar.eggemann@arm.com, rostedt@goodmis.org,
bsegall@google.com, mgorman@suse.de, bristot@redhat.com,
vschneid@redhat.com, viresh.kumar@linaro.org, lenb@kernel.org,
robert.moore@intel.com, lukasz.luba@arm.com,
pierre.gondois@arm.com, beata.michalska@arm.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org,
conor.dooley@microchip.com, suagrfillet@gmail.com,
ajones@ventanamicro.com, lftan@kernel.org
Subject: Re: [PATCH v6 1/7] topology: Add a new arch_scale_freq_reference
Date: Tue, 28 Nov 2023 16:00:03 +0000 [thread overview]
Message-ID: <ZWYOg1gIIgI1qXn7@arm.com> (raw)
In-Reply-To: <ZWYM0hn28RHjAalh@arm.com>
On Tuesday 28 Nov 2023 at 15:52:52 (+0000), Ionela Voinescu wrote:
> Hi Vincent,
>
> I have a small request on this patch, which is useful for [1].
> I'll detail what is needed lower in the code.
>
> [1] https://lore.kernel.org/lkml/ZWYDr6JJJzBvsqf0@arm.com/
>
> On Thursday 09 Nov 2023 at 11:14:32 (+0100), Vincent Guittot wrote:
> > @@ -279,13 +278,13 @@ void topology_normalize_cpu_scale(void)
> >
> > capacity_scale = 1;
> > for_each_possible_cpu(cpu) {
> > - capacity = raw_capacity[cpu] * per_cpu(freq_factor, cpu);
> > + capacity = raw_capacity[cpu] * per_cpu(capacity_freq_ref, cpu);
>
> The only affected code that I could find is here and below.
>
> The above line would have to change to:
> capacity = raw_capacity[cpu] * per_cpu(capacity_freq_ref, cpu) ?: 1;
>
> > capacity_scale = max(capacity, capacity_scale);
> > }
> >
> > pr_debug("cpu_capacity: capacity_scale=%llu\n", capacity_scale);
> > for_each_possible_cpu(cpu) {
> > - capacity = raw_capacity[cpu] * per_cpu(freq_factor, cpu);
> > + capacity = raw_capacity[cpu] * per_cpu(capacity_freq_ref, cpu);
>
> and here:
> capacity = raw_capacity[cpu] * per_cpu(capacity_freq_ref, cpu) ?: 1;
>
> I think it's nicer to start with capacity_freq_ref as 0 and compensate here
> for uninitialized capacity_freq_ref.
>
> Let me know if this is alright of if you'd prefer us to make this change
> in a separate patch.
>
> Thanks,
> Ionela.
>
Correction - both will need to be:
capacity = raw_capacity[cpu] * (per_cpu(capacity_freq_ref, cpu) ?: 1);
Thanks,
Ionela.
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
From: Ionela Voinescu <ionela.voinescu@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: linux@armlinux.org.uk, catalin.marinas@arm.com, will@kernel.org,
paul.walmsley@sifive.com, palmer@dabbelt.com,
aou@eecs.berkeley.edu, sudeep.holla@arm.com,
gregkh@linuxfoundation.org, rafael@kernel.org, mingo@redhat.com,
peterz@infradead.org, juri.lelli@redhat.com,
dietmar.eggemann@arm.com, rostedt@goodmis.org,
bsegall@google.com, mgorman@suse.de, bristot@redhat.com,
vschneid@redhat.com, viresh.kumar@linaro.org, lenb@kernel.org,
robert.moore@intel.com, lukasz.luba@arm.com,
pierre.gondois@arm.com, beata.michalska@arm.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org,
conor.dooley@microchip.com, suagrfillet@gmail.com,
ajones@ventanamicro.com, lftan@kernel.org
Subject: Re: [PATCH v6 1/7] topology: Add a new arch_scale_freq_reference
Date: Tue, 28 Nov 2023 16:00:03 +0000 [thread overview]
Message-ID: <ZWYOg1gIIgI1qXn7@arm.com> (raw)
In-Reply-To: <ZWYM0hn28RHjAalh@arm.com>
On Tuesday 28 Nov 2023 at 15:52:52 (+0000), Ionela Voinescu wrote:
> Hi Vincent,
>
> I have a small request on this patch, which is useful for [1].
> I'll detail what is needed lower in the code.
>
> [1] https://lore.kernel.org/lkml/ZWYDr6JJJzBvsqf0@arm.com/
>
> On Thursday 09 Nov 2023 at 11:14:32 (+0100), Vincent Guittot wrote:
> > @@ -279,13 +278,13 @@ void topology_normalize_cpu_scale(void)
> >
> > capacity_scale = 1;
> > for_each_possible_cpu(cpu) {
> > - capacity = raw_capacity[cpu] * per_cpu(freq_factor, cpu);
> > + capacity = raw_capacity[cpu] * per_cpu(capacity_freq_ref, cpu);
>
> The only affected code that I could find is here and below.
>
> The above line would have to change to:
> capacity = raw_capacity[cpu] * per_cpu(capacity_freq_ref, cpu) ?: 1;
>
> > capacity_scale = max(capacity, capacity_scale);
> > }
> >
> > pr_debug("cpu_capacity: capacity_scale=%llu\n", capacity_scale);
> > for_each_possible_cpu(cpu) {
> > - capacity = raw_capacity[cpu] * per_cpu(freq_factor, cpu);
> > + capacity = raw_capacity[cpu] * per_cpu(capacity_freq_ref, cpu);
>
> and here:
> capacity = raw_capacity[cpu] * per_cpu(capacity_freq_ref, cpu) ?: 1;
>
> I think it's nicer to start with capacity_freq_ref as 0 and compensate here
> for uninitialized capacity_freq_ref.
>
> Let me know if this is alright of if you'd prefer us to make this change
> in a separate patch.
>
> Thanks,
> Ionela.
>
Correction - both will need to be:
capacity = raw_capacity[cpu] * (per_cpu(capacity_freq_ref, cpu) ?: 1);
Thanks,
Ionela.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-11-28 16:00 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-09 10:14 [PATCH v6 0/7] consolidate and cleanup CPU capacity Vincent Guittot
2023-11-09 10:14 ` Vincent Guittot
2023-11-09 10:14 ` Vincent Guittot
2023-11-09 10:14 ` [PATCH v6 1/7] topology: Add a new arch_scale_freq_reference Vincent Guittot
2023-11-09 10:14 ` Vincent Guittot
2023-11-09 10:14 ` Vincent Guittot
2023-11-28 15:52 ` Ionela Voinescu
2023-11-28 15:52 ` Ionela Voinescu
2023-11-28 15:52 ` Ionela Voinescu
2023-11-28 16:00 ` Ionela Voinescu [this message]
2023-11-28 16:00 ` Ionela Voinescu
2023-11-28 16:00 ` Ionela Voinescu
2023-11-29 14:57 ` Vincent Guittot
2023-11-29 14:57 ` Vincent Guittot
2023-11-29 14:57 ` Vincent Guittot
2023-11-09 10:14 ` [PATCH v6 2/7] cpufreq: Use the fixed and coherent frequency for scaling capacity Vincent Guittot
2023-11-09 10:14 ` Vincent Guittot
2023-11-09 10:14 ` Vincent Guittot
2023-11-09 10:14 ` [PATCH v6 3/7] cpufreq/schedutil: Use a fixed reference frequency Vincent Guittot
2023-11-09 10:14 ` Vincent Guittot
2023-11-09 10:14 ` Vincent Guittot
2023-11-10 9:17 ` Viresh Kumar
2023-11-10 9:17 ` Viresh Kumar
2023-11-10 9:17 ` Viresh Kumar
2023-11-09 10:14 ` [PATCH v6 4/7] energy_model: " Vincent Guittot
2023-11-09 10:14 ` Vincent Guittot
2023-11-09 10:14 ` Vincent Guittot
2023-11-09 10:14 ` [PATCH v6 5/7] cpufreq/cppc: Move and rename cppc_cpufreq_{perf_to_khz|khz_to_perf} Vincent Guittot
2023-11-09 10:14 ` Vincent Guittot
2023-11-09 10:14 ` Vincent Guittot
2023-11-10 9:17 ` Viresh Kumar
2023-11-10 9:17 ` Viresh Kumar
2023-11-10 9:17 ` Viresh Kumar
2023-11-09 10:14 ` [PATCH v6 6/7] cpufreq/cppc: Set the frequency used for computing the capacity Vincent Guittot
2023-11-09 10:14 ` Vincent Guittot
2023-11-09 10:14 ` Vincent Guittot
2023-11-10 9:18 ` Viresh Kumar
2023-11-10 9:18 ` Viresh Kumar
2023-11-10 9:18 ` Viresh Kumar
2023-11-09 10:14 ` [PATCH v6 7/7] arm64/amu: Use capacity_ref_freq to set AMU ratio Vincent Guittot
2023-11-09 10:14 ` Vincent Guittot
2023-11-09 10:14 ` Vincent Guittot
2023-11-14 13:06 ` Beata Michalska
2023-11-14 13:06 ` Beata Michalska
2023-11-14 13:06 ` Beata Michalska
2023-11-15 9:42 ` Beata Michalska
2023-11-15 9:42 ` Beata Michalska
2023-11-15 9:42 ` Beata Michalska
2023-11-21 15:43 ` Will Deacon
2023-11-21 15:43 ` Will Deacon
2023-11-21 15:43 ` Will Deacon
2023-11-10 8:30 ` [PATCH v6 0/7] consolidate and cleanup CPU capacity Pierre Gondois
2023-11-10 8:30 ` Pierre Gondois
2023-11-10 8:30 ` Pierre Gondois
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=ZWYOg1gIIgI1qXn7@arm.com \
--to=ionela.voinescu@arm.com \
--cc=ajones@ventanamicro.com \
--cc=aou@eecs.berkeley.edu \
--cc=beata.michalska@arm.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=catalin.marinas@arm.com \
--cc=conor.dooley@microchip.com \
--cc=dietmar.eggemann@arm.com \
--cc=gregkh@linuxfoundation.org \
--cc=juri.lelli@redhat.com \
--cc=lenb@kernel.org \
--cc=lftan@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=lukasz.luba@arm.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=peterz@infradead.org \
--cc=pierre.gondois@arm.com \
--cc=rafael@kernel.org \
--cc=robert.moore@intel.com \
--cc=rostedt@goodmis.org \
--cc=suagrfillet@gmail.com \
--cc=sudeep.holla@arm.com \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
--cc=vschneid@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.