i40evf: don't use atomic allocation
authorMitch Williams <mitch.a.williams@intel.com>
Fri, 6 Nov 2015 23:26:04 +0000 (15:26 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 3 Dec 2015 10:23:32 +0000 (02:23 -0800)
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

index 9b55576226572b24f1152cdc8d70979f630ee885..3c9c008b168b752d4ab209dc3203edce7058b4ec 100644 (file)
@@ -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;