Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3808779pxf; Tue, 6 Apr 2021 00:16:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4M5H6mV5Hs1m+0UC8wFflnrXCiPbuikyhK170IObR+RsAzXGJQXbTd1jaPMnYLyGfYHCg X-Received: by 2002:a92:ac0f:: with SMTP id r15mr8843700ilh.52.1617693416405; Tue, 06 Apr 2021 00:16:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617693416; cv=none; d=google.com; s=arc-20160816; b=PFik1mvds9twumHN8niOlGEFS+1cV1k5x3f1qVw5jXpzEel7Qn6nsSouZ4Fgd9uAjy U7eXK/fgY7/CbE7vHfvHLZDMIeFueOTpB9LFKBo2T54Kkz5pz98vpb707lsDTMuQX1TA FoZTxcsijlLkEO1PVUhg1WbqlPJlBVSCq09p0TnyIba5P+nl/SIOenFRa4/iQ/LqQZhV CHkrzvgPDc7s2unc0ofkWeoH9bnjSOEI/BS4Y+ejo1ADrLGUSwQO//elK+oBwv597DRF I3g2jzxELC4XcFK0Ax8og5M8xl75Z2DCjJ5hglluPBq18Qxz/TZOvl68p5Ns1A8mH0hM H67w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=e29P6drvCcTWvBET7WDg8skLmGSUrYd49DaINPvM4jA=; b=zUQ0XxLLasRXYZWkQmk+odmg49/0kyH79ISCsVZmPG3lkt0B4LbGotENPqnjCOgrZF Fwny47pu9JLzPk+KHXtpoZ1/4KWXoHW+OlKW68zC+xTMigSqWlx7vIwUjDnMi4ZYtUFg 2pzlkwxfuPTACaoDg7vtCVNNhWTKB8ieasyzOvsQUxh78AkG6aDursoH8cYFZm1KWLPZ FSBwglaF9tgcNlo8Y9dr521ZVhTRKvZSd0MHmmkqwCnXGewGwLfTlJHLM8D5SdxIK+q8 B+T+N3UlsqWxt3mV76DsNs1IOLsxbqykqrRmyV6skzVzd2iHZ33OhwCvX8ke7/evs7GP BSqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w3si20933158iov.55.2021.04.06.00.16.42; Tue, 06 Apr 2021 00:16:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237926AbhDESB3 (ORCPT + 99 others); Mon, 5 Apr 2021 14:01:29 -0400 Received: from p3plsmtpa06-10.prod.phx3.secureserver.net ([173.201.192.111]:53184 "EHLO p3plsmtpa06-10.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232462AbhDESB1 (ORCPT ); Mon, 5 Apr 2021 14:01:27 -0400 Received: from [192.168.0.116] ([71.184.94.153]) by :SMTPAUTH: with ESMTPSA id TTXIlWXASyIwVTTXIllPn5; Mon, 05 Apr 2021 11:01:20 -0700 X-CMAE-Analysis: v=2.4 cv=NP4QR22g c=1 sm=1 tr=0 ts=606b5070 a=vbvdVb1zh1xTTaY8rfQfKQ==:117 a=vbvdVb1zh1xTTaY8rfQfKQ==:17 a=IkcTkHD0fZMA:10 a=Ikd4Dj_1AAAA:8 a=lVKP4JfJqfutk5idi9QA:9 a=QEXdDO2ut3YA:10 a=pHzHmUro8NiASowvMSCR:22 a=nt3jZW36AmriUCFCBwmW:22 X-SECURESERVER-ACCT: tom@talpey.com Subject: Re: [PATCH rdma-next 02/10] RDMA/core: Enable Relaxed Ordering in __ib_alloc_pd() To: Leon Romanovsky , Doug Ledford , Jason Gunthorpe Cc: Avihai Horon , Adit Ranadive , Anna Schumaker , Ariel Elior , Bart Van Assche , Bernard Metzler , Christoph Hellwig , Chuck Lever , "David S. Miller" , Dennis Dalessandro , Devesh Sharma , Faisal Latif , Jack Wang , Jakub Kicinski , "J. Bruce Fields" , Jens Axboe , Karsten Graul , Keith Busch , Lijun Ou , linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, linux-s390@vger.kernel.org, Max Gurtovoy , Max Gurtovoy , "Md. Haris Iqbal" , Michael Guralnik , Michal Kalderon , Mike Marciniszyn , Naresh Kumar PBS , netdev@vger.kernel.org, Potnuri Bharat Teja , rds-devel@oss.oracle.com, Sagi Grimberg , samba-technical@lists.samba.org, Santosh Shilimkar , Selvin Xavier , Shiraz Saleem , Somnath Kotur , Sriharsha Basavapatna , Steve French , Trond Myklebust , VMware PV-Drivers , Weihang Li , Yishai Hadas , Zhu Yanjun References: <20210405052404.213889-1-leon@kernel.org> <20210405052404.213889-3-leon@kernel.org> From: Tom Talpey Message-ID: Date: Mon, 5 Apr 2021 14:01:16 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <20210405052404.213889-3-leon@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4xfKhBdA7dhIcoQbxQUsMb1TQGGZwNw2/OoguaxGUXtEIg67RPSNjPc/PUjX7344mkB7SL0PGdzrYucQPGJrfK8N90o1IdEouWWbMWsAwIRVjAIIjnchyI 7T+qJoluUtUv+Rj2ZMPAZKLlPYpLdqV+Fds1melUW+AW9kftaWp4oRQBbUgmajDuDo1S0p/ipgsJyOo1R7Acmoa6p48dwW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NWsQqc54JYIbgYE5vNJOb99LLt aIf5HEd8l9ZLzHXemqtSW3kB0lIlt3LOiXIlPdXwlXtuKX3eS8QNEV3UfwwZ11SMPlFNgHgJ2RXmkYIwDZvCtVq8panGgipyaOAymBCG0mHwBuxawC9ARGG8 apbyddXLF3HLjbJM1UWpCFcT+0uXRCGjrCyWbpEoIQy37yoIXVpZ+3N3/gdaqI+Y92wXnCWYmIZNXDHuy/M/toGg62UH0qkjhZKUdvrbqz3hiWkOjkIQrkHW JdtoRknxSZrCIhSHqAcoCG5ip2z+CnptXW/o9C589hUdkzH2C5ngjR5VBb2T6eTrBmDxyB7oQB5UkrLoH/AYos2s567wW1DRKH+/SZLV1RZuQ30QguEAFrGX 8bAjEit0p3YcVvFiKaB+duXIiNeMVgHLtEaPFZaqCY7cxPBemONuCmzjoyTcu3Q61ehv3XYroDTro2DEKjgQ4LY11ZQF48W8FOKmN8/nJ5Rw5OI2/9JWFQx2 vt7xZIDggu28ANohZnQhAVwjBVVzFTn2H/V/trxC0PyeS1otlNm05CHCfbmDTAvU4ZwpNX09+muGEPbPshNb3NCDfXezVkXEoE018AnSHS9zWAWJpghKZkql UqwtLg== Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On 4/5/2021 1:23 AM, Leon Romanovsky wrote: > From: Avihai Horon > > Enable Relaxed Ordering in __ib_alloc_pd() allocation of the > local_dma_lkey. > > This will take effect only for devices that don't pre-allocate the lkey > but allocate it per PD allocation. > > Signed-off-by: Avihai Horon > Reviewed-by: Michael Guralnik > Signed-off-by: Leon Romanovsky > --- > drivers/infiniband/core/verbs.c | 3 ++- > drivers/infiniband/hw/vmw_pvrdma/pvrdma_mr.c | 1 + > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c > index a1782f8a6ca0..9b719f7d6fd5 100644 > --- a/drivers/infiniband/core/verbs.c > +++ b/drivers/infiniband/core/verbs.c > @@ -287,7 +287,8 @@ struct ib_pd *__ib_alloc_pd(struct ib_device *device, unsigned int flags, > if (device->attrs.device_cap_flags & IB_DEVICE_LOCAL_DMA_LKEY) > pd->local_dma_lkey = device->local_dma_lkey; > else > - mr_access_flags |= IB_ACCESS_LOCAL_WRITE; > + mr_access_flags |= > + IB_ACCESS_LOCAL_WRITE | IB_ACCESS_RELAXED_ORDERING; So, do local_dma_lkey's get relaxed ordering unconditionally? > if (flags & IB_PD_UNSAFE_GLOBAL_RKEY) { > pr_warn("%s: enabling unsafe global rkey\n", caller); > diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_mr.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_mr.c > index b3fa783698a0..d74827694f92 100644 > --- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_mr.c > +++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_mr.c > @@ -66,6 +66,7 @@ struct ib_mr *pvrdma_get_dma_mr(struct ib_pd *pd, int acc) > int ret; > > /* Support only LOCAL_WRITE flag for DMA MRs */ > + acc &= ~IB_ACCESS_RELAXED_ORDERING; > if (acc & ~IB_ACCESS_LOCAL_WRITE) { > dev_warn(&dev->pdev->dev, > "unsupported dma mr access flags %#x\n", acc); Why does the pvrdma driver require relaxed ordering to be off? Tom.