Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5949592pxj; Wed, 23 Jun 2021 12:38:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVEH5dKWFXm8rqjO2qz9gtIUuPn9vtlce04iO9KsUhpXvfuJoGiwfG54lgnLW5Biyt4gJD X-Received: by 2002:a17:906:8048:: with SMTP id x8mr1620129ejw.496.1624477085395; Wed, 23 Jun 2021 12:38:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624477085; cv=none; d=google.com; s=arc-20160816; b=PQ5R1hwlyodaVshU2904XNpSdOjts2hC1lvaptv5cYQ5hgMhkZLdaj/sT1hbS2jp2T gJ/Xdky+5D+nalaRii39Wf5J48isw4OJ0bpIPX46vd70lqledNz6O9Zeyk5MVbOqW2XE NRvN9kwRZAp2zjI8fzA+64NdVLUihYxtGGmf7OS7X2T9obrKjUqGUgQprjHO+QJd1VkB F8RvMkNI2NaPTJjyfVn8LkwboMrJf1nt0okmbhQwsV9xxBMO4gevkGz4HvjetkEq+ukd LUTo44hL/toj5RmgKbMa/5blfkv4LZn3wR+9ApvNaC6M5mag2nRXHjxI0OPT9YXMAJmU 4rlQ== 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=fGGtHhMjRxWC7q8u+QpLuSmAd2BS6BZvGpryakmPg+4=; b=igxWQWiC33Quu4uTf+8k52jvHbTGjjAwdYOwe90AQG79z3H66uzR0gkE2h6or0NTUe gL4Zqn12o9CWZrC0Rz3RJ63tYynG+8c2BpHEiLtUaGYqWZbpcG02ma9CDn1ib0K7l9IH zIA63Kwr7180+SNPa9tS8sLUF9YJkMEXt3tFh9/SVqwcsl1lrdZcRWs5XWPKtbm6j7Q3 u359hLBdWgNbazzjtUDwWuC9GLp0Rt6NMlvU+gDNebNrxWdcwWxIVre5H7hpRjytJ+tO DBd0F5pkOgnGp3gucCP9xrtt+FcXuughr2mgyY7zJ7s7BLCaEVvN6V9XUq1/MDvY9/x2 eepA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b="C/ChLYKJ"; 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 x19si683618edq.516.2021.06.23.12.37.40; Wed, 23 Jun 2021 12:38:05 -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="C/ChLYKJ"; 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 S229759AbhFWThS (ORCPT + 99 others); Wed, 23 Jun 2021 15:37:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229954AbhFWThR (ORCPT ); Wed, 23 Jun 2021 15:37:17 -0400 Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06176C06175F for ; Wed, 23 Jun 2021 12:34:58 -0700 (PDT) Received: by mail-qt1-x833.google.com with SMTP id c22so3028643qtn.1 for ; Wed, 23 Jun 2021 12:34:57 -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=fGGtHhMjRxWC7q8u+QpLuSmAd2BS6BZvGpryakmPg+4=; b=C/ChLYKJjxWUduhsqQDH/y3KkPljvKtmE9gnR4RWqH26X4Hcl0BZhRk8uZJDDcRefS hGtO2MpvhYu1ncsQ4XftrvmDbf/mCW3wk2DupCuSLq+ie4Hyvpd20U48FGOE4dSGyEo0 TmyxIGRf7/r6jILWVF9V3iqSjUzYoN6B2NHcRb+DpKV2v39TKfOUwHneZqFmzFyu8wZH aiub1NaEqGoa85Yu73CHqFp2wUJ1VM+8ZEE8HkUwdR6souayXVXN3DVtBP19SojfN0kr E2ju0T5nvVMTyB6NE6nPMbaB3NYTA1ab7ECOlaIw1r3lb29JeCcDEsxrLY1+NlKZ05e4 b/PA== 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=fGGtHhMjRxWC7q8u+QpLuSmAd2BS6BZvGpryakmPg+4=; b=ZXKYjClBmQ+jKSI1HlmWqyPs+bgqdnTuLCnRMu4Myd/2CZn8kA4ScRzU1+D3iBERD/ A3iMFfmAYZltCe6wv7w6kyc2MP66y7HdgSy3rGI0Rgcql7+aM9caz/yvu1WawKLSj+fv QuX8TRm1ikIUHmgTtNRbDUVdSCYRnIT2Bp6qG/0KtcNoJaN321ubVrq/Lzt45Rwvl8Zq IIM3Nnl7GxVA9nY0eDmT4luxUzj0d+V/o5UqocyZEU7ugle3I+0fV5fLPOlva00YbpBD zS42V5d/S1B4rPRS97eqrRDcg0SkrvfX6rsQk6+cMK8dx4QSZXvMwAUEjt82aHrgUCXp yvmw== X-Gm-Message-State: AOAM533BupI3rKi5g+F2HC5UKcQCRE99CuCzxMaXWZAteLq+cgPICn0l 5gETXJtD9rOQvgg/mEVPeK+ycg== X-Received: by 2002:a05:622a:1051:: with SMTP id f17mr1494327qte.226.1624476897149; Wed, 23 Jun 2021 12:34:57 -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 x7sm598287qke.62.2021.06.23.12.34.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Jun 2021 12:34:56 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1lw8eG-00BmnU-3D; Wed, 23 Jun 2021 16:34:56 -0300 Date: Wed, 23 Jun 2021 16:34:56 -0300 From: Jason Gunthorpe To: Oded Gabbay Cc: Christian =?utf-8?B?S8O2bmln?= , Christian =?utf-8?B?S8O2bmln?= , Gal Pressman , sleybo@amazon.com, linux-rdma , Oded Gabbay , Christoph Hellwig , Linux Kernel Mailing List , dri-devel , "moderated list:DMA BUFFER SHARING FRAMEWORK" , Doug Ledford , Tomer Tayar , amd-gfx list , Greg KH , Alex Deucher , Leon Romanovsky , "open list:DMA BUFFER SHARING FRAMEWORK" Subject: Re: [Linaro-mm-sig] [PATCH v3 1/2] habanalabs: define uAPI to export FD for DMA-BUF Message-ID: <20210623193456.GZ1096940@ziepe.ca> References: <20210622152343.GO1096940@ziepe.ca> <3fabe8b7-7174-bf49-5ffe-26db30968a27@amd.com> <20210622154027.GS1096940@ziepe.ca> <09df4a03-d99c-3949-05b2-8b49c71a109e@amd.com> <20210622160538.GT1096940@ziepe.ca> <20210623182435.GX1096940@ziepe.ca> <20210623185045.GY1096940@ziepe.ca> 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 Wed, Jun 23, 2021 at 10:00:29PM +0300, Oded Gabbay wrote: > On Wed, Jun 23, 2021 at 9:50 PM Jason Gunthorpe wrote: > > > > On Wed, Jun 23, 2021 at 09:43:04PM +0300, Oded Gabbay wrote: > > > > > Can you please explain why it is so important to (allow) access them > > > through the CPU ? > > > > It is not so much important, as it reflects significant design choices > > that are already tightly baked into alot of our stacks. > > > > A SGL is CPU accessible by design - that is baked into this thing and > > places all over the place assume it. Even in RDMA we have > > RXE/SWI/HFI1/qib that might want to use the CPU side (grep for sg_page > > to see) > > > > So, the thing at the top of the stack - in this case the gaudi driver > > - simply can't assume what the rest of the stack is going to do and > > omit the CPU side. It breaks everything. > > > > Logan's patch series is the most fully developed way out of this > > predicament so far. > > I understand the argument and I agree that for the generic case, the > top of the stack can't assume anything. > Having said that, in this case the SGL is encapsulated inside a dma-buf object. > > Maybe its a stupid/over-simplified suggestion, but can't we add a > property to the dma-buf object, > that will be set by the exporter, which will "tell" the importer it > can't use any CPU fallback ? Only "real" p2p ? The block stack has been trying to do something like this. The flag doesn't solve the DMA API/IOMMU problems though. Jason