Re: [PATCH] iwlwifi: dvm: convert create_singlethread_workqueue() to alloc_workqueue()

3 messages, 3 authors, 2016-03-17 · open the first message on its own page

Re: [PATCH] iwlwifi: dvm: convert create_singlethread_workqueue() to alloc_workqueue()

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2016-03-17 12:43:32

On Thu, 2016-03-17 at 20:37 +0800, Eva Rachel Retuya wrote:
Use alloc_workqueue() to allocate the workqueue instead of
create_singlethread_workqueue() since the latter is deprecated and is
scheduled for removal.
Scheduled where?
 static void iwl_setup_deferred_work(struct iwl_priv *priv)
 {
-	priv->workqueue = create_singlethread_workqueue(DRV_NAME);
+	priv->workqueue = alloc_workqueue(DRV_NAME, WQ_HIGHPRI |
WQ_UNBOUND |
+					  WQ_MEM_RECLAIM, 1);
Seems like you should use alloc_ordered_workqueue() though? That also
gets you UNBOUND immediately, and the "1".

I'm not really sure HIGHPRI is needed either.

johannes

Re: [PATCH] iwlwifi: dvm: convert create_singlethread_workqueue() to alloc_workqueue()

From: Tejun Heo <tj@kernel.org>
Date: 2016-03-17 13:21:17

Hello,

On Thu, Mar 17, 2016 at 01:43:22PM +0100, Johannes Berg wrote:
On Thu, 2016-03-17 at 20:37 +0800, Eva Rachel Retuya wrote:
quoted
Use alloc_workqueue() to allocate the workqueue instead of
create_singlethread_workqueue() since the latter is deprecated and is
scheduled for removal.
Scheduled where?
They've been deprecated for years now.  I should note that in the
header.
quoted
 static void iwl_setup_deferred_work(struct iwl_priv *priv)
 {
-	priv->workqueue = create_singlethread_workqueue(DRV_NAME);
+	priv->workqueue = alloc_workqueue(DRV_NAME, WQ_HIGHPRI |
WQ_UNBOUND |
+					  WQ_MEM_RECLAIM, 1);
Seems like you should use alloc_ordered_workqueue() though? That also
gets you UNBOUND immediately, and the "1".
Right, this one should have been alloc_ordered_workqueue().
I'm not really sure HIGHPRI is needed either.
So, no WQ_MEM_RECLAIM either then, I suppose?  What are the latency
requirements here - what happens if a thermal management work gets
delayed?

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

RE: [PATCH] iwlwifi: dvm: convert create_singlethread_workqueue() to alloc_workqueue()

From: Grumbach, Emmanuel <hidden>
Date: 2016-03-17 13:48:45

Hello,

On Thu, Mar 17, 2016 at 01:43:22PM +0100, Johannes Berg wrote:
quoted
On Thu, 2016-03-17 at 20:37 +0800, Eva Rachel Retuya wrote:
quoted
Use alloc_workqueue() to allocate the workqueue instead of
create_singlethread_workqueue() since the latter is deprecated and
is scheduled for removal.
Scheduled where?
They've been deprecated for years now.  I should note that in the header.
quoted
quoted
 static void iwl_setup_deferred_work(struct iwl_priv *priv)
 {
-	priv->workqueue = create_singlethread_workqueue(DRV_NAME);
+	priv->workqueue = alloc_workqueue(DRV_NAME, WQ_HIGHPRI |
WQ_UNBOUND |
+					  WQ_MEM_RECLAIM, 1);
Seems like you should use alloc_ordered_workqueue() though? That also
gets you UNBOUND immediately, and the "1".
Right, this one should have been alloc_ordered_workqueue().
quoted
I'm not really sure HIGHPRI is needed either.
So, no WQ_MEM_RECLAIM either then, I suppose?  What are the latency
requirements here - what happens if a thermal management work gets
delayed?
This worker is not supposed to free memory, so no WQ_MEM_RECLAIM needed. The latency is not critical.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help