BPF List
 help / color / mirror / Atom feed
From: Cosmin Ratiu <cratiu@nvidia.com>
To: Tariq Toukan <tariqt@nvidia.com>,
	"stfomichev@gmail.com" <stfomichev@gmail.com>
Cc: "corbet@lwn.net" <corbet@lwn.net>,
	"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
	"hawk@kernel.org" <hawk@kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"john.fastabend@gmail.com" <john.fastabend@gmail.com>,
	"leon@kernel.org" <leon@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"edumazet@google.com" <edumazet@google.com>,
	"ast@kernel.org" <ast@kernel.org>,
	"jiri@resnulli.us" <jiri@resnulli.us>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	Jiri Pirko <jiri@nvidia.com>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	Dragos Tatulea <dtatulea@nvidia.com>,
	Mark Bloch <mbloch@nvidia.com>,
	"daniel@iogearbox.net" <daniel@iogearbox.net>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	Saeed Mahameed <saeedm@nvidia.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"kuba@kernel.org" <kuba@kernel.org>,
	Gal Pressman <gal@nvidia.com>, "jgg@ziepe.ca" <jgg@ziepe.ca>
Subject: Re: [PATCH net-next 10/10] net/mlx5e: Use the 'num_doorbells' devlink param
Date: Tue, 16 Sep 2025 08:32:22 +0000	[thread overview]
Message-ID: <a36bc123aa1021a5aeca0494f4b8ea140ef789d0.camel@nvidia.com> (raw)
In-Reply-To: <aMGkaDoZpmOWUA_L@mini-arch>

On Wed, 2025-09-10 at 09:16 -0700, Stanislav Fomichev wrote:
> > +       - 0: No channel-specific doorbells, use the global one for
> > everything.
> > +       - [1, max_num_channels]: Spread netdev channels equally
> > across these
> > +         doorbells.
> 
> Do you have any guidance on this number? Why would the user want
> `num_doorbells < num_doorbells` vs `num_doorbells == num_channels`?
> 
> IOW, why not allocate the same number of doorbells as the number of
> channels and do it unconditionally without devlink param? Are extra
> doorbells causing any overhead in the non-contended case?

In most cases, additional doorbells are an overhead and not required.
For the last 10+ years, mlx5 has been running with a single doorbell
for all channels. But as the number of cores and channels grew,
bottlenecks were discovered on some platforms. Thus the need for this
series.

This series proposes 8 as the new default and we expect nobody would
need to touch this knob except in extreme cases, but I think it's nice
for it to exist. Regression testing showed little to no impact on most
platforms where 1 doorbell was enough, and a significant improvement on
platforms that showed MMIO bottlenecks.

I'll add some numbers in the next version's cover letter.

Cosmin.

  parent reply	other threads:[~2025-09-16  8:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-10 10:24 [PATCH net-next 00/10] net/mlx5e: Use multiple doorbells Tariq Toukan
2025-09-10 10:24 ` [PATCH net-next 01/10] net/mlx5: Fix typo of MLX5_EQ_DOORBEL_OFFSET Tariq Toukan
2025-09-10 10:24 ` [PATCH net-next 02/10] net/mlx5: Remove unused 'offset' field from mlx5_sq_bfreg Tariq Toukan
2025-09-10 10:24 ` [PATCH net-next 03/10] net/mlx5e: Remove unused 'xsk' param of mlx5e_build_xdpsq_param Tariq Toukan
2025-09-10 10:24 ` [PATCH net-next 04/10] net/mlx5: Store the global doorbell in mlx5_priv Tariq Toukan
2025-09-10 10:24 ` [PATCH net-next 05/10] net/mlx5e: Prepare for using multiple TX doorbells Tariq Toukan
2025-09-10 10:24 ` [PATCH net-next 06/10] net/mlx5e: Prepare for using different CQ doorbells Tariq Toukan
2025-09-10 10:24 ` [PATCH net-next 07/10] net/mlx5e: Use multiple TX doorbells Tariq Toukan
2025-09-10 10:24 ` [PATCH net-next 08/10] net/mlx5e: Use multiple CQ doorbells Tariq Toukan
2025-09-10 10:24 ` [PATCH net-next 09/10] devlink: Add a 'num_doorbells' driverinit param Tariq Toukan
2025-09-10 10:24 ` [PATCH net-next 10/10] net/mlx5e: Use the 'num_doorbells' devlink param Tariq Toukan
2025-09-10 16:16   ` Stanislav Fomichev
2025-09-10 16:23     ` Jason Gunthorpe
2025-09-16  8:32     ` Cosmin Ratiu [this message]
2025-09-10 17:23   ` Jakub Kicinski

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=a36bc123aa1021a5aeca0494f4b8ea140ef789d0.camel@nvidia.com \
    --to=cratiu@nvidia.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=corbet@lwn.net \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dtatulea@nvidia.com \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=hawk@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=jiri@nvidia.com \
    --cc=jiri@resnulli.us \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mbloch@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.com \
    --cc=stfomichev@gmail.com \
    --cc=tariqt@nvidia.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