* [PATCH] usb: dwc2: Remove deprecated create_singlethread_workqueue
@ 2016-07-28 8:27 Bhaktipriya Shridhar
2016-07-29 13:16 ` Tejun Heo
2016-08-02 19:35 ` John Youn
0 siblings, 2 replies; 3+ messages in thread
From: Bhaktipriya Shridhar @ 2016-07-28 8:27 UTC (permalink / raw)
To: John Youn, Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel, Tejun Heo
alloc_ordered_workqueue replaces the deprecated
create_singlethread_workqueue.
There are multiple work items on the work queue, which require
ordering. Hence, an ordered workqueue has been used.
The workqueue "wq_otg" is not being used on a memory reclaim path.
Hence, WQ_MEM_RECLAIM has not been set.
Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
---
drivers/usb/dwc2/hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
index 2df3d04..df5a065 100644
--- a/drivers/usb/dwc2/hcd.c
+++ b/drivers/usb/dwc2/hcd.c
@@ -5040,7 +5040,7 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq)
/* Create new workqueue and init work */
retval = -ENOMEM;
- hsotg->wq_otg = create_singlethread_workqueue("dwc2");
+ hsotg->wq_otg = alloc_ordered_workqueue("dwc2", 0);
if (!hsotg->wq_otg) {
dev_err(hsotg->dev, "Failed to create workqueue\n");
goto error2;
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] usb: dwc2: Remove deprecated create_singlethread_workqueue
2016-07-28 8:27 [PATCH] usb: dwc2: Remove deprecated create_singlethread_workqueue Bhaktipriya Shridhar
@ 2016-07-29 13:16 ` Tejun Heo
2016-08-02 19:35 ` John Youn
1 sibling, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2016-07-29 13:16 UTC (permalink / raw)
To: Bhaktipriya Shridhar
Cc: John Youn, Greg Kroah-Hartman, linux-usb, linux-kernel
On Thu, Jul 28, 2016 at 01:57:29PM +0530, Bhaktipriya Shridhar wrote:
> alloc_ordered_workqueue replaces the deprecated
> create_singlethread_workqueue.
>
> There are multiple work items on the work queue, which require
> ordering. Hence, an ordered workqueue has been used.
>
> The workqueue "wq_otg" is not being used on a memory reclaim path.
> Hence, WQ_MEM_RECLAIM has not been set.
>
> 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] usb: dwc2: Remove deprecated create_singlethread_workqueue
2016-07-28 8:27 [PATCH] usb: dwc2: Remove deprecated create_singlethread_workqueue Bhaktipriya Shridhar
2016-07-29 13:16 ` Tejun Heo
@ 2016-08-02 19:35 ` John Youn
1 sibling, 0 replies; 3+ messages in thread
From: John Youn @ 2016-08-02 19:35 UTC (permalink / raw)
To: Bhaktipriya Shridhar, John Youn, Greg Kroah-Hartman, Felipe Balbi
Cc: linux-usb, linux-kernel, Tejun Heo
++ Felipe
On 7/28/2016 1:27 AM, Bhaktipriya Shridhar wrote:
> alloc_ordered_workqueue replaces the deprecated
> create_singlethread_workqueue.
>
> There are multiple work items on the work queue, which require
> ordering. Hence, an ordered workqueue has been used.
>
> The workqueue "wq_otg" is not being used on a memory reclaim path.
> Hence, WQ_MEM_RECLAIM has not been set.
>
> Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
> ---
> drivers/usb/dwc2/hcd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
> index 2df3d04..df5a065 100644
> --- a/drivers/usb/dwc2/hcd.c
> +++ b/drivers/usb/dwc2/hcd.c
> @@ -5040,7 +5040,7 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq)
>
> /* Create new workqueue and init work */
> retval = -ENOMEM;
> - hsotg->wq_otg = create_singlethread_workqueue("dwc2");
> + hsotg->wq_otg = alloc_ordered_workqueue("dwc2", 0);
> if (!hsotg->wq_otg) {
> dev_err(hsotg->dev, "Failed to create workqueue\n");
> goto error2;
> --
> 2.1.4
>
>
Acked-by: John Youn <johnyoun@synopsys.com>
John
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-02 19:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-28 8:27 [PATCH] usb: dwc2: Remove deprecated create_singlethread_workqueue Bhaktipriya Shridhar
2016-07-29 13:16 ` Tejun Heo
2016-08-02 19:35 ` John Youn
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.