Commit 42ba9654 authored by Yinjun Zhang's avatar Yinjun Zhang Committed by David S. Miller

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: default avatarYinjun Zhang <yinjun.zhang@corigine.com>
Reviewed-by: default avatarLouis Peens <louis.peens@corigine.com>
Reviewed-by: default avatarNiklas Söderlund <niklas.soderlund@corigine.com>
Signed-off-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f53e1432
......@@ -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);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment