Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3815674pxj; Mon, 21 Jun 2021 07:14:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzoSt+1OX+KKRE/YAKn+sIU/GbJbw0PfAEXJrnowe8dLCCBtDd8FHCHw16JjOIv0KeQ+VoQ X-Received: by 2002:a17:906:4b59:: with SMTP id j25mr1629099ejv.511.1624284841054; Mon, 21 Jun 2021 07:14:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624284841; cv=none; d=google.com; s=arc-20160816; b=bynGb+nUdRI1LCAlErl3hSoQTU3V/oQSmHA6P+IhhQnkwNuHc5K30kcCeUYh8DdOt0 bEDnPEcneIPRDQUvue/Ir/mCkKo3BWQ0kSRY2j9uyC6ulPBfeSeYDGL/4R0Iz2u9F4Oo 5v2j+h1+h21qSSQ3KlaFWRcZROf823ef7MtyRgcYwoBcPdY5UgcbLS7DFZIDUU6Rnu2H hxO1+xQur1dpNNiM8LY1dcQmSSYxgIQAoBmGq63GYMvYbtyXAHnnaidCCM2ewOxf7vtM eDQfz0voRY81SgweHIw/4M/0MNlZte32vlDYORHsvRhnAYCOtcq3i/0zYXU09nXlyiFV Ylgg== 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:cc:to:from:date:dkim-signature; bh=8oJQZs0I5J7jBEQyNRVEZxX4UpsM7b71jbLdhb7hAG8=; b=Fg6kwxoMBdqS603tE50aFjFEs/wMIIdsLTbEm9uMu54jXoZjMrCCRGdEaI6h5WXoMU 44sAbHTv6NxYuHFlGKXeSOWhF9bdlcjhfvObfexVt1wZE8Nwx2tHPDODoLrDLZUO4Zdb +AFh85oWuadLH04Em2NewWY+7LSX4eCsFB3XCjB859DXchaGPxS18oJJRqDQyGBoyO7J wbcdQf8a97M7XMlyl3aQALH6eweJjVRELKbdnZb/XIqet5MZHYoff19mHxv1sUn728Tm um5gEzrPlxzHK86wuS4A9gPxfYWzus0Z0gOm8rckXKbVIE1Mv+x+0SGDfYPoOqsrV+xb NTqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=FvMNMxA3; 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 v26si16743823eds.296.2021.06.21.07.13.38; Mon, 21 Jun 2021 07:14:01 -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=FvMNMxA3; 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 S230152AbhFUOO7 (ORCPT + 99 others); Mon, 21 Jun 2021 10:14:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229837AbhFUOOh (ORCPT ); Mon, 21 Jun 2021 10:14:37 -0400 Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF9B1C061760 for ; Mon, 21 Jun 2021 07:12:19 -0700 (PDT) Received: by mail-qt1-x830.google.com with SMTP id o19so13465220qtp.5 for ; Mon, 21 Jun 2021 07:12:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=8oJQZs0I5J7jBEQyNRVEZxX4UpsM7b71jbLdhb7hAG8=; b=FvMNMxA3fW7M2xLUZMwKYbvWPDaZY4pFbcNZf8cAZEsq+AvHkkjdBFOY2pviHteDwO C4Wu0SMltMsKCjOubP50lFxgNeNMSaZYEKEX7+OBgiaxrMgCwsV2iK7lgX8/+KZlk4J4 aF5ixG7g2CBXbZTlvfOQubAF3wyQTRyw74T4Hf0/YCR0yoYa7w3a6op9w4hFlDeDVvyE l/inPVDU6NWf0eU0BOoi/ztftjOhg9DHQyzvWKPkZf5nnfR7X6d4ilITeIR/5CPUHzeR Y5yxMVmbjISlSpxOsRA2pU1pIKL7Nm9mg1e4mEqnBLS+F4tdRuCspUjlf0CxKRwGVOjA H0Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=8oJQZs0I5J7jBEQyNRVEZxX4UpsM7b71jbLdhb7hAG8=; b=D2VgpNUgOGicKzJc5SSoj4I0ga8tAvZY1jPRmpntc5cUTXrA0+vTB/bbZt2uYfww4g ETOSb/HqZ02fsXhVs4/Y7K8C06jBbWzYI7Xzvcbm/ps3BfbK2GosdOP0Vio2MsPD9WrG aXuIHx+qLVqe1DOSIrrlGUjPZ9rQGCI5YrJ3/Mi/dlDBO1UoQUEyasHKF4sjqw/SEX52 FAO8vsZw21jRIWVa2pzIuSzfBpmpCscbrvmy9J72sz2GFQJKa22iQVxiUK0LvfgIaF+Z IQ0oAKgACTRnllyod0YDAjIYwGOKATU1qiUf6F0hgjPpWv0fXvjbV+j5PE9UKRpYzpH6 oWdg== X-Gm-Message-State: AOAM530y05GWm1XT65xKCFYzxTsa+F7mh7gxk+cNHbe0C2B/9cP9k/bm CWR44q5EjhCTdX3gOBvyVSRLEw== X-Received: by 2002:ac8:5508:: with SMTP id j8mr10071894qtq.134.1624284738855; Mon, 21 Jun 2021 07:12:18 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-47-55-113-94.dhcp-dynamic.fibreop.ns.bellaliant.net. [47.55.113.94]) by smtp.gmail.com with ESMTPSA id r22sm10570497qtm.82.2021.06.21.07.12.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Jun 2021 07:12:18 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1lvKev-009WcM-8s; Mon, 21 Jun 2021 11:12:17 -0300 Date: Mon, 21 Jun 2021 11:12:17 -0300 From: Jason Gunthorpe To: Greg KH Cc: Daniel Vetter , Oded Gabbay , linux-rdma , "open list:DMA BUFFER SHARING FRAMEWORK" , Doug Ledford , "airlied@gmail.com" , Linux Kernel Mailing List , Sumit Semwal , Christian =?utf-8?B?S8O2bmln?= , Gal Pressman , sleybo@amazon.com, dri-devel , Tomer Tayar , "moderated list:DMA BUFFER SHARING FRAMEWORK" , amd-gfx list , Alex Deucher , Leon Romanovsky , Christoph Hellwig Subject: Re: [PATCH v3 1/2] habanalabs: define uAPI to export FD for DMA-BUF Message-ID: <20210621141217.GE1096940@ziepe.ca> References: <20210618123615.11456-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 Mon, Jun 21, 2021 at 03:02:10PM +0200, Greg KH wrote: > On Mon, Jun 21, 2021 at 02:28:48PM +0200, Daniel Vetter wrote: > > Also I'm wondering which is the other driver that we share buffers > > with. The gaudi stuff doesn't have real struct pages as backing > > storage, it only fills out the dma_addr_t. That tends to blow up with > > other drivers, and the only place where this is guaranteed to work is > > if you have a dynamic importer which sets the allow_peer2peer flag. > > Adding maintainers from other subsystems who might want to chime in > > here. So even aside of the big question as-is this is broken. > > From what I can tell this driver is sending the buffers to other > instances of the same hardware, A dmabuf is consumed by something else in the kernel calling dma_buf_map_attachment() on the FD. What is the other side of this? I don't see any dma_buf_map_attachment() calls in drivers/misc, or added in this patch set. AFAIK the only viable in-tree other side is in mlx5 (look in umem_dmabuf.c) Though as we already talked habana has their own networking (out of tree, presumably) so I suspect this is really to support some out of tree stuff?? Jason