netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 12/15] fm10k: Remove create_workqueue
Date: Wed, 29 Jun 2016 14:32:59 -0700	[thread overview]
Message-ID: <1467235982-55437-13-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1467235982-55437-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>

alloc_workqueue replaces deprecated create_workqueue().

A dedicated workqueue has been used since the workitem (viz
fm10k_service_task, which manages and runs other subtasks) is involved in
normal device operation and requires forward progress under memory
pressure.

create_workqueue has been replaced with alloc_workqueue with max_active
as 0 since there is no need for throttling the number of active work
items.

Since network devices may be used in memory reclaim path,
WQ_MEM_RECLAIM has been set to guarantee forward progress.

flush_workqueue is unnecessary since destroy_workqueue() itself calls
drain_workqueue() which flushes repeatedly till the workqueue
becomes empty. Hence the call to flush_workqueue() has been dropped.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/fm10k/fm10k_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
index 53d02416..a9ccc1e 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
@@ -56,7 +56,7 @@ static int __init fm10k_init_module(void)
 	pr_info("%s\n", fm10k_copyright);
 
 	/* create driver workqueue */
-	fm10k_workqueue = create_workqueue("fm10k");
+	fm10k_workqueue = alloc_workqueue("fm10k", WQ_MEM_RECLAIM, 0);
 
 	fm10k_dbg_init();
 
@@ -77,7 +77,6 @@ static void __exit fm10k_exit_module(void)
 	fm10k_dbg_exit();
 
 	/* destroy driver workqueue */
-	flush_workqueue(fm10k_workqueue);
 	destroy_workqueue(fm10k_workqueue);
 }
 module_exit(fm10k_exit_module);
-- 
2.5.5

  parent reply	other threads:[~2016-06-29 21:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29 21:32 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2016-06-29 Jeff Kirsher
2016-06-29 21:32 ` [net-next 01/15] fm10k: don't use BIT() macro where the value isn't a bitmask Jeff Kirsher
2016-06-29 21:32 ` [net-next 02/15] fm10k: Align Rx buffers to 512B blocks Jeff Kirsher
2016-06-29 21:32 ` [net-next 03/15] fm10k: fix incorrect index calculation in fm10k_write_reta Jeff Kirsher
2016-06-29 21:32 ` [net-next 04/15] e1000e: prevent division by zero if TIMINCA is zero Jeff Kirsher
2016-06-29 21:32 ` [net-next 05/15] ixgbe: Fix deleting link filters for cls_u32 offloads Jeff Kirsher
2016-06-29 21:32 ` [net-next 06/15] ixgbe: Error handler for duplicate filter locations in hardware " Jeff Kirsher
2016-06-29 21:32 ` [net-next 07/15] igb: introduce ptp_flags variable and use it to replace IGB_FLAG_PTP Jeff Kirsher
2016-06-29 21:32 ` [net-next 08/15] igb: introduce IGB_PTP_OVERFLOW_CHECK flag Jeff Kirsher
2016-06-29 21:32 ` [net-next 09/15] igb: re-use igb_ptp_reset in igb_ptp_init Jeff Kirsher
2016-06-29 21:32 ` [net-next 10/15] igb: implement igb_ptp_suspend Jeff Kirsher
2016-06-29 21:32 ` [net-next 11/15] igb: call igb_ptp_suspend during suspend/resume cycle Jeff Kirsher
2016-06-29 21:32 ` Jeff Kirsher [this message]
2016-06-29 21:33 ` [net-next 13/15] ixgbe: Correct reporting of timestamping for x550 Jeff Kirsher
2016-06-29 21:33 ` [net-next 14/15] ixgbe: fix spoofed packets with macvlans Jeff Kirsher
2016-06-29 21:33 ` [net-next 15/15] igb: Only DMA sync frame length Jeff Kirsher
2016-06-30 13:29 ` [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2016-06-29 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1467235982-55437-13-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=bhaktipriya96@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jogreene@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).