Re: [PATCH V3] acpi: Allow ignoring _OSC CPPC v2 bit via kernel parameter

Rafael J. Wysocki
2024-06-20T15:40:56Z

On Thu, Jun 20, 2024 at 3:05 AM Aaron Rainbolt <arainbolt@kfocus.org> wrote:
>
> OK, we have done thorough benchmarking of the two patches. In summary,
> they both seem to provide exactly the same performance improvements.
> My initial worry that Rafael's patch didn't deliver the same performance
> improvements was unfounded.

Good to know, thanks!

> The following are the single-core and multi-core scores from running
> Geekbench 5 multiple times on a Carbon Systems Iridium 16 system. The
> first batch of tests was done with an Ubuntu kernel built with with my V3
> proposed patch, while the second batch was done with a kernel build with
> Rafael's proposed patch.
>
> Links to the Geekbench 5 reports can be shared if needed.
>
> _OSC CPPC bit ignore patch (written by Aaron Rainbolt):
> Kernel parameter 'ignore_osc_cppc_bit' set in
> '/etc/default/grub.d/kfocus.cfg'.
> '/sys/devices/system/cpu/cpu*/acpi_cppc' and
> '/proc/sys/kernel/sched_itmt_enabled' both present
>
> | Run | Single | Multi |
> | --- | ------ | ------ |
> | 01 | 1874 | 10475 |
> | 02 | 1831 | 10132 |
> | 03 | 1858 | 10348 |
> | 04 | 1848 | 10370 |
> | 05 | 1831 | 10413 |
> | --- | ------ | ------ |
> | AVG | 1848 | 10348 |
>
>
> intel_pstate CPPC override patch (written by Rafael Wysocki):
> No special kernel parameters set.
> '/sys/devices/system/cpu/cpu*/acpi_cppc' ABSENT,
> '/proc/sys/kernel/sched_itmt_enabled' present
>
> | Run | Single | Multi |
> | --- | ------ | ------ |
> | 01 | 1820 | 10310 |
> | 02 | 1870 | 10303 |
> | 03 | 1867 | 10420 |
> | 04 | 1844 | 10283 |
> | 05 | 1835 | 10451 |
> | --- | ------ | ------ |
> | AVG | 1847 | 10353 |

The problem with ignoring what the platform firmware is telling (or
not telling) the OS through ACPI is that only it knows the reason why
it is doing that.

It may be by mistake, but it also may be on purpose and it is hard to say.

However, intel_pstate already knows that HWP is enabled on the
processor, so it can be used directly regardless of whether or not
CPPC is enabled. That is more appropriate and does not require users
to modify their kernel command line.

I'll add a changelog to the patch and submit it properly.

Thanks!