From: Shannon Nelson <snelson@pensando.io>
To: netdev@vger.kernel.org, davem@davemloft.net
Cc: Shannon Nelson <snelson@pensando.io>
Subject: [PATCH v3 net-next 3/8] ionic: improve irq numa locality
Date: Wed, 4 Mar 2020 21:23:14 -0800 [thread overview]
Message-ID: <20200305052319.14682-4-snelson@pensando.io> (raw)
In-Reply-To: <20200305052319.14682-1-snelson@pensando.io>
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: Shannon Nelson <snelson@pensando.io>
---
drivers/net/ethernet/pensando/ionic/ionic_lif.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
index 1b7e18fe83db..7df49b433ae5 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
@@ -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_SET);
- new->intr.cpu = new->intr.index % num_online_cpus();
- if (cpu_online(new->intr.cpu))
+ new->intr.cpu = cpumask_local_spread(new->intr.index,
+ dev_to_node(dev));
+ if (new->intr.cpu != -1)
cpumask_set_cpu(new->intr.cpu,
&new->intr.affinity_mask);
} else {
--
2.17.1
next prev parent reply other threads:[~2020-03-05 5:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-05 5:23 [PATCH v3 net-next 0/8] ionic updates Shannon Nelson
2020-03-05 5:23 ` [PATCH v3 net-next 1/8] ionic: keep ionic dev on lif init fail Shannon Nelson
2020-03-05 5:23 ` [PATCH v3 net-next 2/8] ionic: remove pragma packed Shannon Nelson
2020-03-05 5:23 ` Shannon Nelson [this message]
2020-03-05 5:23 ` [PATCH v3 net-next 4/8] ionic: clean up bitflag usage Shannon Nelson
2020-03-05 5:23 ` [PATCH v3 net-next 5/8] ionic: support ethtool rxhash disable Shannon Nelson
2020-03-05 5:23 ` [PATCH v3 net-next 6/8] ionic: print pci bus lane info Shannon Nelson
2020-03-05 5:23 ` [PATCH v3 net-next 7/8] ionic: add support for device id 0x1004 Shannon Nelson
2020-03-05 22:03 ` Jakub Kicinski
2020-03-06 0:41 ` Shannon Nelson
2020-03-06 1:18 ` Jakub Kicinski
2020-03-06 7:43 ` Shannon Nelson
2020-03-06 18:20 ` Jakub Kicinski
2020-03-06 20:32 ` Shannon Nelson
2020-03-06 21:28 ` Jakub Kicinski
2020-03-06 22:57 ` Shannon Nelson
2020-03-05 5:23 ` [PATCH v3 net-next 8/8] ionic: drop ethtool driver version Shannon Nelson
2020-03-05 6:10 ` Leon Romanovsky
2020-03-05 7:20 ` Shannon Nelson
2020-03-05 7:52 ` Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200305052319.14682-4-snelson@pensando.io \
--to=snelson@pensando.io \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).