From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B1C6C4320A for ; Sat, 21 Aug 2021 09:16:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6EC6B61101 for ; Sat, 21 Aug 2021 09:16:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233286AbhHUJRK (ORCPT ); Sat, 21 Aug 2021 05:17:10 -0400 Received: from smtp-fw-9102.amazon.com ([207.171.184.29]:34121 "EHLO smtp-fw-9102.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233240AbhHUJRJ (ORCPT ); Sat, 21 Aug 2021 05:17:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1629537391; x=1661073391; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=6zdtuD4K5LXWMKHYbnVqH1TC+OHwCabeh7riv5NUDRU=; b=DsRAjwkrxN52eO2kC6ZXR+YbiIeFkxBK2OIDxybnREXpac63sPFK4hmD +U12HkvOdSQ7B+HKHrhxV9jrvvB2fnLg2OaEr6unw4r4nm/Mu/ze3g4ZL fe9mpLxPPmjct+CqAGYK+5O751gmTv3fEEm8hyxj94kaIhW+EC4cCFmtX k=; X-IronPort-AV: E=Sophos;i="5.84,340,1620691200"; d="scan'208";a="154103456" Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO email-inbound-relay-2a-1c1b5cdd.us-west-2.amazon.com) ([10.25.36.214]) by smtp-border-fw-9102.sea19.amazon.com with ESMTP; 21 Aug 2021 09:16:24 +0000 Received: from EX13D19EUB003.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-2a-1c1b5cdd.us-west-2.amazon.com (Postfix) with ESMTPS id 493B4A26F2; Sat, 21 Aug 2021 09:16:21 +0000 (UTC) Received: from 8c85908914bf.ant.amazon.com (10.43.160.41) by EX13D19EUB003.ant.amazon.com (10.43.166.69) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Sat, 21 Aug 2021 09:16:13 +0000 Subject: Re: [RFC] Make use of non-dynamic dmabuf in RDMA To: Jason Gunthorpe CC: Daniel Vetter , Sumit Semwal , =?UTF-8?Q?Christian_K=c3=b6nig?= , Doug Ledford , "open list:DMA BUFFER SHARING FRAMEWORK" , dri-devel , Linux Kernel Mailing List , linux-rdma , Oded Gabbay , Tomer Tayar , Yossi Leybovich , Alexander Matushevsky , Leon Romanovsky , Jianxin Xiong , John Hubbard References: <20210818074352.29950-1-galpress@amazon.com> <20210819230602.GU543798@ziepe.ca> <20210820123316.GV543798@ziepe.ca> <0fc94ac0-2bb9-4835-62b8-ea14f85fe512@amazon.com> <20210820143248.GX543798@ziepe.ca> From: Gal Pressman Message-ID: Date: Sat, 21 Aug 2021 12:16:08 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210820143248.GX543798@ziepe.ca> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.43.160.41] X-ClientProxiedBy: EX13P01UWA001.ant.amazon.com (10.43.160.213) To EX13D19EUB003.ant.amazon.com (10.43.166.69) Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On 20/08/2021 17:32, Jason Gunthorpe wrote: > On Fri, Aug 20, 2021 at 03:58:33PM +0300, Gal Pressman wrote: > >> Though it would've been nicer if we could agree on a solution that could work >> for more than 1-2 RDMA devices, using the existing tools the RDMA subsystem has. > > I don't think it can really be done, revoke is necessary, and isn't a > primitive we have today. > > Revoke is sort of like rereg MR, but with a guaranteed no-change to > the lkey/rkey > > Then there is the locking complexity of linking the mr creation and > destruction to the lifecycle of the pages, which is messy and maybe > not general. For instance mlx5 would call its revoke_mr, disconnect > the dmabuf then destroy the mkey - but this is only safe because mlx5 > HW can handle concurrent revokes. Thanks, that makes sense. >> That's why I tried to approach this by denying such attachments for non-ODP >> importers instead of exposing a "limited" dynamic importer. > > That is fine if there is no revoke - once revoke exists we must have > driver and HW support. Agree. IIUC, we're talking about three different exporter "types": - Dynamic with move_notify (requires ODP) - Dynamic with revoke_notify - Static Which changes do we need to make the third one work?