From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
To: Alexander Lobakin <aleksander.lobakin@intel.com>
Cc: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
Jacob Keller <jacob.e.keller@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v1] ice: lower default irq/queue counts on high-core systems
Date: Wed, 22 Oct 2025 09:09:42 +0200 [thread overview]
Message-ID: <aPiDNooOaHEtmQPI@mev-dev.igk.intel.com> (raw)
In-Reply-To: <b1faad7b-531b-429f-97a4-aa93a160569c@intel.com>
On Fri, Oct 17, 2025 at 04:35:18PM +0200, Alexander Lobakin wrote:
> From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Date: Fri, 17 Oct 2025 09:30:44 +0200
>
> > On Fri, Oct 17, 2025 at 07:03:31AM +0200, Przemek Kitszel wrote:
> >> On 10/16/25 17:36, Alexander Lobakin wrote:
> >>> From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> >>> Date: Thu, 16 Oct 2025 08:22:50 +0200
> >>>
> >>>> On some high-core systems loading ice driver with default values can
> >>>> lead to queue/irq exhaustion. It will result in no additional resources
> >>>> for SR-IOV.
> >>>>
> >>>> In most cases there is no performance reason for more than 64 queues.
> >>>> Limit the default value to 64. Still, using ethtool the number of
> >>>> queues can be changed up to num_online_cpus().
> >>>>
> >>>> This change affects only the default queue amount on systems with more
> >>>> than 64 cores.
> >>>>
> >>>> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> >>>> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> >>>> ---
> >>>> drivers/net/ethernet/intel/ice/ice.h | 20 ++++++++++++++++++++
> >>>> drivers/net/ethernet/intel/ice/ice_irq.c | 6 ++++--
> >>>> drivers/net/ethernet/intel/ice/ice_lib.c | 8 ++++----
> >>>> 3 files changed, 28 insertions(+), 6 deletions(-)
> >>>>
> >>>> diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
> >>>> index 3d4d8b88631b..354ec2950ff3 100644
> >>>> --- a/drivers/net/ethernet/intel/ice/ice.h
> >>>> +++ b/drivers/net/ethernet/intel/ice/ice.h
> >>>> @@ -1133,4 +1133,24 @@ static inline struct ice_hw *ice_get_primary_hw(struct ice_pf *pf)
> >>>> else
> >>>> return &pf->adapter->ctrl_pf->hw;
> >>>> }
> >>>> +
> >>>> +/**
> >>>> + * ice_capped_num_cpus - normalize the number of CPUs to a reasonable limit
> >>>> + *
> >>>> + * This function returns the number of online CPUs, but caps it at suitable
> >>>> + * default to prevent excessive resource allocation on systems with very high
> >>>> + * CPU counts.
> >>>> + *
> >>>> + * Note: suitable default is currently at 64, which is reflected in default_cpus
> >>>> + * constant. In most cases there is no much benefit for more than 64 and it is a
> >>>> + * power of 2 number.
> >>>> + *
> >>>> + * Return: number of online CPUs, capped at suitable default.
> >>>> + */
> >>>> +static inline u16 ice_capped_num_cpus(void)
> >>>> +{
> >>>> + const int default_cpus = 64;
> >>>
> >>> Maybe we should just use netif_get_num_default_rss_queues() like I did
> >>> in idpf?
> >>>
> >>> Or it still can be too high e.g. on clusters with > 256 CPUs?
> >>
> >> good point,
> >> perhaps we should both use it and change the (kernel) func to cap at 64
> >>
> >
> > Sounds good, thanks for pointing the function.
> >
> > Do you think it is ok to cap the generic function? Maybe other vendors
> > want more default queues.
>
> Nah I don't think it's a good idea to hardcode any numbers in the
> generic function.
>
> >
> > What about capping netif_get_num_default_rss_queues() at 64 just for
> > ice?
>
> netif_get_num_default_rss_queues() returns *half* of the number of
> *physical* cores. I.e. it will return something bigger than 64 only in
> case of > 256 threads in the system (considering SMT).
>
> Do we need to still cap this to 64 in ice at all?
That can be good enough. I will send next version with just call to this
function.
>
> Thanks,
> Olek
prev parent reply other threads:[~2025-10-22 7:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-16 6:22 [PATCH iwl-next v1] ice: lower default irq/queue counts on high-core systems Michal Swiatkowski
2025-10-16 7:44 ` [Intel-wired-lan] " Paul Menzel
2025-10-16 8:45 ` Michal Swiatkowski
2025-10-16 15:36 ` Alexander Lobakin
2025-10-17 5:03 ` Przemek Kitszel
2025-10-17 7:30 ` Michal Swiatkowski
2025-10-17 14:35 ` Alexander Lobakin
2025-10-22 7:09 ` Michal Swiatkowski [this message]
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=aPiDNooOaHEtmQPI@mev-dev.igk.intel.com \
--to=michal.swiatkowski@linux.intel.com \
--cc=aleksander.lobakin@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jacob.e.keller@intel.com \
--cc=netdev@vger.kernel.org \
--cc=przemyslaw.kitszel@intel.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).