nfp: take numa node into account when setting irq affinity
Set irq affinity to cpus that belong to the same numa node with NIC device first. Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com> Reviewed-by: Louis Peens <louis.peens@corigine.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com> Signed-off-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
f53e14328e
commit
42ba9654ac
@@ -735,8 +735,9 @@ static unsigned int nfp_net_calc_fl_bufsz_xsk(struct nfp_net_dp *dp)
|
||||
*/
|
||||
static void nfp_net_vecs_init(struct nfp_net *nn)
|
||||
{
|
||||
int numa_node = dev_to_node(&nn->pdev->dev);
|
||||
struct nfp_net_r_vector *r_vec;
|
||||
int r;
|
||||
unsigned int r;
|
||||
|
||||
nn->lsc_handler = nfp_net_irq_lsc;
|
||||
nn->exn_handler = nfp_net_irq_exn;
|
||||
@@ -762,7 +763,7 @@ static void nfp_net_vecs_init(struct nfp_net *nn)
|
||||
tasklet_disable(&r_vec->tasklet);
|
||||
}
|
||||
|
||||
cpumask_set_cpu(r, &r_vec->affinity_mask);
|
||||
cpumask_set_cpu(cpumask_local_spread(r, numa_node), &r_vec->affinity_mask);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user