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=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 7F18AC433E1 for ; Wed, 1 Jul 2020 07:12:44 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 53379206BE for ; Wed, 1 Jul 2020 07:12:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="k1v79OlG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 53379206BE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0C3E26E817; Wed, 1 Jul 2020 07:12:08 +0000 (UTC) Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) by gabe.freedesktop.org (Postfix) with ESMTPS id A49226E17D for ; Tue, 30 Jun 2020 19:17:02 +0000 (UTC) Received: by mail-il1-x142.google.com with SMTP id a11so10531966ilk.0 for ; Tue, 30 Jun 2020 12:17:02 -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=3Z8G4sY/3BGmyIjcdbfqV1osL+GlJtPN7I10BAIUxWU=; b=k1v79OlGEmtKhJ5piARsXMeK1rd/NK3yT/drkmMqpD3sXC7KYiKNDNNbQU+r+V8P4C CjGTxiqMrI3i1arOaNM1SxAIw27Nf3eW/fM3T1Wt70BrgGjUbjaUzNNquHHMMcMrvRxo Z1WI44Y3ZJ2/0oiL2+dhywTrG4XZSiNWCu2ho2lds0SEwWVpCix7WIVkmTgRV3qSbaVz AR0RbFd8IkNo4iwvYwvkXhbLFHgIqYJvTY1+HOPAUDIM7hLWg3aEP7mug/XM8kOhqY7q 7PjvYb6sWZwyugTZGz5nOG+I5I9rsvncG7r0CNQ8/E4focEU5U6iRJreMTB6yiYhIoct jbUw== 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=3Z8G4sY/3BGmyIjcdbfqV1osL+GlJtPN7I10BAIUxWU=; b=tW7RCCpbQlcOlXEL0C2MDaKR+EFV9BWjzWjxCYj5CzBNABx7vDU05xReomGHir5E4S dq87anlwIO6qGyalf6rI7J2c5TJ5RT2xWBTYl/8s5cf6w2pS3toV3imFxipFToZXq3c1 d1ts3KCAoyUr9TOihXwORf5XIVS2lNtxCKRb72WLRc7D53ZmFzG9BPZJzENwgtwAj4ou T46RdtqGNmMH1nzgrKZTFsQKjSIz/WJI4sbsSJW4ddFAvCquoQfURSIZZQdgV+0diBrZ NR48O8g/8X7aVTwcDMUdsNe7kZFJfV5bM/i8X3xMZOyYk9injr0XoNYwrn2oCVGZR5N+ QcZA== X-Gm-Message-State: AOAM530rAQbAmLhxw/rpxOuP9TWVK9suEnS3kZrScIRzPYou7XxhhREZ jpiNbIfA/DeydOA2gb7oVv/5tQ== X-Google-Smtp-Source: ABdhPJzW4EQndHUYdS2/xV0eFxNWR3D/TY/epRvvziYytNeMu+qD0CnLv9714Fptw+qZ4z2bgWiF/A== X-Received: by 2002:a92:4a09:: with SMTP id m9mr4283864ilf.79.1593544621848; Tue, 30 Jun 2020 12:17:01 -0700 (PDT) Received: from ziepe.ca ([206.223.160.26]) by smtp.gmail.com with ESMTPSA id y2sm1815038iox.22.2020.06.30.12.17.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jun 2020 12:17:01 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.93) (envelope-from ) id 1jqLka-0026er-89; Tue, 30 Jun 2020 16:17:00 -0300 Date: Tue, 30 Jun 2020 16:17:00 -0300 From: Jason Gunthorpe To: "Xiong, Jianxin" Subject: Re: [RFC PATCH v2 0/3] RDMA: add dma-buf support Message-ID: <20200630191700.GL25301@ziepe.ca> References: <1593451903-30959-1-git-send-email-jianxin.xiong@intel.com> <20200629185152.GD25301@ziepe.ca> <20200630173435.GK25301@ziepe.ca> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailman-Approved-At: Wed, 01 Jul 2020 07:12:04 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Leon Romanovsky , "linux-rdma@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , Christian Koenig , Doug Ledford , "Vetter, Daniel" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue, Jun 30, 2020 at 06:46:17PM +0000, Xiong, Jianxin wrote: > > From: Jason Gunthorpe > > Sent: Tuesday, June 30, 2020 10:35 AM > > To: Xiong, Jianxin > > Cc: linux-rdma@vger.kernel.org; Doug Ledford ; Sumit Semwal ; Leon Romanovsky > > ; Vetter, Daniel ; Christian Koenig > > Subject: Re: [RFC PATCH v2 0/3] RDMA: add dma-buf support > > > > On Tue, Jun 30, 2020 at 05:21:33PM +0000, Xiong, Jianxin wrote: > > > > > Heterogeneous Memory Management (HMM) utilizes > > > > > mmu_interval_notifier and ZONE_DEVICE to support shared virtual > > > > > address space and page migration between system memory and device > > > > > memory. HMM doesn't support pinning device memory because pages > > > > > located on device must be able to migrate to system memory when > > > > > accessed by CPU. Peer-to-peer access is possible if the peer can > > > > > handle page fault. For RDMA, that means the NIC must support on-demand paging. > > > > > > > > peer-peer access is currently not possible with hmm_range_fault(). > > > > > > Currently hmm_range_fault() always sets the cpu access flag and device > > > private pages are migrated to the system RAM in the fault handler. > > > However, it's possible to have a modified code flow to keep the device > > > private page info for use with peer to peer access. > > > > Sort of, but only within the same device, RDMA or anything else generic can't reach inside a DEVICE_PRIVATE and extract anything useful. > > But pfn is supposed to be all that is needed. Needed for what? The PFN of the DEVICE_PRIVATE pages is useless for anything. > > Well, what do you want to happen here? The RDMA parts are > > reasonable, but I don't want to add new functionality without a > > purpose - the other parts need to be settled out first. > > At the RDMA side, we mainly want to check if the changes are > acceptable. For example, the part about adding 'fd' to the device > ops and the ioctl interface. All the previous comments are very > helpful for us to refine the patch so that we can be ready when GPU > side support becomes available. Well, I'm not totally happy with the way the umem and the fd is handled so roughly and incompletely.. > > Hum. This is not actually so hard to do. The whole dma buf > > proposal would make a lot more sense if the 'dma buf MR' had to be > > the dynamic kind and the driver had to provide the faulting. It > > would not be so hard to change mlx5 to be able to work like this, > > perhaps. (the locking might be a bit tricky though) > > The main issue is that not all NICs support ODP. Sure, but there is lots of infrastructure work here to be done on dma buf, having a correct consumer in the form of ODP might be helpful to advance it. Jason _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel