Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1451131 > unrolled thread

[RFC] whci: Remove deprecated create_singlethread_workqueue

Started byBhaktipriya Shridhar <bhaktipriya96@gmail.com>
First post2016-07-27 11:10 +0200
Last post2016-08-09 15:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [RFC] whci: Remove deprecated create_singlethread_workqueue Bhaktipriya Shridhar <bhaktipriya96@gmail.com> - 2016-07-27 11:10 +0200
    Re: [RFC] whci: Remove deprecated create_singlethread_workqueue Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-09 15:50 +0200

#1451131 — [RFC] whci: Remove deprecated create_singlethread_workqueue

FromBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Date2016-07-27 11:10 +0200
Subject[RFC] whci: Remove deprecated create_singlethread_workqueue
Message-ID<rZt0J-5Pc-3@gated-at.bofh.it>
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.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
---
 drivers/usb/host/whci/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/whci/init.c b/drivers/usb/host/whci/init.c
index e363723..ad8eb57 100644
--- a/drivers/usb/host/whci/init.c
+++ b/drivers/usb/host/whci/init.c
@@ -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

[toc] | [next] | [standalone]


#1458751

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-08-09 15:50 +0200
Message-ID<s4fzP-8eY-9@gated-at.bofh.it>
In reply to#1451131
On Wed, Jul 27, 2016 at 02:39:16PM +0530, Bhaktipriya Shridhar wrote:
> 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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web