Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2739030rdd; Fri, 12 Jan 2024 23:12:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IFWprRSMsr+LyWY4gjfZCm/JwrX8orsxdRQsZK2vsQDsChgUgMGhHWX9DeOOeSkBcILQnO5 X-Received: by 2002:a05:6402:40c9:b0:555:9dc6:db with SMTP id z9-20020a05640240c900b005559dc600dbmr1107374edb.96.1705129947319; Fri, 12 Jan 2024 23:12:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705129947; cv=none; d=google.com; s=arc-20160816; b=TIkCyHtGe/5pB7DUHA/vqqkygDo9tBpWQOUIsm/GdOhJuSgl91KzmOBnStCiN5WZuV OuVUFtwnBHcL7Qu3pyqM69oQDZt89i/9YCJjUC2OvD7J5yHKVEtIjO/NcjRM7lG7VU5L lHDNOfBhzHzHKCcm6rkzo7PPUU2g4X6H4HxXLb7yKqxGSX9EpEKqktKEv86XvVFblhPI LooQPAgB3hQDJBQKXjpmVp9EnwUkkrubWRdyB/LGGoAYXZNlFQdgnPf3vFgbD8mgPgCe B9pYIlHTgmWtVUiRQpM7qS8ByA+4p9nRW/LrMoPg/jmjcr4VmgLsDdRnAO6bMdH48E0F iifQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id; bh=+MXNNMO+Qvxn8rO6udJe41vMrQY3qeCn2s7PeOYPxBU=; fh=GN3d20DNTvTBIPJkwHLorVBf1cy/WBzrd53kvkI3MNI=; b=pAq2OU2cxBwq7CZ0G3v9TXiJvzOOS7NVpqER8XmFfL40uUBDvaNzHT1gAZIsrue8zl xP7aWsOa4ICvccLZ/5JKtaZPieRO/JXIce7I9GL5DTQzXbdnHr3Dkb76hU9a5S4p7uGV nbij8xURJ3hhpPtrjWcEeQW5XL1FZotyWBxEY5YAqZnkv14f2Q4o3IekpNxxVpkjWiA2 +HPiiJUnQLOhfdgOuyTTz8diHtQU41MBt/+CEBAO/pWtz2/HzbA0Nrn+Ou+I2ZhBH/nH 9mxlirKBjbARCSsu1wWmzX1pPMnJS5UA9e5UpbCJ/C2g7Qmqk4Dx24hoD+HRlQAavqKk 5GWA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-25209-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25209-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id l6-20020aa7c3c6000000b00558bdc6d281si1381948edr.255.2024.01.12.23.12.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 23:12:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25209-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-25209-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25209-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 129FC1F22323 for ; Sat, 13 Jan 2024 07:12:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 70A6218B1B; Sat, 13 Jan 2024 07:12:16 +0000 (UTC) Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 708D814262; Sat, 13 Jan 2024 07:12:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R901e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=guwen@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0W-V4eFs_1705129921; Received: from 30.0.168.206(mailfrom:guwen@linux.alibaba.com fp:SMTPD_---0W-V4eFs_1705129921) by smtp.aliyun-inc.com; Sat, 13 Jan 2024 15:12:03 +0800 Message-ID: Date: Sat, 13 Jan 2024 15:12:00 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next 14/15] net/smc: introduce loopback-ism DMB data copy control To: Niklas Schnelle , wintera@linux.ibm.com, wenjia@linux.ibm.com, hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, jaka@linux.ibm.com Cc: borntraeger@linux.ibm.com, svens@linux.ibm.com, alibuda@linux.alibaba.com, tonylu@linux.alibaba.com, linux-s390@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240111120036.109903-1-guwen@linux.alibaba.com> <20240111120036.109903-15-guwen@linux.alibaba.com> From: Wen Gu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024/1/13 00:24, Niklas Schnelle wrote: > On Thu, 2024-01-11 at 20:00 +0800, Wen Gu wrote: >> This provides a way to {get|set} whether loopback-ism device supports >> merging sndbuf with peer DMB to eliminate data copies between them. >> >> echo 0 > /sys/devices/virtual/smc/loopback-ism/dmb_copy # support >> echo 1 > /sys/devices/virtual/smc/loopback-ism/dmb_copy # not support > > The two support/no support remarks are a bit confusing because support > here seems to mean "support no-copy mode" while the attribute is more > like "force copy mode". How about: > > echo 0 > /sys/devices/virtual/smc/loopback-ism/dmb_copy # one DMB mode > echo 1 > /sys/devices/virtual/smc/loopback-ism/dmb_copy # copy mode > Thank you! Niklas. That makes it much clearer. It will be improved in next version. >> >> The settings take effect after re-activating loopback-ism by: >> >> echo 0 > /sys/devices/virtual/smc/loopback-ism/active >> echo 1 > /sys/devices/virtual/smc/loopback-ism/active >> >> After this, the link group related to loopback-ism will be flushed and >> the sndbufs of subsequent connections will be merged or not merged with >> peer DMB. >> >> The motivation of this control is that the bandwidth will be highly >> improved when sndbuf and DMB are merged, but when virtually contiguous >> DMB is provided and merged with sndbuf, it will be concurrently accessed >> on Tx and Rx, then there will be a bottleneck caused by lock contention >> of find_vmap_area when there are many CPUs and CONFIG_HARDENED_USERCOPY >> is set (see link below). So an option is provided. >> >> Link: https://lore.kernel.org/all/238e63cd-e0e8-4fbf-852f-bc4d5bc35d5a@linux.alibaba.com/ >> Signed-off-by: Wen Gu > ---8<---