From: Jakub Kicinski <kuba@kernel.org>
To: Saeed Mahameed <saeedm@nvidia.com>
Cc: Shay Drory <shayd@nvidia.com>, Jiri Pirko <jiri@nvidia.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next 0/4] net/mlx5: Memory optimizations
Date: Thu, 2 Dec 2021 17:28:03 -0800 [thread overview]
Message-ID: <20211202172803.10cd5deb@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <36d138a36fb1f86397929d56e6b716e89fc61e2e.camel@nvidia.com>
On Thu, 2 Dec 2021 18:55:37 +0000 Saeed Mahameed wrote:
> On Thu, 2021-12-02 at 09:31 -0800, Jakub Kicinski wrote:
> > On Wed, 1 Dec 2021 10:22:17 +0200 Shay Drory wrote:
> > > EQ resides in the host memory. It is RO for host driver, RW by
> > > device.
> > > When interrupt is generated EQ entry is placed by device and read
> > > by driver.
> > > It indicates about what event occurred such as CQE, async and more.
> >
> > I understand that. My point was the resource which is being consumed
> > here is _host_ memory. Is there precedent for configuring host memory
> > consumption via devlink resource?
>
> it's a device resource size nonetheless, devlink resource API makes
> total sense.
I disagree. Devlink resources were originally written to partition
finite device resources. You're just sizing a queue here.
> > I'd even question whether this belongs in devlink in the first place.
> > It is not global device config in any way. If devlink represents the
> > entire device it's rather strange to have a case where main instance
> > limits a size of some resource by VFs and other endpoints can still
> > choose whatever they want.
>
> This resource is per function instance, we have devlink instance per
> function, e.g. in the VM, there is a VF devlink instance the VM user
> can use to control own VF resources. in the PF/Hypervisor, the only
> devlink representation of the VF will be devlink port function (used
> for other purposes)
>
> for example:
>
> A tenant can fine-tune a resource size tailored to their needs via the
> VF's own devlink instance.
Yeah, because it's a device resource. Tenant can consume their host
DRAM in any way they find suitable.
> An admin can only control or restrict a max size of a resource for a
> given port function ( the devlink instance that represents the VF in
> the hypervisor). (note: this patchset is not about that)
>
> > > So far no feedback by other vendors.
> > > The resources are implemented in generic way, if other vendors
> > > would
> > > like to implement them.
> >
> > Well, I was hoping you'd look around, but maybe that's too much to
> > ask of a vendor.
>
> We looked, eq is a common object among many other drivers.
> and DEVLINK_PARAM_GENERIC_ID_MAX_MACS is already a devlink generic
> param, and i am sure other vendors have limited macs per VF :) ..
> so this applies to all vendors even if they don't advertise it.
Yeah, if you're not willing to model the Event Queue as a queue using
params seems like a better idea than abusing resources.
next prev parent reply other threads:[~2021-12-03 1:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-30 15:07 [PATCH net-next 0/4] net/mlx5: Memory optimizations Shay Drory
2021-11-30 15:07 ` [PATCH net-next 1/4] net/mlx5: Let user configure io_eq_size resource Shay Drory
2021-11-30 15:07 ` [PATCH net-next 2/4] net/mlx5: Let user configure event_eq_size resource Shay Drory
2021-11-30 15:07 ` [PATCH net-next 3/4] devlink: Clarifies max_macs generic devlink param Shay Drory
2021-11-30 15:07 ` [PATCH net-next 4/4] net/mlx5: Let user configure max_macs generic param Shay Drory
2021-11-30 19:39 ` [PATCH net-next 0/4] net/mlx5: Memory optimizations Jakub Kicinski
2021-12-01 8:22 ` Shay Drory
2021-12-02 17:31 ` Jakub Kicinski
2021-12-02 18:55 ` Saeed Mahameed
2021-12-03 1:28 ` Jakub Kicinski [this message]
2021-12-06 8:18 ` Jiri Pirko
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=20211202172803.10cd5deb@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=jiri@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=saeedm@nvidia.com \
--cc=shayd@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;
as well as URLs for NNTP newsgroup(s).