* [PATCH] qlge: Replace create_singlethread_workqueue with alloc_ordered_workqueue
@ 2016-03-15 14:38 Amitoj Kaur Chawla
2016-03-16 14:54 ` [Outreachy kernel] " Tejun Heo
0 siblings, 1 reply; 7+ messages in thread
From: Amitoj Kaur Chawla @ 2016-03-15 14:38 UTC (permalink / raw)
To: outreachy-kernel; +Cc: tj
Replace deprecated create_singlethread_workqueue with
alloc_ordered_workqueue.
Use alloc_ordered_workqueue for work like getting tx/rx frame sizes,
resetting MPI processor,setting asic recovery bit as only one work
item should be in queue/executing at any given time.
WQ_MEM_RECLAIM flag has been set to ensure execution context
regardless of memory pressure since qdev->workqueue might be used in
memory reclaim path.
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
drivers/net/ethernet/qlogic/qlge/qlge_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
index 9979764..089a9cb 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
@@ -4676,7 +4676,7 @@ static int ql_init_device(struct pci_dev *pdev, struct net_device *ndev,
/*
* Set up the operating parameters.
*/
- qdev->workqueue = create_singlethread_workqueue(ndev->name);
+ qdev->workqueue = alloc_ordered_workqueue(ndev->name, WQ_MEM_RECLAIM);
INIT_DELAYED_WORK(&qdev->asic_reset_work, ql_asic_reset_work);
INIT_DELAYED_WORK(&qdev->mpi_reset_work, ql_mpi_reset_work);
INIT_DELAYED_WORK(&qdev->mpi_work, ql_mpi_work);
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Outreachy kernel] [PATCH] qlge: Replace create_singlethread_workqueue with alloc_ordered_workqueue
2016-03-15 14:38 [PATCH] qlge: Replace create_singlethread_workqueue with alloc_ordered_workqueue Amitoj Kaur Chawla
@ 2016-03-16 14:54 ` Tejun Heo
0 siblings, 0 replies; 7+ messages in thread
From: Tejun Heo @ 2016-03-16 14:54 UTC (permalink / raw)
To: Amitoj Kaur Chawla; +Cc: outreachy-kernel
Hello,
On Tue, Mar 15, 2016 at 08:08:52PM +0530, Amitoj Kaur Chawla wrote:
> Replace deprecated create_singlethread_workqueue with
> alloc_ordered_workqueue.
>
> Use alloc_ordered_workqueue for work like getting tx/rx frame sizes,
> resetting MPI processor,setting asic recovery bit as only one work
> item should be in queue/executing at any given time.
It'd be nice to explain why that is the case. It's okay to be
speculative and ask the maintainers - e.g. say "Because of XXX and
YYY, the ordering seems necessary" and then in the section below "---"
ask the maintainer whether the assumption is correct.
> WQ_MEM_RECLAIM flag has been set to ensure execution context
> regardless of memory pressure since qdev->workqueue might be used in
> memory reclaim path.
Hmmm... why? Network devices don't usually sit in the memory reclaim
path although there are nfs and storage-over-net cases. I don't think
we have a clear rule here. I'll ask around, but for now, I think it'd
be better to default to not set it.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] qlge: Replace create_singlethread_workqueue with alloc_ordered_workqueue
2016-04-09 11:57 Amitoj Kaur Chawla
2016-04-13 17:44 ` Tejun Heo
@ 2016-04-15 20:42 ` David Miller
1 sibling, 0 replies; 7+ messages in thread
From: David Miller @ 2016-04-15 20:42 UTC (permalink / raw)
To: amitoj1606
Cc: harish.patil, sudarsana.kalluru, Dept-GELinuxNICDev,
linux-driver, netdev, linux-kernel, tj
From: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Date: Sat, 9 Apr 2016 17:27:45 +0530
> Replace deprecated create_singlethread_workqueue with
> alloc_ordered_workqueue.
>
> Work items include getting tx/rx frame sizes, resetting MPI processor,
> setting asic recovery bit so ordering seems necessary as only one work
> item should be in queue/executing at any given time, hence the use of
> alloc_ordered_workqueue.
>
> WQ_MEM_RECLAIM flag has been set since ethernet devices seem to sit in
> memory reclaim path, so to guarantee forward progress regardless of
> memory pressure.
>
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
> Acked-by: Tejun Heo <tj@kernel.org>
I'll apply this to net-next, thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] qlge: Replace create_singlethread_workqueue with alloc_ordered_workqueue
2016-04-14 7:25 ` Manish Chopra
@ 2016-04-14 15:47 ` Tejun Heo
0 siblings, 0 replies; 7+ messages in thread
From: Tejun Heo @ 2016-04-14 15:47 UTC (permalink / raw)
To: Manish Chopra
Cc: Amitoj Kaur Chawla, Sudarsana Kalluru, netdev, linux-kernel,
Dept-Eng Linux Driver, Harish Patil, Dept-GE Linux NIC Dev
Hello, Manish.
On Thu, Apr 14, 2016 at 07:25:15AM +0000, Manish Chopra wrote:
> Just want to confirm that __WQ_LEGACY flag is not necessary here as this is removed
> with this change ?
Yeah, that should be fine. That only affects locking dependency
tracking which can fire spuriously due to workqueues created with the
old interface having WQ_MEM_RECLAIM unconditionally. In this case, we
actually want WQ_MEM_RECLAIM and thus we want the dependency tracking
too.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] qlge: Replace create_singlethread_workqueue with alloc_ordered_workqueue
2016-04-13 17:44 ` Tejun Heo
@ 2016-04-14 7:25 ` Manish Chopra
2016-04-14 15:47 ` Tejun Heo
0 siblings, 1 reply; 7+ messages in thread
From: Manish Chopra @ 2016-04-14 7:25 UTC (permalink / raw)
To: Tejun Heo, Amitoj Kaur Chawla
Cc: Sudarsana Kalluru, netdev, linux-kernel, Dept-Eng Linux Driver,
Harish Patil, Dept-GE Linux NIC Dev
> -----Original Message-----
> From: dept_hsg_linux_nic_dev-bounces@qlclistserver.qlogic.com
> [mailto:dept_hsg_linux_nic_dev-bounces@qlclistserver.qlogic.com] On Behalf
> Of Tejun Heo
> Sent: Wednesday, April 13, 2016 11:14 PM
> To: Amitoj Kaur Chawla <amitoj1606@gmail.com>
> Cc: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>; netdev
> <netdev@vger.kernel.org>; linux-kernel <linux-kernel@vger.kernel.org>; Dept-
> Eng Linux Driver <Linux-Driver@qlogic.com>; Harish Patil
> <harish.patil@qlogic.com>; Dept-GE Linux NIC Dev <Dept-
> GELinuxNICDev@qlogic.com>
> Subject: Re: [PATCH] qlge: Replace create_singlethread_workqueue with
> alloc_ordered_workqueue
>
> On Sat, Apr 09, 2016 at 05:27:45PM +0530, Amitoj Kaur Chawla wrote:
> > Replace deprecated create_singlethread_workqueue with
> > alloc_ordered_workqueue.
> >
> > Work items include getting tx/rx frame sizes, resetting MPI processor,
> > setting asic recovery bit so ordering seems necessary as only one work
> > item should be in queue/executing at any given time, hence the use of
> > alloc_ordered_workqueue.
> >
> > WQ_MEM_RECLAIM flag has been set since ethernet devices seem to sit in
> > memory reclaim path, so to guarantee forward progress regardless of
> > memory pressure.
> >
> > Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
> > Acked-by: Tejun Heo <tj@kernel.org>
>
> Ping?
>
Hi,
Just want to confirm that __WQ_LEGACY flag is not necessary here as this is removed
with this change ?
Thanks
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] qlge: Replace create_singlethread_workqueue with alloc_ordered_workqueue
2016-04-09 11:57 Amitoj Kaur Chawla
@ 2016-04-13 17:44 ` Tejun Heo
2016-04-14 7:25 ` Manish Chopra
2016-04-15 20:42 ` David Miller
1 sibling, 1 reply; 7+ messages in thread
From: Tejun Heo @ 2016-04-13 17:44 UTC (permalink / raw)
To: Amitoj Kaur Chawla
Cc: harish.patil, sudarsana.kalluru, Dept-GELinuxNICDev,
linux-driver, netdev, linux-kernel
On Sat, Apr 09, 2016 at 05:27:45PM +0530, Amitoj Kaur Chawla wrote:
> Replace deprecated create_singlethread_workqueue with
> alloc_ordered_workqueue.
>
> Work items include getting tx/rx frame sizes, resetting MPI processor,
> setting asic recovery bit so ordering seems necessary as only one work
> item should be in queue/executing at any given time, hence the use of
> alloc_ordered_workqueue.
>
> WQ_MEM_RECLAIM flag has been set since ethernet devices seem to sit in
> memory reclaim path, so to guarantee forward progress regardless of
> memory pressure.
>
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
> Acked-by: Tejun Heo <tj@kernel.org>
Ping?
--
tejun
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] qlge: Replace create_singlethread_workqueue with alloc_ordered_workqueue
@ 2016-04-09 11:57 Amitoj Kaur Chawla
2016-04-13 17:44 ` Tejun Heo
2016-04-15 20:42 ` David Miller
0 siblings, 2 replies; 7+ messages in thread
From: Amitoj Kaur Chawla @ 2016-04-09 11:57 UTC (permalink / raw)
To: harish.patil, sudarsana.kalluru, Dept-GELinuxNICDev,
linux-driver, netdev, linux-kernel
Cc: tj
Replace deprecated create_singlethread_workqueue with
alloc_ordered_workqueue.
Work items include getting tx/rx frame sizes, resetting MPI processor,
setting asic recovery bit so ordering seems necessary as only one work
item should be in queue/executing at any given time, hence the use of
alloc_ordered_workqueue.
WQ_MEM_RECLAIM flag has been set since ethernet devices seem to sit in
memory reclaim path, so to guarantee forward progress regardless of
memory pressure.
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
---
Not sure if the assumption of requiring ordering of work items
is correct.
drivers/net/ethernet/qlogic/qlge/qlge_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
index b28e73e..83d7210 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
@@ -4687,7 +4687,7 @@ static int ql_init_device(struct pci_dev *pdev, struct net_device *ndev,
/*
* Set up the operating parameters.
*/
- qdev->workqueue = create_singlethread_workqueue(ndev->name);
+ qdev->workqueue = alloc_ordered_workqueue(ndev->name, WQ_MEM_RECLAIM);
INIT_DELAYED_WORK(&qdev->asic_reset_work, ql_asic_reset_work);
INIT_DELAYED_WORK(&qdev->mpi_reset_work, ql_mpi_reset_work);
INIT_DELAYED_WORK(&qdev->mpi_work, ql_mpi_work);
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-04-15 20:42 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-15 14:38 [PATCH] qlge: Replace create_singlethread_workqueue with alloc_ordered_workqueue Amitoj Kaur Chawla
2016-03-16 14:54 ` [Outreachy kernel] " Tejun Heo
2016-04-09 11:57 Amitoj Kaur Chawla
2016-04-13 17:44 ` Tejun Heo
2016-04-14 7:25 ` Manish Chopra
2016-04-14 15:47 ` Tejun Heo
2016-04-15 20:42 ` David Miller
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.