Re: [PATCH v1 2/6] cpufreq: intel_pstate: Do not update global.turbo_disabled after initialization

From: Xi Ruoyao
Date: Sat Jun 01 2024 - 23:22:18 EST


On Mon, 2024-03-25 at 18:02 +0100, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
>
> The global.turbo_disabled is updated quite often, especially in the
> passive mode in which case it is updated every time the scheduler calls
> into the driver.  However, this is generally not necessary and it adds
> MSR read overhead to scheduler code paths (and that particular MSR is
> slow to read).
>
> For this reason, make the driver read MSR_IA32_MISC_ENABLE_TURBO_DISABLE
> just once at the cpufreq driver registration time and remove all of the
> in-flight updates of global.turbo_disabled.

Hi Rafael and Srinivas,

Thanks for the clean up, but unfortunately on one of my laptops (based
on i5-11300H) MSR_IA32_MISC_ENABLE_TURBO_DISABLE is mysteriously
changing from 1 to 0 in about one minute after system boot. I've no
idea why this is happening (firmware is doing some stupid thing?)

I've noticed the issue before and "hacked it around"
(https://bugzilla.kernel.org/show_bug.cgi?id=218702). But after this
change I can no longer hack it around and the system is much slower.

Is it possible to hack it around again?

--
Xi Ruoyao <xry111@xxxxxxxxxxx>
School of Aerospace Science and Technology, Xidian University