Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp812608pxb; Tue, 14 Sep 2021 09:13:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6maJ8YE6P6MbS6VsOx3kUeCZXIYRFLI8lu5OKn81WyGfJMMcjclCijItVGajdSldnKBJD X-Received: by 2002:a05:6602:1845:: with SMTP id d5mr14232269ioi.23.1631636018583; Tue, 14 Sep 2021 09:13:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631636018; cv=none; d=google.com; s=arc-20160816; b=S5bCZ4n0zEuOVcOdHMN0xrLuDZIq50YWZ6zvMgO22DS6qUErwvGpZ1uJhf6SJM2WAt ZGCmQO1Tdyh6nig4l7zrlcbgZpKoNE9qV0sK2AqB/evSVg5PAmG9Ih12ug1wOvWHAaax YnMa30xmMiuF991K05YdVgSNTZipWYzM2lx66IuRlyKACUt3jsJgHx8fEO8+uEIe2oXv PfN6ilSzBnU5pbzEaK4ZfmRp2uUJlQP1moAMeHj6xFKFptjFK7HtYwTresndjW4fdl+k JNcWX/V3i+i08OAUgdz+GyTu0OsPcBkVUpqPA2At3JnHIEhw/veOByVkf5QhJrzYmpYY pT1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date:dkim-signature; bh=I7DiJbd0cxUCLQIOVYzn8bpAGXC1DpRRoThWyrXU5us=; b=IaVXnLpBVZCy9wQvWqT7A7IGSTDi3xogT33WyxxwVlwwDvdB2B6czoDkSPHNhoSnOn IvlTSVzu/yrzzKLFm0V3ihB8nJt45xvljWUcJFKMKiwD4RDvrUKUrpyxbjsLERxvoMM8 GY+4BkmOxPqsyS1n9M5CMx20cYWxJUg6TEJ7GOVnPIitQVkM72mHNAjmaE5PJzxETAn8 a1IExA69r3HeS4T7EQ5lDZBCKTpdDc1Rd0Y3kKp8AFfcAKl4Ysjt2Vc0gRNJ7nifrzqU d1zussJY7lypJT6Z801rNb+dZm2AHTkbBt3h2qOaFsJEU9WSh2mf8c+GhEReyIZCA+uE 2S2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=VLAPpylL; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 186si10270929jaf.38.2021.09.14.09.13.26; Tue, 14 Sep 2021 09:13:38 -0700 (PDT) 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; dkim=pass header.i=@ziepe.ca header.s=google header.b=VLAPpylL; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233121AbhINQNk (ORCPT + 99 others); Tue, 14 Sep 2021 12:13:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229937AbhINQNh (ORCPT ); Tue, 14 Sep 2021 12:13:37 -0400 Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F989C061762 for ; Tue, 14 Sep 2021 09:12:20 -0700 (PDT) Received: by mail-qk1-x732.google.com with SMTP id y144so15438774qkb.6 for ; Tue, 14 Sep 2021 09:12:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=I7DiJbd0cxUCLQIOVYzn8bpAGXC1DpRRoThWyrXU5us=; b=VLAPpylLAYTeobmTkVR3mMWEApbSzQVCY6y9NZmlGqOYAYmCLqLovz+JRKOW4zbFQO SsICmqARfpElDi01jfGPfhfGp+XbjOWG5j7xhqkXBcfxNTtfN0Q2EHL2YIPXJAmE5lqq 9fO4vT4ebWpM51oXh2PN3UzJN/nZE167NxFttlYk9zDneLRVxgg54Ms6stPw+IfwS8fE BcU8DH0Wkz0TT/2TEuDT6T2VOxScMtYxzNvvbGLNasoE4MraqR/e/O1maoUvya4XQnt5 8ZqntLHL5K06ZWcY7hFsB6CkWDvb6eMwUQMOMC/DyK5zV21pUx/5Wgk/nJhjm274HIe8 i/Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=I7DiJbd0cxUCLQIOVYzn8bpAGXC1DpRRoThWyrXU5us=; b=hLFpXCFgMHm65TEEQ2Yiyng8KXNr2QMKWB2hPg2+ih0lxgnpXPlpmScP9pg1OVhu1j Iebeu9isZwTZNFAj5uOjxNu3dIg27E8alDiGROliUxaeCuKMJ9rK/SAYlGS9nfZ4zWmm gzUXhghcCe2pI34B5LNflwM0oRbWQ4s2YUHYIEos8XseVUJHdV2fkyW7SFvNTq+a9EXP /aaWnS9vReUnNfpSrtBx1VSoy4i9WxuGRs4vSywgEvt3ZXszNQ0b7E1vxWFF4xCqHso9 //6vAQ+QEdzU5d9eMC0TMMh8zsdFzIFHyXw5PflNuGq3XrKgt/mmzkvbj6WrPFLfLdhK oqtw== X-Gm-Message-State: AOAM532IGY+Ef1w457kUNMKVtBM3Z3knGFkZFx+kd0eQzTGVb4Lrzd3t MeUeU5AvSNYkVBHaTGx64kztfw== X-Received: by 2002:a05:620a:4541:: with SMTP id u1mr5785047qkp.106.1631635939466; Tue, 14 Sep 2021 09:12:19 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-162-113-129.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.113.129]) by smtp.gmail.com with ESMTPSA id s18sm7826361qkj.87.2021.09.14.09.12.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Sep 2021 09:12:18 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1mQB2g-000UiF-8O; Tue, 14 Sep 2021 13:12:18 -0300 Date: Tue, 14 Sep 2021 13:12:18 -0300 From: Jason Gunthorpe To: Oded Gabbay , linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, christian.koenig@amd.com, galpress@amazon.com, sleybo@amazon.com, dri-devel@lists.freedesktop.org, linux-rdma@vger.kernel.org, linux-media@vger.kernel.org, dledford@redhat.com, airlied@gmail.com, alexander.deucher@amd.com, leonro@nvidia.com, hch@lst.de, amd-gfx@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org Subject: Re: [PATCH v6 0/2] Add p2p via dmabuf to habanalabs Message-ID: <20210914161218.GF3544071@ziepe.ca> References: <20210912165309.98695-1-ogabbay@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 14, 2021 at 04:18:31PM +0200, Daniel Vetter wrote: > On Sun, Sep 12, 2021 at 07:53:07PM +0300, Oded Gabbay wrote: > > Hi, > > Re-sending this patch-set following the release of our user-space TPC > > compiler and runtime library. > > > > I would appreciate a review on this. > > I think the big open we have is the entire revoke discussions. Having the > option to let dma-buf hang around which map to random local memory ranges, > without clear ownership link and a way to kill it sounds bad to me. > > I think there's a few options: > - We require revoke support. But I've heard rdma really doesn't like that, > I guess because taking out an MR while holding the dma_resv_lock would > be an inversion, so can't be done. Jason, can you recap what exactly the > hold-up was again that makes this a no-go? RDMA HW can't do revoke. So we have to exclude almost all the HW and several interesting use cases to enable a revoke operation. > - For non-revokable things like these dma-buf we'd keep a drm_master > reference around. This would prevent the next open to acquire > ownership rights, which at least prevents all the nasty potential > problems. This is what I generally would expect, the DMABUF FD and its DMA memory just floats about until the unrevokable user releases it, which happens when the FD that is driving the import eventually gets closed. I still don't think any of the complexity is needed, pinnable memory is a thing in Linux, just account for it in mlocked and that is enough. Jason