* [PATCH] acpi: thermal: Remove create_workqueue
@ 2016-06-07 3:15 Bhaktipriya Shridhar
2016-06-07 14:13 ` Tejun Heo
0 siblings, 1 reply; 3+ messages in thread
From: Bhaktipriya Shridhar @ 2016-06-07 3:15 UTC (permalink / raw)
To: Zhang Rui, Rafael J. Wysocki, Len Brown
Cc: Tejun Heo, linux-acpi, linux-kernel
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>
---
drivers/acpi/thermal.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 82707f9..f4ebe39 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] acpi: thermal: Remove create_workqueue
2016-06-07 3:15 [PATCH] acpi: thermal: Remove create_workqueue Bhaktipriya Shridhar
@ 2016-06-07 14:13 ` Tejun Heo
2016-06-23 0:37 ` Rafael J. Wysocki
0 siblings, 1 reply; 3+ messages in thread
From: Tejun Heo @ 2016-06-07 14:13 UTC (permalink / raw)
To: Bhaktipriya Shridhar
Cc: Zhang Rui, Rafael J. Wysocki, Len Brown, linux-acpi, linux-kernel
On Tue, Jun 07, 2016 at 08:45:40AM +0530, Bhaktipriya Shridhar wrote:
> 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>
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] acpi: thermal: Remove create_workqueue
2016-06-07 14:13 ` Tejun Heo
@ 2016-06-23 0:37 ` Rafael J. Wysocki
0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2016-06-23 0:37 UTC (permalink / raw)
To: Tejun Heo, Bhaktipriya Shridhar
Cc: Zhang Rui, Len Brown, linux-acpi, linux-kernel
On Tuesday, June 07, 2016 09:13:51 AM Tejun Heo wrote:
> On Tue, Jun 07, 2016 at 08:45:40AM +0530, Bhaktipriya Shridhar wrote:
> > 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>
Patch applied, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-23 0:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-07 3:15 [PATCH] acpi: thermal: Remove create_workqueue Bhaktipriya Shridhar
2016-06-07 14:13 ` Tejun Heo
2016-06-23 0:37 ` 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).