Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp418132pxb; Wed, 8 Sep 2021 04:20:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDDi0sO7qaDCpEX5E+zSDASOzJ9DJDY/ELbCRkD99xwFfhtUPRVCNMj9p36E3oddy9dbIA X-Received: by 2002:a02:2a88:: with SMTP id w130mr3228963jaw.60.1631100056654; Wed, 08 Sep 2021 04:20:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631100056; cv=none; d=google.com; s=arc-20160816; b=v3L6qNhkEvUZPNd9T4BHNkOw8qYpA5FqK3E3i4jJFsl+v3cGbfy1PVaNETjr4QwHzS xrSfvW5Dw1Cn020a2CU0exLeb/+M469opqYowSx1HCAg7j3/nahbtgDBG0hBkvLxEaqN 6YZo3md9yPNsn1o0YsN29sqY3oZ4fbWtmY1Ct0VSfeZgavB3iTam4zchPViCAT1e6sz1 NEE6S4C8cHWDddsaSqmdBR8oYXqDKoCqkNIiWJ3or8hiYjiuXNfdpIo8iWB7W1r8xD+k 392y73FDAyQ7x4Lw5OanMaCxgJX63wSaYswrpv6R/dI7noZqxzcBUJ9q1JpcZZFwGijk koPw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=CHtrF75xmvvEALOjOIBKc7M8qJeQRUqeJb5BJfh1H4g=; b=gWBMs+ZdnQUfBvLEznVRyvm3OxJnG7XoK8v3rNlGxCtDqehcVmXg/F5XnhlQAKW8+1 ZNbwImdpwX+ZTsz/hN4I4ehbTVWwvnb7pgX2tVrAutylfEvTmE0PniUxSqAXrTGuIQiA n/qsNNdCBMfLKxjZWwnhi0FVK+wrUmFlXVOGye0FIhjoWdDmjfSQAMtneuo8oW2uGtJ3 iKWWMlQt5wqCu3XDrIQZEACcmDjdgiQSpJSXZWXaLKGFCw8YoD1Ypa547j5KleWP4Z09 Rn36i74R55BDEMcI+W9j/VOB6JsTww9Cd/ftLCqi9kKtv/ewVQzn3NlL2tLUa3ZXOrwk zeaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b="QwWkF/R3"; 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 f24si1659776jaa.118.2021.09.08.04.20.01; Wed, 08 Sep 2021 04:20:56 -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="QwWkF/R3"; 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 S232430AbhIHLTQ (ORCPT + 99 others); Wed, 8 Sep 2021 07:19:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235044AbhIHLTP (ORCPT ); Wed, 8 Sep 2021 07:19:15 -0400 Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCAA8C061575 for ; Wed, 8 Sep 2021 04:18:07 -0700 (PDT) Received: by mail-qk1-x72b.google.com with SMTP id a66so2053126qkc.1 for ; Wed, 08 Sep 2021 04:18:07 -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:content-transfer-encoding:in-reply-to; bh=CHtrF75xmvvEALOjOIBKc7M8qJeQRUqeJb5BJfh1H4g=; b=QwWkF/R3UC+GHKapNtWpRxWl/VBHK/V/UAWmNV1TX2ReNuoWYDlPfVmhk7ycJ2ZgEr eP6E445pnO2fEW4QvORpGXLiHfBMuciQoRlf8NJwAlmjAA4lLWzteHP8/ouuu/Eg6w9+ 5rdFVGRoOPnkZaw7jr9hfKktATeAaRa1FCgbadxs/B3nWy4f+Ob8w2IchLAroxIPujDX TIMVVjir6GhXD4xUXta877YZTKcgpziP60ScneZjCqPH6ElP9CBcsD73ihkYEHUwnSRN nPV2lYKJfwMAe0gKeJ3iS78FUXrS4KcBJz3suqmZewccRERLeiyCGG8bxmqFX4a094l1 hJ7A== 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:content-transfer-encoding :in-reply-to; bh=CHtrF75xmvvEALOjOIBKc7M8qJeQRUqeJb5BJfh1H4g=; b=rGWSvo/di36juk7hpmendHcHrBo8FrG5JPE0qlcfNFSGn68HuIHnF1NNpDKkOBuEx2 gg00nYZuYPqKsibGMWM9APOKrOZmevdOoNdkpKcV38IATYpZawdeNJHC8JOuzS86dJfV XNAOST3sqRzDtsjCSPwycQtcsOeNuqd8OOwOT+doX+7yHB6r2tgIs2sVJEKt0qooipgn lqMhnOczvvbebA55lryN3PT4UwBF6xfGa/cHNyLMEVQs5aIF6J2cGMJzhbSxHqX/fVKq b0x904mVEC1+prTMLnhNKSKQt4drtYWYlKhqKs94m2MBknFPMHcm1mt2HbO+zpKI9QK4 Gwkw== X-Gm-Message-State: AOAM533jv8FZCAgsaivz6HzHaBBplT9o1ffbnA6v1kKbgGNKt2uOI9aG H574lcGTwNoszgk37zgavIoCBQ== X-Received: by 2002:a37:f90c:: with SMTP id l12mr2768510qkj.514.1631099887068; Wed, 08 Sep 2021 04:18:07 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-162-113-129.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.113.129]) by smtp.gmail.com with ESMTPSA id h12sm1277051qth.1.2021.09.08.04.18.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 04:18:05 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1mNvae-00DFol-Ol; Wed, 08 Sep 2021 08:18:04 -0300 Date: Wed, 8 Sep 2021 08:18:04 -0300 From: Jason Gunthorpe To: Shunsuke Mie Cc: Christoph Hellwig , Zhu Yanjun , Christian K??nig , Alex Deucher , Daniel Vetter , Doug Ledford , Jianxin Xiong , Leon Romanovsky , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Damian Hobson-Garcia , Takanari Hayama , Tomohito Esaki Subject: Re: [RFC PATCH 1/3] RDMA/umem: Change for rdma devices has not dma device Message-ID: <20210908111804.GX1200268@ziepe.ca> References: <20210908061611.69823-1-mie@igel.co.jp> <20210908061611.69823-2-mie@igel.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 08, 2021 at 05:41:39PM +0900, Shunsuke Mie wrote: > 2021年9月8日(水) 16:20 Christoph Hellwig : > > > > On Wed, Sep 08, 2021 at 04:01:14PM +0900, Shunsuke Mie wrote: > > > Thank you for your comment. > > > > > > > > On Wed, Sep 08, 2021 at 03:16:09PM +0900, Shunsuke Mie wrote: > > > > > To share memory space using dma-buf, a API of the dma-buf requires dma > > > > > device, but devices such as rxe do not have a dma device. For those case, > > > > > change to specify a device of struct ib instead of the dma device. > > > > > > > > So if dma-buf doesn't actually need a device to dma map why do we ever > > > > pass the dma_device here? Something does not add up. > > > As described in the dma-buf api guide [1], the dma_device is used by dma-buf > > > exporter to know the device buffer constraints of importer. > > > [1] https://lwn.net/Articles/489703/ > > > > Which means for rxe you'd also have to pass the one for the underlying > > net device. > I thought of that way too. In that case, the memory region is constrained by the > net device, but rxe driver copies data using CPU. To avoid the constraints, I > decided to use the ib device. Well, that is the whole problem. We can't mix the dmabuf stuff people are doing that doesn't fill in the CPU pages in the SGL with RXE - it is simply impossible as things currently are for RXE to acess this non-struct page memory. Jason