From: Karsten Graul <kgraul@linux.ibm.com>
To: Guangguan Wang <guangguan.wang@linux.alibaba.com>,
Stefan Raspl <raspl@linux.ibm.com>
Cc: linux-s390@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, kuba@kernel.org,
davem@davemloft.net
Subject: Re: [RFC PATCH net-next] net/smc: Introduce receive queue flow control support
Date: Mon, 31 Jan 2022 13:56:15 +0100 [thread overview]
Message-ID: <a1c8957b-8ca8-fa84-105f-17619b2c8371@linux.ibm.com> (raw)
In-Reply-To: <a297c8cf-384c-2184-aabb-49ee32476d99@linux.alibaba.com>
On 29/01/2022 04:43, Guangguan Wang wrote:
>
> On 2022/1/25 17:42, Stefan Raspl wrote:
>>
>> That's some truly substantial improvements!
>> But we need to be careful with protocol-level changes: There are other operating systems like z/OS and AIX which have compatible implementations of SMC, too. Changes like a reduction of connections per link group or usage of reserved fields would need to be coordinated, and likely would have unwanted side-effects even when used with older Linux kernel versions.
>> Changing the protocol is "expensive" insofar as it requires time to thoroughly discuss the changes, perform compatibility tests, and so on.
>> So I would like to urge you to investigate alternative ways that do not require protocol-level changes to address this scenario, e.g. by modifying the number of completion queue elements, to see if this could yield similar results.
>>
>> Thx!
>>
>
> Yes, there are alternative ways, as RNR caused by the missmatch of send rate and receive rate, which means sending too fast
> or receiving too slow. What I have done in this patch is to backpressure the sending side when sending too fast.
>
> Another solution is to process and refill the receive queue as quickly as posibble, which requires no protocol-level change.
> The fllowing modifications are needed:
> - Enqueue cdc msgs to backlog queues instead of processing in rx tasklet. llc msgs remain unchanged.
> - A mempool is needed as cdc msgs are processed asynchronously. Allocate new receive buffers from mempool when refill receive queue.
> - Schedule backlog queues to other cpus, which are calculated by 4-tuple or 5-tuple hash of the connections, to process the cdc msgs,
> in order to reduce the usage of the cpu where rx tasklet runs on.
>
> the pseudocode shows below:
> rx_tasklet
> if cdc_msgs
> enqueue to backlog;
> maybe smp_call_function_single_async is needed to wakeup the corresponding cpu to process backlog;
> allocate new buffer and modify the sge in rq_wr;
> else
> process remains unchanged;
> endif
>
> post_recv rq_wr;
> end rx_tasklet
>
> smp_backlog_process in corresponding cpu, called by smp_call_function_single_async
> for connections hashed to this cpu
> for cdc_msgs in backlog
> process cdc msgs;
> end cdc_msgs
> end connections
> end smp_backlog_process
>
> I‘d like to hear your suggestions of this solution.
> Thank you.
I like this idea, this should improve the RX handling a lot!
prev parent reply other threads:[~2022-01-31 12:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-20 6:51 [RFC PATCH net-next] net/smc: Introduce receive queue flow control support Guangguan Wang
2022-01-20 8:24 ` Leon Romanovsky
2022-01-20 9:20 ` Guangguan Wang
2022-01-20 9:51 ` dust.li
2022-01-21 16:21 ` Guangguan Wang
2022-01-20 11:03 ` Karsten Graul
2022-01-21 16:36 ` Guangguan Wang
2022-01-20 14:22 ` Tony Lu
2022-01-21 16:48 ` Guangguan Wang
2022-01-25 9:42 ` Stefan Raspl
2022-01-29 3:43 ` Guangguan Wang
2022-01-29 4:24 ` Tony Lu
2022-01-31 12:56 ` Karsten Graul [this message]
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=a1c8957b-8ca8-fa84-105f-17619b2c8371@linux.ibm.com \
--to=kgraul@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=guangguan.wang@linux.alibaba.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=raspl@linux.ibm.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).