netdev
[Top] [All Lists]

Re: [PATCH] NUMA aware allocation of transmit and receive buffers for e1

To: Christoph Lameter <christoph@xxxxxxxxxx>
Subject: Re: [PATCH] NUMA aware allocation of transmit and receive buffers for e1000
From: Andi Kleen <ak@xxxxxx>
Date: Wed, 18 May 2005 04:05:25 +0200
Cc: netdev@xxxxxxxxxxx, akpm@xxxxxxxx
In-reply-to: <Pine.LNX.4.62.0505171854490.20408@xxxxxxxxxx> (Christoph Lameter's message of "Tue, 17 May 2005 18:56:06 -0700 (PDT)")
References: <Pine.LNX.4.62.0505171854490.20408@xxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux)
Christoph Lameter <christoph@xxxxxxxxxx> 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

<Prev in Thread] Current Thread [Next in Thread>