* [PATCH net-next] net/smc: Optimize the timing of unlocking in smc_listen_work
@ 2024-11-30 8:26 liqiang
2024-11-30 19:04 ` Jakub Kicinski
0 siblings, 1 reply; 3+ messages in thread
From: liqiang @ 2024-11-30 8:26 UTC (permalink / raw)
To: wenjia, jaka, alibuda, tonylu, guwen
Cc: linux-s390, netdev, luanjianhai, zhangxuzhou4, dengguangxing,
gaochao24, liqiang64
The optimized code is equivalent to the original process, and it releases the
lock early.
Signed-off-by: liqiang <liqiang64@huawei.com>
---
net/smc/af_smc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
index 9d76e902fd77..7fa80be1ea93 100644
--- a/net/smc/af_smc.c
+++ b/net/smc/af_smc.c
@@ -2526,9 +2526,9 @@ static void smc_listen_work(struct work_struct *work)
if (!ini->is_smcd) {
rc = smc_listen_rdma_finish(new_smc, cclc,
ini->first_contact_local, ini);
- if (rc)
- goto out_unlock;
mutex_unlock(&smc_server_lgr_pending);
+ if (rc)
+ goto out_decl;
}
smc_conn_save_peer_info(new_smc, cclc);
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net/smc: Optimize the timing of unlocking in smc_listen_work
2024-11-30 8:26 [PATCH net-next] net/smc: Optimize the timing of unlocking in smc_listen_work liqiang
@ 2024-11-30 19:04 ` Jakub Kicinski
2024-12-02 2:20 ` Li Qiang
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Kicinski @ 2024-11-30 19:04 UTC (permalink / raw)
To: liqiang
Cc: wenjia, jaka, alibuda, tonylu, guwen, linux-s390, netdev,
luanjianhai, zhangxuzhou4, dengguangxing, gaochao24
On Sat, 30 Nov 2024 16:26:30 +0800 liqiang wrote:
> The optimized code is equivalent to the original process, and it releases the
> lock early.
By a single clock cycle? You need to provide much more detailed
justification, otherwise this looks like churn for no real gain.
--
pw-bot: cr
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net/smc: Optimize the timing of unlocking in smc_listen_work
2024-11-30 19:04 ` Jakub Kicinski
@ 2024-12-02 2:20 ` Li Qiang
0 siblings, 0 replies; 3+ messages in thread
From: Li Qiang @ 2024-12-02 2:20 UTC (permalink / raw)
To: Jakub Kicinski
Cc: wenjia, jaka, alibuda, tonylu, guwen, linux-s390, netdev,
luanjianhai, zhangxuzhou4, dengguangxing, gaochao24
在 2024/12/1 3:04, Jakub Kicinski 写道:
> On Sat, 30 Nov 2024 16:26:30 +0800 liqiang wrote:
>> The optimized code is equivalent to the original process, and it releases the
>> lock early.
>
> By a single clock cycle? You need to provide much more detailed
> justification, otherwise this looks like churn for no real gain.
I don't have any more information about this patch, I saw that
the lock will be released regardless of branch true or false,
so brought it forward.
Thanks for your reply, Jakub!
:)
--
Cheers,
Li Qiang
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-02 2:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-30 8:26 [PATCH net-next] net/smc: Optimize the timing of unlocking in smc_listen_work liqiang
2024-11-30 19:04 ` Jakub Kicinski
2024-12-02 2:20 ` Li Qiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox