Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5919570pxj; Wed, 23 Jun 2021 11:52:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzk4mbDvNDqMwzZ/R/+bRNL99LbDFapPcePG5gZqSNLLdiL7qIIVGLaVKgDwtSHSPth3Fhu X-Received: by 2002:a5e:8349:: with SMTP id y9mr758088iom.105.1624474328384; Wed, 23 Jun 2021 11:52:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624474328; cv=none; d=google.com; s=arc-20160816; b=PktZYgThgY42HYcep+B0UTd6uj8rA+z8S3Kgq/VZRJ3sgsCcAMQ3P6vj/PyZxB/rkc j0ruzcZPtMlUztIO97a94S93dpue/46SnAi6Hs5vHVjRLN+Swl7lAaU7hufM7nXS86/i WnYAp6+VoFO9dQnPiYtUGa9GYGkzDQ+4cCuR7jlvro1+6av1a0xjymFFjJThXor9qqbT MPF8yHEB8dD+a9m9cFoyz7bhy2S2ib3STeQ4wytfegj4Anfi20YX4xjZ9p09+FhhLtVl +cEN8iYGn2A7swLJ7cAClKVCCZJaDf1Twa1SUWWsNLqS6Pj+QgA88M+mfFfc4feMISFa xHxg== 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=A9I072mZJre1TS+IQKbZNgSu5AaMK7P2E0lmk7a57z4=; b=Ikp6ZPhIRUWNo8WxmhS41O4De8oMRwozoTtvkrKz/dJo2HX32KBYzlIR72sUrrDyys FYhvMKdcdvHC8NU2bsfK8xSO7LNFa3fIpFEqYITzWMD2KW9ToOBYVY3e3WrfOJslOT2P hV+fFpRJnpYNzc5cxrHNkVNgd35hvcs1/e4X4+1djWdBffbwBxBkH04bioVrJ5h0NQby p+Vs8NTfhAoSkYaaX7pNNCQtoMmIeDqcfQgXIVnPk4AA69PY487x9Qyj+W+tvLGa4c9O AORwblass15mqiuQaL5mz70/h0oIm2egaXUPTZ9BP/To5xYbFQh2qGDfFz4i7FBkV8JE +oPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=b5e3Vs0J; 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 n1si373983ilt.140.2021.06.23.11.51.56; Wed, 23 Jun 2021 11:52:08 -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=b5e3Vs0J; 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 S230048AbhFWSxG (ORCPT + 99 others); Wed, 23 Jun 2021 14:53:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229794AbhFWSxE (ORCPT ); Wed, 23 Jun 2021 14:53:04 -0400 Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C889C06175F for ; Wed, 23 Jun 2021 11:50:47 -0700 (PDT) Received: by mail-qk1-x731.google.com with SMTP id bj15so7752187qkb.11 for ; Wed, 23 Jun 2021 11:50:47 -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=A9I072mZJre1TS+IQKbZNgSu5AaMK7P2E0lmk7a57z4=; b=b5e3Vs0J8hbfUScY+Wtfo2QnoFw5zQRvSxFua4X+zv6sZmqniXxjtckK2oI0DJ0jKp +FpDq4XgR5FvYz5KhFDvESo6/vvn5bGvgGZWSgiYdS8/PfbLxpaqI3o9lhVUAZxmPK5T nDlzhXlXLqlvJVTPQVPebRcUOY8aDMfSl2n44EWIYFP7pJbCLgzg7CgH7naHE97q6TC2 fZXUfMee0Dfy9rvfoVtazaR6R+Q7ESYAYIdPD2TcTnMWbmqWi3fqt48BxyEAqBINSR6Y /GKjFQQmTzpnkbtvp/1Ez+q16SM92SVKit9WzRj/wJHNz3K/lD3bYob3W0EWe1zfdvXM mlxA== 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=A9I072mZJre1TS+IQKbZNgSu5AaMK7P2E0lmk7a57z4=; b=GCBSHXL258ldut8Ky5oT1MN4Q121dt3ed4cCBsw0NSDxgRiLUVkYRzuiyYq/C9U8sh C5B6KlVW6KpdqiQR34DbFE5Z5uHYq/AWvdig/jhoOTcykUriLDlXhWllUSwlMIc8a48q U0Ki670DVmMP/nj+eUdSgU0sg+FCnmilk8cfEtqu4egei1j1wG4ZU4dRiu0voFsaO3AH e8wIt3Z1x8n7tSnsTx3vm3ONEbgT7nQa/3+ldGuzstUfU7m45uabUAnMKodpEj3E0k4K 1jPONm8yDUPm8/T+4PP8+Vsb0rNHj/f/XXmjgtkC7RQXsVQa3vUZ/lX7TqUxbXSPsTmF gFSQ== X-Gm-Message-State: AOAM531RoOlegCYCY5TbmR94P2pagTJQTKAoW9OVwyrijLSyUvm0a9yp JL+BJ77kGMQ2tNzHoeZvQ9c26Q== X-Received: by 2002:a37:5cc6:: with SMTP id q189mr1519218qkb.305.1624474246361; Wed, 23 Jun 2021 11:50:46 -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 y18sm503840qtx.6.2021.06.23.11.50.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Jun 2021 11:50:45 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1lw7xV-00Blq0-8k; Wed, 23 Jun 2021 15:50:45 -0300 Date: Wed, 23 Jun 2021 15:50:45 -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: <20210623185045.GY1096940@ziepe.ca> References: <20210622120142.GL1096940@ziepe.ca> <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> 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 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. > The whole purpose is that the other device accesses my device, > bypassing the CPU. Sure, but you don't know that will happen, or if it is even possible in any given system configuration. The purpose is to allow for that optimization when possible, not exclude CPU based approaches. Jason