Skip to contentSkip to conversation

acpi: thermal: Remove create_workqueue

PATCH In review Bhaktipriya Shridhar 3 participants 3 messages Jun 7, 2016 – Jun 23, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 acpi: thermal: Remove create_workqueue

alloc_workqueue replaces deprecated create_workqueue().

A dedicated workqueue has been used since the workqueue acpi_thermal_pm_queue with workitem &tz->thermal_check_work (maps to acpi_thermal_check_fn), is involved in thermal zone polling. Wallclock time is actually important and getting delayed in handling critical temperature event can actually lead to unnecessary hardware damage. So while this is not used during memory reclaim, we still want forward progress guarantee and be generally snappy in servicing it. Hence, WQ_MEM_RECLAIM and WQ_HIGHPRI have been used here.

Since there are only a fixed number of work items, explicit concurrency limit is unnecessary here.

---
 drivers/acpi/thermal.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/acpi/thermal.c +2 -1
index 82707f9..f4ebe39 100644
@@ -1259,7 +1259,8 @@ static int __init acpi_thermal_init(void)
 		return -ENODEV;
 	}
 
-	acpi_thermal_pm_queue = create_workqueue("acpi_thermal_pm");
+	acpi_thermal_pm_queue = alloc_workqueue("acpi_thermal_pm",
+						WQ_HIGHPRI | WQ_MEM_RECLAIM, 0);
 	if (!acpi_thermal_pm_queue)
 		return -ENODEV;
 

--
2.1.4

Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Bhaktipriya Shridhar

alloc_workqueue replaces deprecated create_workqueue().

A dedicated workqueue has been used since the workqueue acpi_thermal_pm_queue with workitem &tz->thermal_check_work (maps to acpi_thermal_check_fn), is involved in thermal zone polling. Wallclock time is actually important and getting delayed in handling critical temperature event can actually lead to unnecessary hardware damage. So while this is not used during memory reclaim, we still want forward progress guarantee and be generally snappy in servicing it. Hence, WQ_MEM_RECLAIM and WQ_HIGHPRI have been used here.

Quoted 4 lines

Since there are only a fixed number of work items, explicit concurrency limit is unnecessary here.

Thanks.

Signature · 1 line
tejun
#2 lore raw
Quoted 12 lines · Tejun Heo
Quoted 11 lines · Bhaktipriya Shridhar

alloc_workqueue replaces deprecated create_workqueue().

A dedicated workqueue has been used since the workqueue acpi_thermal_pm_queue with workitem &tz->thermal_check_work (maps to acpi_thermal_check_fn), is involved in thermal zone polling. Wallclock time is actually important and getting delayed in handling critical temperature event can actually lead to unnecessary hardware damage. So while this is not used during memory reclaim, we still want forward progress guarantee and be generally snappy in servicing it. Hence, WQ_MEM_RECLAIM and WQ_HIGHPRI have been used here.

Quoted 6 lines
Quoted 4 lines

Since there are only a fixed number of work items, explicit concurrency limit is unnecessary here.

Patch applied, thanks!