[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ieeem2dc5mifpj2t45wnruzxmo4cp35mbvrnsgkebsqpmxj5ib@hn7gphf6io7x>
Date: Fri, 14 Feb 2025 13:54:43 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: Tariq Toukan <tariqt@...dia.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Eric Dumazet <edumazet@...gle.com>, Andrew Lunn <andrew+netdev@...n.ch>,
Jiri Pirko <jiri@...dia.com>, Cosmin Ratiu <cratiu@...dia.com>,
Carolina Jubran <cjubran@...dia.com>, Gal Pressman <gal@...dia.com>, Mark Bloch <mbloch@...dia.com>,
Donald Hunter <donald.hunter@...il.com>, Jonathan Corbet <corbet@....net>,
Saeed Mahameed <saeedm@...dia.com>, Leon Romanovsky <leon@...nel.org>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org, linux-rdma@...r.kernel.org
Subject: Re: [PATCH net-next 03/10] devlink: Serialize access to rate domains
Thu, Feb 13, 2025 at 07:01:27PM +0100, tariqt@...dia.com wrote:
>From: Cosmin Ratiu <cratiu@...dia.com>
>
>Access to rates in a rate domain should be serialized.
>
>This commit introduces two new functions, devl_rate_domain_lock and
>devl_rate_domain_unlock, and uses them whenever serial access to a rate
>domain is needed. For now, they are no-ops since access to a rate domain
>is protected by the devlink lock.
>
>Signed-off-by: Cosmin Ratiu <cratiu@...dia.com>
>Reviewed-by: Carolina Jubran <cjubran@...dia.com>
>Signed-off-by: Tariq Toukan <tariqt@...dia.com>
>---
> net/devlink/devl_internal.h | 4 ++
> net/devlink/rate.c | 114 +++++++++++++++++++++++++++---------
> 2 files changed, 89 insertions(+), 29 deletions(-)
>
>diff --git a/net/devlink/devl_internal.h b/net/devlink/devl_internal.h
>index 209b4a4c7070..fae81dd6953f 100644
>--- a/net/devlink/devl_internal.h
>+++ b/net/devlink/devl_internal.h
>@@ -121,6 +121,10 @@ static inline void devl_dev_unlock(struct devlink *devlink, bool dev_lock)
> device_unlock(devlink->dev);
> }
>
>+static inline void devl_rate_domain_lock(struct devlink *devlink) { }
>+
>+static inline void devl_rate_domain_unlock(struct devlink *devlink) { }
For the record, I'm still not convinced that introducing this kind of
shared inter-devlink lock is good idea. We spent quite a bit of painful
times getting rid of global devlink_mutex and making devlink locking
scheme nice and simple as it currently is.
But at the same time I admit I can't think of any other nicer solution
to the problem this patchset is trying to solve.
Jakub, any thoughts?
Powered by blists - more mailing lists