public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/3] thermal: core: Remove thermal zones during unregistration
@ 2023-12-08 19:11 Rafael J. Wysocki
  2023-12-08 19:13 ` [PATCH v1 1/3] thermal: core: Make thermal_zone_device_unregister() return after freeing the zone Rafael J. Wysocki
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Rafael J. Wysocki @ 2023-12-08 19:11 UTC (permalink / raw)
  To: Linux PM
  Cc: Srinivas Pandruvada, Daniel Lezcano, Zhang Rui, Linux ACPI, LKML,
	Lukasz Luba

Hi All,

This patch series adds a mechanism to guarantee that
thermal_zone_device_unregister() will not return until all of the active
references to the thermal zone device object in question have been dropped
and it has been deleted (patch [1/3]).

This supersedes the approach used so far in which all thermal zone sysfs
attribute callbacks check if the zone device is still registered under the
zone lock, so as to return early if that is not the case, as it means that
device_del() has been called for the thermal zone in question (and returned).
It is not necessary to do that any more after patch [1/3], so patch [2/3]
removes those checks from the code and drops zone locking that is not
necessary any more either.

Patch [3/3] uses the observation that the thermal subsystem does not need to
check if a thermal zone device is registered at all, because it can use its
own data to determine whether or not the thermal zone is going away and so
it may not be worth updating it, for example.

Please refer to the patch changelogs for details.

The series depends on new thermal material in linux-next, but it should not
substantially depend on any changes that have not made it into linux-next yet.

Thanks!




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

end of thread, other threads:[~2023-12-12 10:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-08 19:11 [PATCH v1 0/3] thermal: core: Remove thermal zones during unregistration Rafael J. Wysocki
2023-12-08 19:13 ` [PATCH v1 1/3] thermal: core: Make thermal_zone_device_unregister() return after freeing the zone Rafael J. Wysocki
2023-12-11 16:28   ` Daniel Lezcano
2023-12-11 16:42     ` Rafael J. Wysocki
2023-12-11 17:34       ` Daniel Lezcano
2023-12-11 17:54         ` Rafael J. Wysocki
2023-12-08 19:19 ` [PATCH v1 2/3] thermal: Drop redundant and confusing device_is_registered() checks Rafael J. Wysocki
2023-12-11 17:39   ` Daniel Lezcano
2023-12-11 17:58     ` Rafael J. Wysocki
2023-12-12 10:27   ` Daniel Lezcano
2023-12-08 19:20 ` [PATCH v1 3/3] thermal: core: Rework thermal zone availability check Rafael J. Wysocki
2023-12-12 10:28   ` Daniel Lezcano
2023-12-11 13:38 ` [PATCH v1 0/3] thermal: core: Remove thermal zones during unregistration Lukasz Luba
2023-12-11 13:44   ` 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