Skip to contentSkip to conversation

whci: Remove deprecated create_singlethread_workqueue

RFC Superseded Bhaktipriya Shridhar 2 participants 2 messages Jul 27, 2016 – Aug 9, 2016 USB

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

RFC 1/1 whci: Remove deprecated create_singlethread_workqueue

alloc_ordered_workqueue replaces the deprecated
create_singlethread_workqueue.

The workqueue "workqueue" has multiple workitems which may require ordering. Hence, a dedicated ordered workqueue has been used. Since the workqueue is not being used on a memory reclaim path, WQ_MEM_RECLAIM has not been set.

Can the workitems run concurrently? Is the ordering among work items necessary?

Thanks.

---
 drivers/usb/host/whci/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/whci/init.c +1 -1
index e363723..ad8eb57 100644
@@ -65,7 +65,7 @@ int whc_init(struct whc *whc)
 	init_waitqueue_head(&whc->cmd_wq);
 	init_waitqueue_head(&whc->async_list_wq);
 	init_waitqueue_head(&whc->periodic_list_wq);
-	whc->workqueue = create_singlethread_workqueue(dev_name(&whc->umc->dev));
+	whc->workqueue = alloc_ordered_workqueue(dev_name(&whc->umc->dev), 0);
 	if (whc->workqueue == NULL) {
 		ret = -ENOMEM;
 		goto error;

--
2.1.4

#1 lore raw
Quoted 9 lines · Bhaktipriya Shridhar

alloc_ordered_workqueue replaces the deprecated
create_singlethread_workqueue.

The workqueue "workqueue" has multiple workitems which may require ordering. Hence, a dedicated ordered workqueue has been used. Since the workqueue is not being used on a memory reclaim path, WQ_MEM_RECLAIM has not been set.

Can the workitems run concurrently? Is the ordering among work items necessary?

I don't know, sorry. Almost no one has this hardware, so just fix it the best you can and let's see what happens :)

thanks,

greg k-h