[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250517080948.3c20db08@kernel.org>
Date: Sat, 17 May 2025 08:09:48 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
Cc: Jiri Pirko <jiri@...nulli.us>, Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Hillf Danton
<hdanton@...a.com>, Network Development <netdev@...r.kernel.org>
Subject: Re: [PATCH (EXPERIMENTAL)] team: replace term lock with rtnl lock
On Sat, 17 May 2025 16:32:20 +0900 Tetsuo Handa wrote:
> - if (!mutex_trylock(&team->lock)) {
> + /* Since this function is called from WQ context, RTNL can't be held by the caller. */
> + if (!rtnl_trylock()) {
> + /*
> + * Since RTNL is shared by many callers, and rtnl_unlock() is a slower operation
> + * than plain mutex_unlock(), rtnl_trylock() will be more easier to compate than
> + * mutex_trylock(). Therefore, we might want to delay a bit before retrying.
> + */
I think this was a trylock because there are places we try to cancel
this work while already holding the lock.
FWIW I'm not opposed to the patch. Could you wait a week and repost,
tho? We have a fix queued up in another tree - 6b1d3c5f675cc7
if we apply your patch to net-next there will be a build failure
on merge. Not a showstopper but we'll merge the trees on Thu so it
can be easily avoided if we wait until then.
Powered by blists - more mailing lists