public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] whci: Remove deprecated create_singlethread_workqueue
@ 2016-07-27  9:09 Bhaktipriya Shridhar
  2016-08-09 13:41 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Bhaktipriya Shridhar @ 2016-07-27  9:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Julia Lawall; +Cc: linux-usb, linux-kernel, Tejun Heo

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RFC] whci: Remove deprecated create_singlethread_workqueue
  2016-07-27  9:09 [RFC] whci: Remove deprecated create_singlethread_workqueue Bhaktipriya Shridhar
@ 2016-08-09 13:41 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2016-08-09 13:41 UTC (permalink / raw)
  To: Bhaktipriya Shridhar; +Cc: Julia Lawall, linux-usb, linux-kernel, Tejun Heo

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-09 13:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-27  9:09 [RFC] whci: Remove deprecated create_singlethread_workqueue Bhaktipriya Shridhar
2016-08-09 13:41 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox