From: Andy Gospodarek <andrew.gospodarek@broadcom.com>
To: Mohammad Heib <mheib@redhat.com>
Cc: netdev@vger.kernel.org, michael.chan@broadcom.com, skotur@broadcom.com
Subject: Re: [PATCH net] bnxt_en: use irq_update_affinity_hint()
Date: Wed, 6 Nov 2024 18:24:13 -0500 [thread overview]
Message-ID: <Zyv6ncZSVR5mohsF@JRM7P7Q02P> (raw)
In-Reply-To: <20241106180811.385175-1-mheib@redhat.com>
On Wed, Nov 06, 2024 at 08:08:11PM +0200, Mohammad Heib wrote:
> irq_set_affinity_hint() is deprecated, Use irq_update_affinity_hint()
> instead. This removes the side-effect of actually applying the affinity.
>
> The driver does not really need to worry about spreading its IRQs across
> CPUs. The core code already takes care of that. when the driver applies the
> affinities by itself, it breaks the users' expectations:
>
> 1. The user configures irqbalance with IRQBALANCE_BANNED_CPULIST in
> order to prevent IRQs from being moved to certain CPUs that run a
> real-time workload.
>
> 2. bnxt_en device reopening will resets the affinity
> in bnxt_open().
>
> 3. bnxt_en has no idea about irqbalance's config, so it may move an IRQ to
> a banned CPU. The real-time workload suffers unacceptable latency.
>
Thanks for the patch. This seems inline with what have been done in other
drivers.
> Signed-off-by: Mohammad Heib <mheib@redhat.com>
Reviewed-by: Andy Gospodarek <gospo@broadcom.com>
> ---
> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> index 99d025b69079..cd82f93b20a1 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> @@ -10885,7 +10885,7 @@ static void bnxt_free_irq(struct bnxt *bp)
> irq = &bp->irq_tbl[map_idx];
> if (irq->requested) {
> if (irq->have_cpumask) {
> - irq_set_affinity_hint(irq->vector, NULL);
> + irq_update_affinity_hint(irq->vector, NULL);
> free_cpumask_var(irq->cpu_mask);
> irq->have_cpumask = 0;
> }
> @@ -10940,10 +10940,10 @@ static int bnxt_request_irq(struct bnxt *bp)
> irq->have_cpumask = 1;
> cpumask_set_cpu(cpumask_local_spread(i, numa_node),
> irq->cpu_mask);
> - rc = irq_set_affinity_hint(irq->vector, irq->cpu_mask);
> + rc = irq_update_affinity_hint(irq->vector, irq->cpu_mask);
> if (rc) {
> netdev_warn(bp->dev,
> - "Set affinity failed, IRQ = %d\n",
> + "Update affinity hint failed, IRQ = %d\n",
> irq->vector);
> break;
> }
> --
> 2.34.3
>
next prev parent reply other threads:[~2024-11-06 23:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-06 18:08 [PATCH net] bnxt_en: use irq_update_affinity_hint() Mohammad Heib
2024-11-06 23:24 ` Andy Gospodarek [this message]
2024-11-07 3:42 ` Somnath Kotur
2024-11-12 0:10 ` patchwork-bot+netdevbpf
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=Zyv6ncZSVR5mohsF@JRM7P7Q02P \
--to=andrew.gospodarek@broadcom.com \
--cc=mheib@redhat.com \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=skotur@broadcom.com \
/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).