Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752041AbbHRAfp (ORCPT ); Mon, 17 Aug 2015 20:35:45 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:34121 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750975AbbHRAfm (ORCPT ); Mon, 17 Aug 2015 20:35:42 -0400 Date: Mon, 17 Aug 2015 17:35:41 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Jiang Liu cc: Andrew Morton , Mel Gorman , Mike Galbraith , Peter Zijlstra , "Rafael J . Wysocki" , Tang Chen , Tejun Heo , Jeff Kirsher , Jesse Brandeburg , Shannon Nelson , Carolyn Wyborny , Don Skidmore , Matthew Vick , John Ronciak , Mitch Williams , Tony Luck , linux-mm@kvack.org, linux-hotplug@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org Subject: Re: [Patch V3 5/9] i40e: Use numa_mem_id() to better support memoryless node In-Reply-To: <1439781546-7217-6-git-send-email-jiang.liu@linux.intel.com> Message-ID: References: <1439781546-7217-1-git-send-email-jiang.liu@linux.intel.com> <1439781546-7217-6-git-send-email-jiang.liu@linux.intel.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1583 Lines: 39 On Mon, 17 Aug 2015, Jiang Liu wrote: > Function i40e_clean_rx_irq() tries to reuse memory pages allocated s/i40e_clean_rx_irq/i40e_clean_rx_irq_ps/ > from the nearest node. To better support memoryless node, use > numa_mem_id() instead of numa_node_id() to get the nearest node with > memory. > Out of curiosity, what prevents the cpu to be preempted and current_node to no longer match numa_mem_id()? > This change should only affect performance. > > Signed-off-by: Jiang Liu > --- > drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c > index 9a4f2bc70cd2..a8f618cb8eb0 100644 > --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c > +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c > @@ -1516,7 +1516,7 @@ static int i40e_clean_rx_irq_ps(struct i40e_ring *rx_ring, int budget) > unsigned int total_rx_bytes = 0, total_rx_packets = 0; > u16 rx_packet_len, rx_header_len, rx_sph, rx_hbo; > u16 cleaned_count = I40E_DESC_UNUSED(rx_ring); > - const int current_node = numa_node_id(); > + const int current_node = numa_mem_id(); > struct i40e_vsi *vsi = rx_ring->vsi; > u16 i = rx_ring->next_to_clean; > union i40e_rx_desc *rx_desc; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/