Subject: Re: [PATCH net-next 01/12] net/mlx4_en: Reuse mapped memory in RX flow

From: Amir Vadai <[email-masked]>
Date: Tue, 10 Dec 2013 11:47:05 +0200

On 09/12/2013 17:17, Eric Dumazet wrote:
> On Mon, 2013-12-09 at 11:44 +0200, Amir Vadai wrote:
> 
>> We get optimal performance when rx rings are mapped 1:1 to cpu's - IRQ
>> affinity is set to this CPU, and memory is allocated on the NUMA node
>> close to it (ring->numa_node)
>> In order to do that, we will post a patch soon to use
>> irq_set_affinity_hint() in order to hint the irq balancer. Till this
>> patch is applied, users should set irq affinity through sysfs and
>> disable the irq balancer.
> 
> Point is : You have nothing to do to affine memory allocations.
> 
> The big problem is correct IRQ affinity, which as you said is addressed
> in a different way/patch
> 
> If the IRQ is properly setup, automatically or by irq affinities,
> then memory will be allocated on the right node, its properly done
> by all memory allocators.
> 
> The xxx_alloc_node() variants in the fast path are therefore not needed,
> and not using them avoids catastrophic results if affinities are not
> properly set.
You are right. Will be fixed in V1 too.
We'll use xxx_alloc_node() on the initialization phase, but on the fast
path let the kernel choose the NUMA node.

> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to [email-masked]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>