From: Simon Horman <horms@kernel•org>
To: Shradha Gupta <shradhagupta@linux•microsoft.com>
Cc: Dexuan Cui <decui@microsoft•com>, Wei Liu <wei.liu@kernel•org>,
Haiyang Zhang <haiyangz@microsoft•com>,
"K. Y. Srinivasan" <kys@microsoft•com>,
Andrew Lunn <andrew+netdev@lunn•ch>,
"David S. Miller" <davem@davemloft•net>,
Eric Dumazet <edumazet@google•com>,
Jakub Kicinski <kuba@kernel•org>, Paolo Abeni <pabeni@redhat•com>,
Konstantin Taranov <kotaranov@microsoft•com>,
Erni Sri Satya Vennela <ernis@linux•microsoft.com>,
Dipayaan Roy <dipayanroy@linux•microsoft.com>,
Shiraz Saleem <shirazsaleem@microsoft•com>,
Michael Kelley <mhklinux@outlook•com>,
Long Li <longli@microsoft•com>, Yury Norov <yury.norov@gmail•com>,
linux-hyperv@vger•kernel.org, linux-kernel@vger•kernel.org,
netdev@vger•kernel.org, Paul Rosswurm <paulros@microsoft•com>,
Shradha Gupta <shradhagupta@microsoft•com>,
Saurabh Singh Sengar <ssengar@microsoft•com>,
stable@vger•kernel.org
Subject: Re: [PATCH net v2] net: mana: Optimize irq affinity for low vcpu configs
Date: Fri, 1 May 2026 10:12:02 +0100 [thread overview]
Message-ID: <20260501091202.GA15617@horms.kernel.org> (raw)
In-Reply-To: <20260429090640.1790104-1-shradhagupta@linux.microsoft.com>
On Wed, Apr 29, 2026 at 02:06:37AM -0700, Shradha Gupta wrote:
> In mana driver, the number of IRQs allocated is capped by the
> min(num_cpu + 1, queue count). In cases, where the IRQ count is greater
> than the vcpu count, we want to utilize all the vCPUs, irrespective of
> their NUMA/core bindings.
>
> This is important, especially in the envs where number of vCPUs are so
> few that the softIRQ handling overhead on two IRQs on the same vCPU is
> much more than their overheads if they were spread across sibling vCPUs.
>
> This behaviour is more evident with dynamic IRQ allocation. Since MANA
> IRQs are assigned at a later stage compared to static allocation, other
> device IRQs may already be affinitized to the vCPUs. As a result, IRQ
> weights become imbalanced, causing multiple MANA IRQs to land on the
> same vCPU, while some vCPUs have none.
>
> In such cases when many parallel TCP connections are tested, the
> throughput drops significantly.
...
> Fixes: 755391121038 ("net: mana: Allocate MSI-X vectors dynamically")
> Cc: stable@vger•kernel.org
> Co-developed-by: Erni Sri Satya Vennela <ernis@linux•microsoft.com>
> Signed-off-by: Erni Sri Satya Vennela <ernis@linux•microsoft.com>
> Signed-off-by: Shradha Gupta <shradhagupta@linux•microsoft.com>
> Reviewed-by: Haiyang Zhang <haiyangz@microsoft•com>
> ---
> Changes in v2
> * Removed the unused skip_first_cpu variable
> * fixed exit condition in irq_setup_linear() with len == 0
> * changed return type of irq_setup_linear() as it will always be 0
> * removed the unnecessary rcu_read_lock() in irq_setup_linear()
> * added appropriate comments to indicate expected behaviour when
> IRQs are more than or equal to num_online_cpus()
Reviewed-by: Simon Horman <horms@kernel•org>
next prev parent reply other threads:[~2026-05-01 9:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 9:06 [PATCH net v2] net: mana: Optimize irq affinity for low vcpu configs Shradha Gupta
2026-05-01 9:12 ` Simon Horman [this message]
2026-05-01 16:22 ` Yury Norov
2026-05-02 14:37 ` Shradha Gupta
2026-05-02 17:15 ` Yury Norov
2026-05-05 6:15 ` Shradha Gupta
2026-05-05 15:43 ` Yury Norov
2026-05-08 5:51 ` Shradha Gupta
2026-05-10 20:00 ` Yury Norov
2026-05-18 7:04 ` Erni Sri Satya Vennela
2026-05-26 13:05 ` Shradha Gupta
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=20260501091202.GA15617@horms.kernel.org \
--to=horms@kernel$(echo .)org \
--cc=andrew+netdev@lunn$(echo .)ch \
--cc=davem@davemloft$(echo .)net \
--cc=decui@microsoft$(echo .)com \
--cc=dipayanroy@linux$(echo .)microsoft.com \
--cc=edumazet@google$(echo .)com \
--cc=ernis@linux$(echo .)microsoft.com \
--cc=haiyangz@microsoft$(echo .)com \
--cc=kotaranov@microsoft$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=kys@microsoft$(echo .)com \
--cc=linux-hyperv@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=longli@microsoft$(echo .)com \
--cc=mhklinux@outlook$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=paulros@microsoft$(echo .)com \
--cc=shirazsaleem@microsoft$(echo .)com \
--cc=shradhagupta@linux$(echo .)microsoft.com \
--cc=shradhagupta@microsoft$(echo .)com \
--cc=ssengar@microsoft$(echo .)com \
--cc=stable@vger$(echo .)kernel.org \
--cc=wei.liu@kernel$(echo .)org \
--cc=yury.norov@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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