aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2009-11-12 13:38:35 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-13 23:46:53 -0500
commitd1eff35061b9346cb9bef2b79d9d99c8c096df13 (patch)
tree79d0a691d5c9399ad49c93b36fe76c7c0590cf1b /drivers/net/igb
parentdbabb065802a46d64b8869ba97674bfa90b55d83 (diff)
igb: only recycle page if it is on our numa node
This patch makes it so that we only recycle pages when they are from the local NUMA node. Non-local pages are freed and replaced with locally allocated pages. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb')
-rw-r--r--drivers/net/igb/igb_main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 9911b3aaed3..0cab5e2b089 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -4952,6 +4952,7 @@ static bool igb_clean_rx_irq_adv(struct igb_q_vector *q_vector,
4952 struct sk_buff *skb; 4952 struct sk_buff *skb;
4953 bool cleaned = false; 4953 bool cleaned = false;
4954 int cleaned_count = 0; 4954 int cleaned_count = 0;
4955 int current_node = numa_node_id();
4955 unsigned int total_bytes = 0, total_packets = 0; 4956 unsigned int total_bytes = 0, total_packets = 0;
4956 unsigned int i; 4957 unsigned int i;
4957 u32 staterr; 4958 u32 staterr;
@@ -5006,7 +5007,8 @@ static bool igb_clean_rx_irq_adv(struct igb_q_vector *q_vector,
5006 buffer_info->page_offset, 5007 buffer_info->page_offset,
5007 length); 5008 length);
5008 5009
5009 if (page_count(buffer_info->page) != 1) 5010 if ((page_count(buffer_info->page) != 1) ||
5011 (page_to_nid(buffer_info->page) != current_node))
5010 buffer_info->page = NULL; 5012 buffer_info->page = NULL;
5011 else 5013 else
5012 get_page(buffer_info->page); 5014 get_page(buffer_info->page);