[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <db9acf73-abef-209e-6ec2-8ada92e2cfbc@linux.ibm.com>
Date: Sat, 6 Nov 2021 13:51:04 +0100
From: Karsten Graul <kgraul@...ux.ibm.com>
To: Wen Gu <guwen@...ux.alibaba.com>,
Tony Lu <tonylu@...ux.alibaba.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, dust.li@...ux.alibaba.com,
davem@...emloft.net, kuba@...nel.org
Subject: Re: [PATCH net 4/4] net/smc: Fix wq mismatch issue caused by smc
fallback
On 04/11/2021 05:39, Wen Gu wrote:
> Thanks for your suggestions about implementing SMC own sk_data_ready / sk_write_space and forwarding call to clcsock. It's a great idea. But I found some difficulties here in implementation process:
>
> In my humble opinion, SMC own sk_write_space implementation should be called by clcsk->sk_write_space and complete the following steps:
>
> 1) Get smc_sock through clcsk->sk_user_data, like what did in smc_clcsock_data_ready().
>
> 2) Forward call to original clcsk->sk_write_space, it MIGHT wake up clcsk->sk_wq, depending on whether certain conditions are met.
>
> 3) Wake up smc sk->sk_wq to nodify application if clcsk->sk_write_space acctually wakes up clcsk->sk_wq.
>
> In step 3), it seems a bit troublesome for SMC to know whether clcsk->sk_write_space acctually wake up clcsk->sk_wq, which is a black box to SMC.
>
> There might be a feasible way that add a wait_queue_head_t to clcsk->sk_wq and report to SMC when clcsk->sk_wq is waked up. Then SMC can report to application by waking up smc sk->sk_wq. But that seems to be complex and redundancy.
Hmm so when more certain conditions have to be met in (2) to
actually wake up clcsk->sk_wq then this might not be the right
way to go...
So when there are no better ways I would vote for your initial patch.
But please add the complete description about how this is intended to
work to this patch to allow readers to understand the idea behind it.
Thank you.
Powered by blists - more mailing lists