lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 01 Jun 2014 21:37:11 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Amir Vadai <amirv@...lanox.com>
Cc:	"David S. Miller" <davem@...emloft.net>,
	Or Gerlitz <ogerlitz@...lanox.com>, netdev@...r.kernel.org,
	Yevgeny Petrilin <yevgenyp@...lanox.com>,
	Yuval Atias <yuvala@...lanox.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next V6 2/2] net/mlx4_en: Use affinity hint

On Sun, 2014-06-01 at 21:16 -0700, Eric Dumazet wrote:
> On Sun, 2014-05-25 at 17:47 +0300, Amir Vadai wrote:
> > From: Yuval Atias <yuvala@...lanox.com>
> > 
> > The “affinity hint” mechanism is used by the user space
> > daemon, irqbalancer, to indicate a preferred CPU mask for irqs.
> > Irqbalancer can use this hint to balance the irqs between the
> > cpus indicated by the mask.
> > 
> > We wish the HCA to preferentially map the IRQs it uses to numa cores
> > close to it.  To accomplish this, we use cpumask_set_cpu_local_first(), that
> > sets the affinity hint according the following policy:
> > First it maps IRQs to “close” numa cores.  If these are exhausted, the
> > remaining IRQs are mapped to “far” numa cores.
> > 
> > Signed-off-by: Yuval Atias <yuvala@...lanox.com>
> > Signed-off-by: Amir Vadai <amirv@...lanox.com>
> > ---
> 
>   CC [M]  drivers/net/ethernet/mellanox/mlx4/en_netdev.o
> drivers/net/ethernet/mellanox/mlx4/en_netdev.c: In function ‘mlx4_en_init_affinity_hint’:
> drivers/net/ethernet/mellanox/mlx4/en_netdev.c:1546:23: error: incompatible types when assigning to type ‘cpumask_var_t’ from type ‘void *’
> drivers/net/ethernet/mellanox/mlx4/en_netdev.c: In function ‘mlx4_en_free_affinity_hint’:
> drivers/net/ethernet/mellanox/mlx4/en_netdev.c:1553:41: error: incompatible types when assigning to type ‘cpumask_var_t’ from type ‘void *’


And :

ERROR: "cpumask_set_cpu_local_first" [drivers/net/ethernet/mellanox/mlx4/mlx4_en.ko] undefined!


$ git grep -n cpumask_set_cpu_local_first
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:1542:    if (cpumask_set_cpu_local_first(ring_idx, numa_node,
include/linux/cpumask.h:260:int cpumask_set_cpu_local_first(int i, int numa_node, cpumask_t *dstp);
lib/cpumask.c:168: * cpumask_set_cpu_local_first - set i'th cpu with local numa cpu's first
lib/cpumask.c:182:int cpumask_set_cpu_local_first(int i, int numa_node, cpumask_t *dstp)
lib/cpumask.c:228:EXPORT_SYMBOL(cpumask_set_cpu_local_first);

Fixes are needed if CONFIG_CPUMASK_OFFSTACK is not used.
	
$ grep CONFIG_CPUMASK_OFFSTACK .config
$ echo $?
1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ