[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <acaf3d5a-219b-3eec-3a65-91d3fdfb21e9@linux.ibm.com>
Date: Fri, 29 Oct 2021 11:40:17 +0200
From: Karsten Graul <kgraul@...ux.ibm.com>
To: Tony Lu <tonylu@...ux.alibaba.com>, davem@...emloft.net,
kuba@...nel.org, ubraun@...ux.ibm.com
Cc: netdev@...r.kernel.org, linux-s390@...r.kernel.org,
linux-rdma@...r.kernel.org, jacob.qi@...ux.alibaba.com,
xuanzhuo@...ux.alibaba.com, guwen@...ux.alibaba.com,
dust.li@...ux.alibaba.com
Subject: Re: [PATCH net 4/4] net/smc: Fix wq mismatch issue caused by smc
fallback
On 27/10/2021 10:52, Tony Lu wrote:
> From: Wen Gu <guwen@...ux.alibaba.com>
>
> A socket_wq mismatch issue may occur because of fallback.
>
> When use SMC to replace TCP, applications add an epoll entry into SMC
> socket's wq, but kernel uses clcsock's wq instead of SMC socket's wq
> once fallback occurs, which means the application's epoll fd dosen't
> work anymore.
I am not sure if I understand this fix completely, please explain your intentions
for the changes in more detail.
What I see so far:
- smc_create() swaps the sk->sk_wq of the clcsocket and the new SMC socket
- sets clcsocket sk->sk_wq to smcsocket->wq (why?)
- sets smcsocket sk->sk_wq to clcsocket->wq (why?)
- smc_switch_to_fallback() resets the clcsock sk->sk_wq to clcsocket->wq
- smc_accept() sets smcsocket sk->sk_wq to clcsocket->wq when it is NOT fallback
- but this was already done before in smc_create() ??
- smc_poll() now always uses clcsocket->wq for the call to sock_poll_wait()
In smc_poll() the comment says that now clcsocket->wq is used for poll, whats
the relation between socket->wq and socket->sk->sk_wq here?
Powered by blists - more mailing lists