Skip to content

Commit

Permalink
ACPI / thermal: Remove create_workqueue()
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Bhaktipriya Shridhar authored and Rafael J. Wysocki committed Jun 22, 2016
1 parent 33688ab commit e053dc9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/acpi/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit e053dc9

Please sign in to comment.