Commit b7f55b81 authored by Shannon Nelson's avatar Shannon Nelson Committed by David S. Miller

ionic: improve irq numa locality

Spreading the interrupts across the CPU cores is good for load
balancing, but not necessarily as good when using a CPU/core
that is not part of the NUMA local CPU.  If it can be localized,
the kernel's cpumask_local_spread() service will pick a core
that is on the node close to the PCI device.
Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5dca69c4
...@@ -424,8 +424,9 @@ static int ionic_qcq_alloc(struct ionic_lif *lif, unsigned int type, ...@@ -424,8 +424,9 @@ static int ionic_qcq_alloc(struct ionic_lif *lif, unsigned int type,
ionic_intr_mask_assert(idev->intr_ctrl, new->intr.index, ionic_intr_mask_assert(idev->intr_ctrl, new->intr.index,
IONIC_INTR_MASK_SET); IONIC_INTR_MASK_SET);
new->intr.cpu = new->intr.index % num_online_cpus(); new->intr.cpu = cpumask_local_spread(new->intr.index,
if (cpu_online(new->intr.cpu)) dev_to_node(dev));
if (new->intr.cpu != -1)
cpumask_set_cpu(new->intr.cpu, cpumask_set_cpu(new->intr.cpu,
&new->intr.affinity_mask); &new->intr.affinity_mask);
} else { } else {
......
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