Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1132905rdb; Fri, 16 Feb 2024 06:25:59 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCULSH3n+tKFs3yoqHAvMsdD/PdU9DuuLiBZXGndXsdGfVOIhcgNGpn3jjcBCAUFVGSiQpus5MTV31VzcKMWAllhqRnL0fKGvAQOfigEzA== X-Google-Smtp-Source: AGHT+IH+rIcl8eSTUn/vB8nQuu1XvVmb9IaWS3zYj8ltl1RNAzjruGdbxAO9ZmwdrNG/lUr4dHeY X-Received: by 2002:a05:620a:a9b:b0:787:3e89:553 with SMTP id v27-20020a05620a0a9b00b007873e890553mr2731658qkg.73.1708093559154; Fri, 16 Feb 2024 06:25:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708093559; cv=pass; d=google.com; s=arc-20160816; b=Fv/pcuEL0G3ZCJt4lEEQiP9vzbUGXLNubGWfng8ftOz6xI0oBue7mvt0sJ4uOXEZjW dNFO97M/b4rk2SAezd7tK6CI6nBoEfkkVKHXs4pqvjgVNtV3wmlZ89U5EnfAGrbxUoDp LZqVWh8EfWtvY0vy8ubl7bOFeASvZmQpNDV+wCAlAEnb8TasZBIgLrLQKWlc1B9ujbXB D29rzFt/82nNTWZlmnA7bncu67Xe3/qnOHoRO3WF4bjdxYo/1LIcS9FTvZdd7vSD5VbV 8Jb5XTuIxwQoKFQFr57zKDFRJvKMX+9zYfdggeAuOf63UnLyD6DOSupo4cEd5Mf1DBEI 1a3Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=nlnNDCB++mrZtl4jprxCchDhuznxfG86krnhXkgxIn8=; fh=SofdEQA4NZ74UKKWzXQUF8mgDElfzDqMXurOcg2Nmes=; b=qNa6848GqDVZvRplVRJ/+v+mgvV5or5qc6qLqh4SmVZ3EeI3SRUbPXLAgus4rrZyQ5 xRnWb970V96wcrHNY1gKxf8s+PwFILsLU0Ap6aV5jALxKKQgot33UbNslY93/m2mlyJI O1zAy4mwFw22j+t9Lxtc69Okd0/C17dFenGLyfDR0+wRORe6BIo6HyfFFSmZwC94yYeJ EeJloH0+4oxqHS6U6OqXyZUV89OGoCI/EiTXyz2u4FYjf5k6w0lS5k2bQz283Thhw4qA D/QJnbaSOzqlM54tgOx5QpoJFtyaigTPc2oKm+6v3Shd4nIse7BNA/5W5/4ruuhaat7W zJPA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=tbQPa5XO; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-68741-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68741-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id bj41-20020a05620a192900b0078725c5dc13si4662771qkb.109.2024.02.16.06.25.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 06:25:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68741-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=tbQPa5XO; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-68741-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68741-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 72AF31C2542F for ; Fri, 16 Feb 2024 14:25:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D35CA12D77A; Fri, 16 Feb 2024 14:25:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="tbQPa5XO" Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (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 4ABF412CDBC; Fri, 16 Feb 2024 14:25:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708093522; cv=none; b=WoQAVc2sfS0Qt5kKwTWuhZMurV1GmFeAO37mnV0YHqr3dhRy7uHx/aDUC/u2gy/v5/w3JAuhPd2KTPd/JXXDoCl7/Tl23a0sjrTxAmGFCPL9uXDGuU9kyQz1Dee+8lOe0E1q416KK+CEDYEVtkk8mAtX+mjP6k9YmPpkDFjnNvE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708093522; c=relaxed/simple; bh=O7MFxcQlW6/oLUDwi9hslFjNvFqB7lPa29B3FpAyVvg=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=hPaLeS4cfZG7VCzAoyGFK+d4ZSKBTraACha4Mnqo7JEb4bcaj0Jbg+ApoPqq0+AUYY/ZOE+8cBuNuSO3oCUy+pjF0IhS9MW0TmYYRgxZVxiIW/J/ConPbsuGEnOk1/jGVK71A7g/njAsDNtpVsRaixQWUWB5tU+ZNoeNKrU/xNY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=tbQPa5XO; arc=none smtp.client-ip=148.163.158.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0353724.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 41GDS2VR009205; Fri, 16 Feb 2024 14:25:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : from : subject : to : cc : references : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=nlnNDCB++mrZtl4jprxCchDhuznxfG86krnhXkgxIn8=; b=tbQPa5XOywT+Xfwh6609A7vyZWr5OlhcNs5uFq9qs7HCGPqjmnJ/4WhUGvSuRu5zyhk8 3EsGM/Hf35XDJi9P3fpXcMaP4z84L52urATEeR/cN1YXppSV2BA8XCgt2f8O1ijRXHWJ 8D3o3yDAiicq3zPkvyWCer2JJ3ny1tnFqIUg2iBkv0R50bUB1XbD29no8+qxfA21rq3h hYYMRhuBTzmSgXiSrcMT3JSw596UsEJaw5CsrefX9DmYI3TgmJDU6qMR30wRI8V1auP3 3aWC6ePaMh5rxMqAloLy/ja6+Av4vCcGpQ50n2nnI6hYbLUyrIuBKopM8J2AVV7XaO7+ sw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3wa8m29a5t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Feb 2024 14:25:15 +0000 Received: from m0353724.ppops.net (m0353724.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 41GDU7Jr015721; Fri, 16 Feb 2024 14:25:15 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3wa8m29a5h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Feb 2024 14:25:14 +0000 Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 41GDa3DC016203; Fri, 16 Feb 2024 14:25:14 GMT Received: from smtprelay06.dal12v.mail.ibm.com ([172.16.1.8]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3w6myn3nue-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Feb 2024 14:25:14 +0000 Received: from smtpav04.wdc07v.mail.ibm.com (smtpav04.wdc07v.mail.ibm.com [10.39.53.231]) by smtprelay06.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 41GEPAKh17498760 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 16 Feb 2024 14:25:13 GMT Received: from smtpav04.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DB74C58061; Fri, 16 Feb 2024 14:25:08 +0000 (GMT) Received: from smtpav04.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6603B58050; Fri, 16 Feb 2024 14:25:05 +0000 (GMT) Received: from [9.171.40.55] (unknown [9.171.40.55]) by smtpav04.wdc07v.mail.ibm.com (Postfix) with ESMTP; Fri, 16 Feb 2024 14:25:05 +0000 (GMT) Message-ID: <350f1cb8-b205-47be-a296-c610b9afe5fc@linux.ibm.com> Date: Fri, 16 Feb 2024 15:25:04 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Wenjia Zhang Subject: Re: [PATCH net-next 13/15] net/smc: introduce loopback-ism DMB type control To: Wen Gu , wintera@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, Gerd Bayer 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-14-guwen@linux.alibaba.com> Content-Language: en-GB In-Reply-To: <20240111120036.109903-14-guwen@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: NxRbpwPOulmqbzB3VeVuqevT4XGhMX2_ X-Proofpoint-GUID: SDew2dCRulUv8MbMxbI0RFumLOi-Saip X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-16_13,2024-02-16_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 malwarescore=0 clxscore=1015 mlxscore=0 lowpriorityscore=0 suspectscore=0 mlxlogscore=997 bulkscore=0 spamscore=0 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402160115 On 11.01.24 13:00, Wen Gu wrote: > This provides a way to {get|set} type of DMB offered by loopback-ism, > whether it is physically or virtually contiguous memory. > > echo 0 > /sys/devices/virtual/smc/loopback-ism/dmb_type # physically > echo 1 > /sys/devices/virtual/smc/loopback-ism/dmb_type # virtually > > 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 and DMBs related to loopback-ism will be > flushed and subsequent DMBs created will be of the desired type. > > The motivation of this control is that physically contiguous DMB has > best performance but is usually expensive, while the virtually > contiguous DMB is cheap and perform well in most scenarios, but if > sndbuf and DMB are merged, virtual DMB will be accessed concurrently > in Tx and Rx and 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. > I'm courious about why you say that physically contiguous DMB has best performance. Because we saw even a bit better perfomance with the virtual one than the performance with the physical one.