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=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 CB0D6C433E0 for ; Thu, 2 Jul 2020 12:27:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A3E72207CD for ; Thu, 2 Jul 2020 12:27:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="gP3cBBNS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728953AbgGBM1i (ORCPT ); Thu, 2 Jul 2020 08:27:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726343AbgGBM1i (ORCPT ); Thu, 2 Jul 2020 08:27:38 -0400 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E5F5C08C5C1 for ; Thu, 2 Jul 2020 05:27:38 -0700 (PDT) Received: by mail-il1-x142.google.com with SMTP id r12so16803339ilh.4 for ; Thu, 02 Jul 2020 05:27:38 -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=KbXF3rVnE9Y+VvMzTuHkqkyR4wyjUs/wKLmuVOcm6+0=; b=gP3cBBNSsS80JZ9P5WC6YNQZ7v0N/xYCN2O+TyWeFsxablR8ZFXbLP4q37u6ltcfHR CUSk25nlb5msSP3XQUmNiPsyAR2mBpSFEso6szQhgfM2ptS3Ia1K+6kTRTOBl1RDtrjF d1Q/DOyk4kNSzS5hMLx9n6xKDPB+nE12lAGqg/wOyVDjn9ceKJ48fDXA2rjCloEONxvS 2nRThEbBdg2vDGJjjZjk0WDQ+PTBGVJJKcGDDYx/jtSsjVdSY5ERqe/lDink9KKM0QOc /lckCOfIP7rbu9cSQdZW3jq5yygjJ07SeWmdoDo5CD5OGpc7+V+J+ppvEmcFYKv4DfBM mg2g== 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=KbXF3rVnE9Y+VvMzTuHkqkyR4wyjUs/wKLmuVOcm6+0=; b=YJ1SARX/SwxaVGc/AfeT8YDVep2ec9P/eG1DMw54ruprcg6XmMy+6w5kDFtCbKjRKj qIU6SUbr8BEYbtQllgHJQZ8/lP74qWyLco56YwjUDEgNYDhyvp3GXsedws0lxKsY+6jB v7QKrNDF0SlUlVC4LoqIn6H8WA1HWe1XN4nptA8BLkxK6lcJm+ZijUOIjBEOEGkAOD89 9uAxF/lgMnOTHfrZ0R7g7q9oc/qG6vHpdPV/C9H3N+tI4VPNCukkXo/Pc1yJAlqvVKIw VP+vbUXXMw/uuAaMcMSKY0VhNx1pErpcF8D6vBcC9x8FAk19ixBM3o/h53x4hIyBwRjV xgKw== X-Gm-Message-State: AOAM5322/gJWlXcc0TszWq5qkcXMEmOSmY32eGqE0OhbQkF/nwoASJOB eOzIp47ime6bknMwFobCkXKPdA== X-Google-Smtp-Source: ABdhPJy97My/0BHrvS8CjsBg5Hl5wpr2Xfxh8eavaInlBkgzXSCZgRpkLqT4lq3H4wuhX4XIGaiFuA== X-Received: by 2002:a92:bb55:: with SMTP id w82mr12721102ili.146.1593692857820; Thu, 02 Jul 2020 05:27:37 -0700 (PDT) Received: from ziepe.ca ([206.223.160.26]) by smtp.gmail.com with ESMTPSA id d77sm5062859ill.67.2020.07.02.05.27.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2020 05:27:37 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.93) (envelope-from ) id 1jqyJU-002qqy-B3; Thu, 02 Jul 2020 09:27:36 -0300 Date: Thu, 2 Jul 2020 09:27:36 -0300 From: Jason Gunthorpe To: "Xiong, Jianxin" Cc: "linux-rdma@vger.kernel.org" , Doug Ledford , Sumit Semwal , Leon Romanovsky , "Vetter, Daniel" , Christian Koenig , "dri-devel@lists.freedesktop.org" Subject: Re: [RFC PATCH v2 0/3] RDMA: add dma-buf support Message-ID: <20200702122736.GR25301@ziepe.ca> References: <1593451903-30959-1-git-send-email-jianxin.xiong@intel.com> <20200629185152.GD25301@ziepe.ca> <20200630173435.GK25301@ziepe.ca> <20200630191700.GL25301@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Tue, Jun 30, 2020 at 08:08:46PM +0000, Xiong, Jianxin wrote: > > From: Jason Gunthorpe > > Sent: Tuesday, June 30, 2020 12:17 PM > > To: Xiong, Jianxin > > Cc: linux-rdma@vger.kernel.org; Doug Ledford ; Sumit Semwal ; Leon Romanovsky > > ; Vetter, Daniel ; Christian Koenig ; dri- > > devel@lists.freedesktop.org > > 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. > > Hmm. I thought the pfn corresponds to the address in the BAR range. I could be > wrong here. No, DEVICE_PRIVATE is a dummy pfn to empty address space. Jason 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 4C6FAC433E0 for ; Fri, 3 Jul 2020 08:12:41 +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 1E861207FF for ; Fri, 3 Jul 2020 08:12:41 +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="gP3cBBNS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1E861207FF 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 2C7046EB3F; Fri, 3 Jul 2020 08:12:18 +0000 (UTC) Received: from mail-il1-x141.google.com (mail-il1-x141.google.com [IPv6:2607:f8b0:4864:20::141]) by gabe.freedesktop.org (Postfix) with ESMTPS id B404E6E1DE for ; Thu, 2 Jul 2020 12:27:38 +0000 (UTC) Received: by mail-il1-x141.google.com with SMTP id h16so683200ilj.11 for ; Thu, 02 Jul 2020 05:27:38 -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=KbXF3rVnE9Y+VvMzTuHkqkyR4wyjUs/wKLmuVOcm6+0=; b=gP3cBBNSsS80JZ9P5WC6YNQZ7v0N/xYCN2O+TyWeFsxablR8ZFXbLP4q37u6ltcfHR CUSk25nlb5msSP3XQUmNiPsyAR2mBpSFEso6szQhgfM2ptS3Ia1K+6kTRTOBl1RDtrjF d1Q/DOyk4kNSzS5hMLx9n6xKDPB+nE12lAGqg/wOyVDjn9ceKJ48fDXA2rjCloEONxvS 2nRThEbBdg2vDGJjjZjk0WDQ+PTBGVJJKcGDDYx/jtSsjVdSY5ERqe/lDink9KKM0QOc /lckCOfIP7rbu9cSQdZW3jq5yygjJ07SeWmdoDo5CD5OGpc7+V+J+ppvEmcFYKv4DfBM mg2g== 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=KbXF3rVnE9Y+VvMzTuHkqkyR4wyjUs/wKLmuVOcm6+0=; b=mc5kDMQe2CwoVabAGki+iosFUoNjnKtxviBvU2ZBURiR0ze+16z7zEDa5Q24uzkqJk VQ0GscKqcMyhkH8bwqPR4UHv1IKqqh6zeNdeC5r+CPbs52YoluA7ovZlLntguRH4IlQn 1W3IuFd8O+xiEExBW03H7qsL1OUWOldFCWxUY7gECzb0Q5i6UDoL2XQHNa5FxTSwIZKr 5/eZ+pYkIaDs8311d/gTCbtQpUcTri5UBjNRxkXW+dpDP8NDpx79+yWc7kgmL5zbxk+t 5Ls78ivXSC8SvfF0qJEwJQDi9Y0EPs4rXjvfKiLnIg5HF/5+b5K/skd54N5G5hPJTr13 ztiw== X-Gm-Message-State: AOAM530Jc3WBLfdIMcYmeYTMUKXOnfLhjHJh2dF00FggZ4dSEF0+pEK0 wQ+x6tDZtfuY3UnBm02iSgj11A== X-Google-Smtp-Source: ABdhPJy97My/0BHrvS8CjsBg5Hl5wpr2Xfxh8eavaInlBkgzXSCZgRpkLqT4lq3H4wuhX4XIGaiFuA== X-Received: by 2002:a92:bb55:: with SMTP id w82mr12721102ili.146.1593692857820; Thu, 02 Jul 2020 05:27:37 -0700 (PDT) Received: from ziepe.ca ([206.223.160.26]) by smtp.gmail.com with ESMTPSA id d77sm5062859ill.67.2020.07.02.05.27.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2020 05:27:37 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.93) (envelope-from ) id 1jqyJU-002qqy-B3; Thu, 02 Jul 2020 09:27:36 -0300 Date: Thu, 2 Jul 2020 09:27:36 -0300 From: Jason Gunthorpe To: "Xiong, Jianxin" Subject: Re: [RFC PATCH v2 0/3] RDMA: add dma-buf support Message-ID: <20200702122736.GR25301@ziepe.ca> References: <1593451903-30959-1-git-send-email-jianxin.xiong@intel.com> <20200629185152.GD25301@ziepe.ca> <20200630173435.GK25301@ziepe.ca> <20200630191700.GL25301@ziepe.ca> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailman-Approved-At: Fri, 03 Jul 2020 08:12:01 +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 08:08:46PM +0000, Xiong, Jianxin wrote: > > From: Jason Gunthorpe > > Sent: Tuesday, June 30, 2020 12:17 PM > > To: Xiong, Jianxin > > Cc: linux-rdma@vger.kernel.org; Doug Ledford ; Sumit Semwal ; Leon Romanovsky > > ; Vetter, Daniel ; Christian Koenig ; dri- > > devel@lists.freedesktop.org > > 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. > > Hmm. I thought the pfn corresponds to the address in the BAR range. I could be > wrong here. No, DEVICE_PRIVATE is a dummy pfn to empty address space. Jason _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel