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


Groups > linux.kernel > #1374616 > unrolled thread

[PATCH] qlge: Replace create_singlethread_workqueue with alloc_ordered_workqueue

Started byAmitoj Kaur Chawla <amitoj1606@gmail.com>
First post2016-04-09 14:00 +0200
Last post2016-04-14 17:50 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] qlge: Replace create_singlethread_workqueue with  alloc_ordered_workqueue Amitoj Kaur Chawla <amitoj1606@gmail.com> - 2016-04-09 14:00 +0200
    Re: [PATCH] qlge: Replace create_singlethread_workqueue with  alloc_ordered_workqueue Tejun Heo <tj@kernel.org> - 2016-04-13 19:50 +0200
      RE: [PATCH] qlge: Replace create_singlethread_workqueue with  alloc_ordered_workqueue Manish Chopra <manish.chopra@qlogic.com> - 2016-04-14 11:00 +0200
        Re: [PATCH] qlge: Replace create_singlethread_workqueue with  alloc_ordered_workqueue Tejun Heo <tj@kernel.org> - 2016-04-14 17:50 +0200

#1374616 — [PATCH] qlge: Replace create_singlethread_workqueue with alloc_ordered_workqueue

FromAmitoj Kaur Chawla <amitoj1606@gmail.com>
Date2016-04-09 14:00 +0200
Subject[PATCH] qlge: Replace create_singlethread_workqueue with alloc_ordered_workqueue
Message-ID<rlZIt-4lP-1@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1378136

FromTejun Heo <tj@kernel.org>
Date2016-04-13 19:50 +0200
Message-ID<rnx5o-4TK-15@gated-at.bofh.it>
In reply to#1374616
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

[toc] | [prev] | [next] | [standalone]


#1378618

FromManish Chopra <manish.chopra@qlogic.com>
Date2016-04-14 11:00 +0200
Message-ID<rnLi3-7rI-15@gated-at.bofh.it>
In reply to#1378136
> -----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
 

[toc] | [prev] | [next] | [standalone]


#1379045

FromTejun Heo <tj@kernel.org>
Date2016-04-14 17:50 +0200
Message-ID<rnRGO-44y-19@gated-at.bofh.it>
In reply to#1378618
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web