From: Jakub Kicinski <kuba@kernel.org>
To: Jiri Pirko <jiri@resnulli.us>
Cc: Moshe Shemesh <moshe@nvidia.com>,
"David S. Miller" <davem@davemloft.net>,
Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
Tariq Toukan <tariqt@nvidia.com>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Jiri Pirko <jiri@nvidia.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next 2/9] net: devlink: remove region snapshots list dependency on devlink->lock
Date: Thu, 28 Jul 2022 09:16:45 -0700 [thread overview]
Message-ID: <20220728091645.7ffef7da@kernel.org> (raw)
In-Reply-To: <YuJN1SYkPR33trcs@nanopsycho>
On Thu, 28 Jul 2022 10:50:29 +0200 Jiri Pirko wrote:
> >> So resolve this by removing dependency on devlink->lock for region
> >> snapshots list consistency and introduce new mutex to ensure it.
> >
> >I was hoping to avoid per-subobject locks. What prevents us from
> >depending on the instance lock here (once the driver is converted)?
>
> The fact that it could be called in mlx4 from both devl locked and
> unlocked context. Basically whenever CMD to fw is called.
Ok, I guess mlx4 uses regions as proto-health reporters so too hard of
a battle to fight. Please update the commit message tho.
> What is wrong in small locks here and there when they are sufficient?
The more locks the less obvious the semantics and ordering of locking
are.
next prev parent reply other threads:[~2022-07-28 16:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-27 17:03 [PATCH net-next 0/9] Take devlink lock on mlx4 and mlx5 callbacks Moshe Shemesh
2022-07-27 17:03 ` [PATCH net-next 1/9] net: devlink: remove region snapshot ID tracking dependency on devlink->lock Moshe Shemesh
2022-07-28 1:58 ` Jakub Kicinski
2022-07-28 8:46 ` Jiri Pirko
2022-07-28 9:21 ` Jiri Pirko
2022-07-27 17:03 ` [PATCH net-next 2/9] net: devlink: remove region snapshots list " Moshe Shemesh
2022-07-28 2:01 ` Jakub Kicinski
2022-07-28 8:50 ` Jiri Pirko
2022-07-28 16:16 ` Jakub Kicinski [this message]
2022-07-27 17:03 ` [PATCH net-next 3/9] net/mlx5: Move fw reset unload to mlx5_fw_reset_complete_reload Moshe Shemesh
2022-07-27 17:03 ` [PATCH net-next 4/9] net/mlx5: Lock mlx5 devlink reload callbacks Moshe Shemesh
2022-07-27 17:03 ` [PATCH net-next 5/9] net/mlx4: Use devl_ API for devlink region create / destroy Moshe Shemesh
2022-07-27 17:03 ` [PATCH net-next 6/9] net/mlx4: Use devl_ API for devlink port register / unregister Moshe Shemesh
2022-07-27 17:03 ` [PATCH net-next 7/9] net/mlx4: Lock mlx4 devlink reload callback Moshe Shemesh
2022-07-27 17:03 ` [PATCH net-next 8/9] net/mlx5: Lock mlx5 devlink health recovery callback Moshe Shemesh
2022-07-27 17:03 ` [PATCH net-next 9/9] devlink: Hold the instance lock in health callbacks Moshe Shemesh
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=20220728091645.7ffef7da@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jiri@nvidia.com \
--cc=jiri@resnulli.us \
--cc=leon@kernel.org \
--cc=moshe@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.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;
as well as URLs for NNTP newsgroup(s).