netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Mitch Williams <mitch.a.williams@intel.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 06/15] i40evf: don't use atomic allocation
Date: Thu,  3 Dec 2015 05:25:51 -0800	[thread overview]
Message-ID: <1449149160-105219-7-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1449149160-105219-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Mitch Williams <mitch.a.williams@intel.com>

These allocations don't need to be at atomic level. GFP_KERNEL is fine
and they'll reduce stress on the allocator when the system is starved
for memory.

Change-ID: I3561d0399a681de0ad25291b6c848b224c1fde12
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
index 9b55576..3c9c008 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
@@ -242,7 +242,7 @@ void i40evf_configure_queues(struct i40evf_adapter *adapter)
 	adapter->current_op = I40E_VIRTCHNL_OP_CONFIG_VSI_QUEUES;
 	len = sizeof(struct i40e_virtchnl_vsi_queue_config_info) +
 		       (sizeof(struct i40e_virtchnl_queue_pair_info) * pairs);
-	vqci = kzalloc(len, GFP_ATOMIC);
+	vqci = kzalloc(len, GFP_KERNEL);
 	if (!vqci)
 		return;
 
@@ -353,7 +353,7 @@ void i40evf_map_queues(struct i40evf_adapter *adapter)
 	len = sizeof(struct i40e_virtchnl_irq_map_info) +
 	      (adapter->num_msix_vectors *
 		sizeof(struct i40e_virtchnl_vector_map));
-	vimi = kzalloc(len, GFP_ATOMIC);
+	vimi = kzalloc(len, GFP_KERNEL);
 	if (!vimi)
 		return;
 
@@ -421,7 +421,7 @@ void i40evf_add_ether_addrs(struct i40evf_adapter *adapter)
 		more = true;
 	}
 
-	veal = kzalloc(len, GFP_ATOMIC);
+	veal = kzalloc(len, GFP_KERNEL);
 	if (!veal)
 		return;
 
@@ -483,7 +483,7 @@ void i40evf_del_ether_addrs(struct i40evf_adapter *adapter)
 		      (count * sizeof(struct i40e_virtchnl_ether_addr));
 		more = true;
 	}
-	veal = kzalloc(len, GFP_ATOMIC);
+	veal = kzalloc(len, GFP_KERNEL);
 	if (!veal)
 		return;
 
@@ -547,7 +547,7 @@ void i40evf_add_vlans(struct i40evf_adapter *adapter)
 		      (count * sizeof(u16));
 		more = true;
 	}
-	vvfl = kzalloc(len, GFP_ATOMIC);
+	vvfl = kzalloc(len, GFP_KERNEL);
 	if (!vvfl)
 		return;
 
@@ -609,7 +609,7 @@ void i40evf_del_vlans(struct i40evf_adapter *adapter)
 		      (count * sizeof(u16));
 		more = true;
 	}
-	vvfl = kzalloc(len, GFP_ATOMIC);
+	vvfl = kzalloc(len, GFP_KERNEL);
 	if (!vvfl)
 		return;
 
-- 
2.5.0

  parent reply	other threads:[~2015-12-03 13:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-03 13:25 [net-next 00/15][pull request] 40GbE Intel Wired LAN Driver Updates 2015-12-03 Jeff Kirsher
2015-12-03 13:25 ` [net-next 01/15] i40evf: increase max number of queues Jeff Kirsher
2015-12-03 13:25 ` [net-next 02/15] i40evf: set real num queues Jeff Kirsher
2015-12-03 13:25 ` [net-next 03/15] i40evf: remove duplicate string Jeff Kirsher
2015-12-03 13:25 ` [net-next 04/15] i40e: Detection and recovery of TX queue hung logic moved to service_task from tx_timeout Jeff Kirsher
2015-12-03 13:25 ` [net-next 05/15] i40e: Fix memory leaks, sideband filter programming Jeff Kirsher
2015-12-03 13:25 ` Jeff Kirsher [this message]
2015-12-03 13:25 ` [net-next 07/15] i40e: propagate properly Jeff Kirsher
2015-12-03 13:25 ` [net-next 08/15] i40evf: use correct types Jeff Kirsher
2015-12-03 13:25 ` [net-next 09/15] i40e: use priv flags to control packet split Jeff Kirsher
2015-12-05 21:25   ` Or Gerlitz
2015-12-08 23:24     ` Jesse Brandeburg
2015-12-08 23:33       ` Or Gerlitz
2015-12-03 13:25 ` [net-next 10/15] i40e: remove CONFIG_I40E_VXLAN Jeff Kirsher
2015-12-03 13:25 ` [net-next 11/15] i40e: Remove separate functions gathering XOFF Rx stats Jeff Kirsher
2015-12-03 13:25 ` [net-next 12/15] i40e: fix whitespace Jeff Kirsher
2015-12-03 13:25 ` [net-next 13/15] i40e/i40evf: use logical operator Jeff Kirsher
2015-12-03 13:25 ` [net-next 14/15] i40e/i40evf: Bump version to 1.4.7 for i40e and 1.4.3 for i40evf Jeff Kirsher
2015-12-03 13:26 ` [net-next 15/15] i40e: trivial fixes Jeff Kirsher
2015-12-03 17:11 ` [net-next 00/15][pull request] 40GbE Intel Wired LAN Driver Updates 2015-12-03 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=1449149160-105219-7-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=jogreene@redhat.com \
    --cc=mitch.a.williams@intel.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).