From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: [PATCH] NUMA aware allocation of transmit and receive buffers for e1000 Date: Wed, 18 May 2005 04:05:25 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@oss.sgi.com, akpm@osdl.org Return-path: To: Christoph Lameter In-Reply-To: (Christoph Lameter's message of "Tue, 17 May 2005 18:56:06 -0700 (PDT)") Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com List-Id: netdev.vger.kernel.org Christoph Lameter writes: > @@ -513,6 +513,7 @@ e1000_probe(struct pci_dev *pdev, > netdev->mem_start = mmio_start; > netdev->mem_end = mmio_start + mmio_len; > netdev->base_addr = adapter->hw.io_base; > + netdev->node = pcibus_to_node(pdev->bus); I think it would be better to define a common helper (pdev_kmalloc ?) for this that just takes the pdev and that can be defined to a nop for !CONFIG_NUMA Kernels. This would avoid the bloat of the ->node argument on non numa kernels and is a cleaner interface too. pcibus_to_node() is just an array lookup and should be cheap enough to redo. -Andi