From patchwork Fri Nov 13 04:38:35 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kirsher, Jeffrey T" X-Patchwork-Id: 38315 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 63B9CB7BB3 for ; Fri, 13 Nov 2009 15:39:03 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755860AbZKMEiw (ORCPT ); Thu, 12 Nov 2009 23:38:52 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755611AbZKMEiw (ORCPT ); Thu, 12 Nov 2009 23:38:52 -0500 Received: from qmta09.westchester.pa.mail.comcast.net ([76.96.62.96]:42671 "EHLO QMTA09.westchester.pa.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755864AbZKMEiv (ORCPT ); Thu, 12 Nov 2009 23:38:51 -0500 Received: from OMTA16.westchester.pa.mail.comcast.net ([76.96.62.88]) by QMTA09.westchester.pa.mail.comcast.net with comcast id 4UJ31d0061uE5Es59UetnJ; Fri, 13 Nov 2009 04:38:53 +0000 Received: from localhost.localdomain ([63.64.152.142]) by OMTA16.westchester.pa.mail.comcast.net with comcast id 4Unn1d00234bfcX3cUnpi9; Fri, 13 Nov 2009 04:48:02 +0000 From: Jeff Kirsher Subject: [net-next-2.6 PATCH 7/7] igb: only recycle page if it is on our numa node To: davem@davemloft.net Cc: netdev@vger.kernel.org, gospo@redhat.com, Alexander Duyck , Jeff Kirsher Date: Thu, 12 Nov 2009 20:38:35 -0800 Message-ID: <20091113043834.1240.42310.stgit@localhost.localdomain> In-Reply-To: <20091113043604.1240.80142.stgit@localhost.localdomain> References: <20091113043604.1240.80142.stgit@localhost.localdomain> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Alexander Duyck 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 Signed-off-by: Jeff Kirsher --- drivers/net/igb/igb_main.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 9911b3a..0cab5e2 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, struct sk_buff *skb; bool cleaned = false; int cleaned_count = 0; + int current_node = numa_node_id(); unsigned int total_bytes = 0, total_packets = 0; unsigned int i; u32 staterr; @@ -5006,7 +5007,8 @@ static bool igb_clean_rx_irq_adv(struct igb_q_vector *q_vector, buffer_info->page_offset, length); - if (page_count(buffer_info->page) != 1) + if ((page_count(buffer_info->page) != 1) || + (page_to_nid(buffer_info->page) != current_node)) buffer_info->page = NULL; else get_page(buffer_info->page);