linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/4] thermal: core/ACPI: Fix processor cooling device regression
@ 2023-03-17 16:48 Rafael J. Wysocki
  2023-03-17 16:52 ` [PATCH v3 1/4] ACPI: processor: Reorder acpi_processor_driver_init() Rafael J. Wysocki
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Rafael J. Wysocki @ 2023-03-17 16:48 UTC (permalink / raw)
  To: Linux PM
  Cc: Zhang Rui, Linux ACPI, LKML, Daniel Lezcano, Srinivas Pandruvada,
	Viresh Kumar, Quanxian Wang

Hi All,

The two previous revisions of this patch series was posted as

https://lore.kernel.org/linux-pm/2148907.irdbgypaU6@kreacher/
https://lore.kernel.org/linux-acpi/2692681.mvXUDI8C0e@kreacher/

As reported by Rui in this thread:

Link: https://lore.kernel.org/linux-pm/53ec1f06f61c984100868926f282647e57ecfb2d.camel@intel.com/

some recent changes in the thermal core cause the CPU cooling devices
registered by the ACPI processor driver to become unusable in some cases
and somewhat crippled in general.

The problem is that the ACPI processor driver changes its ->get_max_state()
callback return value depending on whether or not cpufreq is available and
there is a cpufreq policy for a given CPU.  However, the thermal core has
always assumed that the return value of that callback will not change, which
in fact is relied on by the cooling device statistics code.  In particular,
when the ->get_max_state() grows, the memory buffer allocated for storing the
statistics will be too small and corruption may ensue as a result.

For this reason, the issue needs to be addressed in the ACPI processor driver
and not in the thermal core, but the core needs to help somewhat too.  Namely,
it needs to provide a helper allowing an interested driver to update the
max_state value for an already registered cooling device in certain situations
which will also cause the statistics to be rebuilt.

This series implements the above and for details please refer to the individual
patch chagelogs.

Thanks!




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-03-21 19:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-17 16:48 [PATCH v3 0/4] thermal: core/ACPI: Fix processor cooling device regression Rafael J. Wysocki
2023-03-17 16:52 ` [PATCH v3 1/4] ACPI: processor: Reorder acpi_processor_driver_init() Rafael J. Wysocki
2023-03-17 16:54 ` [PATCH v3 2/4] thermal: core: Introduce thermal_cooling_device_present() Rafael J. Wysocki
2023-03-17 17:01 ` [PATCH v3 3/4] thermal: core: Introduce thermal_cooling_device_update() Rafael J. Wysocki
2023-03-21 15:07   ` Zhang, Rui
2023-03-21 19:03     ` Rafael J. Wysocki
2023-03-17 17:03 ` [PATCH v3 4/4] ACPI: processor: thermal: Update CPU cooling devices on cpufreq policy changes Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).