Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1407353pxb; Fri, 21 Jan 2022 17:57:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJzJ+XDMhUu/BV+Kg7+fLeKapO061UkdqKrglE7zgvipv3pAyGBVrKyaTMpfDrZujVdZ+8HH X-Received: by 2002:a17:90b:4f44:: with SMTP id pj4mr3268233pjb.245.1642816660365; Fri, 21 Jan 2022 17:57:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642816660; cv=none; d=google.com; s=arc-20160816; b=TIjfRq1CCCbE1BsDBmV6CPYyakkrFSTF4uXBb1RNKYP+kSNFhQ4XcgwSieWaR6pP6V hqYTw0LTNGNbBvafoM5HHp9iooetbFJ6EuTh+WWO+qG9MF0sU+QpsXxCwPTnkYPPkJfL Axz3JDmCwgVetYZAfb4ti3AqNGPZoD1RWMRAT7jE1wuDdVQxrahvFnZcodAJ5KL22qGs 3EUOqfMKBG6+FTGlix4QGYyQIHTHQtEHZx/ZVvR+L4Dg0Td5zTE3mkS34mnQX109i4xE Cx4BHxDJVt7WK5uZbxDV01i0J6lGYEOfWpRxy7zaSCp5cEASf2yXqoYrSxNaVEfsdCfn EuAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=g8Uv21ICtRKYnh4CQVFbVThNEu2JXphX3tQwL7KYiMc=; b=NXoKDpdFXyWtRCJJUf2jxEg2WvI4tt8LM86XzpSuPHQRLHRh4Wlz9gW69FycULubpA eX/bmuu+/OrdIF0BjWd1+MrM4s7/Hcqo2cbxBSKZhe2nBhHang6QaL4aUp6XlY6Y3PuO EW3Z0ouoNz3ZQ21KOu00tzmvPX0u99cl1VD0Cq2RDX1EfbGPWB3rqy5dxqxIZhFzF/BU fctISkbRPITpD6g9qoisLM2PKIpmsTzDJ13bG6O0JAHLBkM385KW7VB0/Iil6GUHtHhW Mdp3yKvROy3I0hahbou2h/PCGtHlWujpDTjHBPxvCMWyzBYR5nBjbHJCfgEoD2L+AK+F y0Tw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z5si15509plg.136.2022.01.21.17.57.28; Fri, 21 Jan 2022 17:57:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235582AbiAUQWA (ORCPT + 99 others); Fri, 21 Jan 2022 11:22:00 -0500 Received: from out4436.biz.mail.alibaba.com ([47.88.44.36]:15740 "EHLO out4436.biz.mail.alibaba.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232442AbiAUQV7 (ORCPT ); Fri, 21 Jan 2022 11:21:59 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=guangguan.wang@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0V2SWFOq_1642782106; Received: from 30.39.181.79(mailfrom:guangguan.wang@linux.alibaba.com fp:SMTPD_---0V2SWFOq_1642782106) by smtp.aliyun-inc.com(127.0.0.1); Sat, 22 Jan 2022 00:21:47 +0800 Message-ID: <6f1b9813-483b-ea2e-f6da-c349edd34003@linux.alibaba.com> Date: Sat, 22 Jan 2022 00:21:45 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [RFC PATCH net-next] net/smc: Introduce receive queue flow control support Content-Language: en-US To: dust.li@linux.alibaba.com, kgraul@linux.ibm.com, davem@davemloft.net, kuba@kernel.org Cc: linux-s390@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220120065140.5385-1-guangguan.wang@linux.alibaba.com> <20220120095130.GB41938@linux.alibaba.com> From: Guangguan Wang In-Reply-To: <20220120095130.GB41938@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/1/20 17:51, dust.li wrote: > On Thu, Jan 20, 2022 at 02:51:40PM +0800, Guangguan Wang wrote: >> This implement rq flow control in smc-r link layer. QPs >> communicating without rq flow control, in the previous >> version, may result in RNR (reveive not ready) error, which >> means when sq sends a message to the remote qp, but the >> remote qp's rq has no valid rq entities to receive the message. >> In RNR condition, the rdma transport layer may retransmit >> the messages again and again until the rq has any entities, >> which may lower the performance, especially in heavy traffic. >> Using credits to do rq flow control can avoid the occurrence >> of RNR. > > I'm wondering if SRQ can be used to solve this problem ? > > One of my concern on credit-base flow control is if the RTT is > a bit longer, we may have to wait RTT/2 for peer to grant us credit > before we can really send more data. That may decrease the maximium > bandwidth we can achive in this case. Longer RTT can result in more inflight messages and increase the announcement latency indeed. The following items are used in this patch to reduce the pact of this situation. - More rqe. (average 2 credits per smc_connection now, longer RTT is a good case for me to check whether an average of 2 is enough. As each additional rqe only increases the memory by 104 Bytes, SRQ may be an icing on the cake option to reduce memory usage) - Announce frequenly. (credits carried by every cdc msg) - Avoid credit accumulation. (announce as soon as the low watermark(1/3 rq entities) is reached)