Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5604094imu; Wed, 30 Jan 2019 00:00:32 -0800 (PST) X-Google-Smtp-Source: ALg8bN5Nw3OCTNTAZusGIF9dQ13WpSmsR2lATtzQ4vLi79Xk9NiZGLOFu21L9S70YSdUR+BX6AHx X-Received: by 2002:a63:6ac5:: with SMTP id f188mr26924057pgc.165.1548835232655; Wed, 30 Jan 2019 00:00:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548835232; cv=none; d=google.com; s=arc-20160816; b=i7Pi08yAQ1zfMHz4k/0TZvKWmSqSQGoqL8ThS++oP2nj1CHZKZb2QsZhW9H2jTnhIB gIDXg05RoTeFaI3j14kd6QQ4iARbEjh37uBG+nbqx5Z4e04OPRoPJleNxmSaBWEWP8pt ZQRF3mvxsPkHypoDxJP1nTIVWrqW5ERXie4Dns+x5PmTN4U8Ezb86acdzRnxpn/c+f1C Dz3ZETtvct00WvHu3s2ijV3c9t0TiQUdIZpk+8EjyzMXKVbjQSdt+HQoFlWiexbPIzYM tl8wKiqkttd5O223BTD0hwKalqMaJgXuBiUROiOzljjs7lMP2VvqfYTSUfw5N5Okmh+a Iu/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=xZSgWiNBQ9mrPvNDImvMeqZ7ZyFvATCOQEBhdh+uC3A=; b=jx6GHsT+9EH5wF6yrp/CEI/+5oAvfW/4E5pB7Qei4qSTnIsFLis6Wjl67bAjcEE7kq vtPa0gM7ss2wcEnvYVTu7BkpZFf5yFHwn5O+gDpEjwc3qWOXEJoU2hU5mmSWGLSKpr+M F/d1SJC2Wh44ZqzAgk1dRphASJSc04rj8tOaGCC4jWgew6fmgviUzLW5+ygfYc6fq+8Q Ir3Y9dwHAJae1mooUje8P+sXJ1fi9RgJYCxI2QwdDiDPYEztsoANOjFYL6SCseCAsPPr 0+MggPEyQa4aj1wKxyA8Ri5m9i9ioTYXGaEc1CgxRf5SPAaNrFAHu9jHxlaQDc4mH02f TbfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z18si839891plo.89.2019.01.30.00.00.17; Wed, 30 Jan 2019 00:00:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728499AbfA3IAI (ORCPT + 99 others); Wed, 30 Jan 2019 03:00:08 -0500 Received: from verein.lst.de ([213.95.11.211]:50745 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725830AbfA3IAI (ORCPT ); Wed, 30 Jan 2019 03:00:08 -0500 Received: by newverein.lst.de (Postfix, from userid 2407) id 65FAD68CEC; Wed, 30 Jan 2019 09:00:06 +0100 (CET) Date: Wed, 30 Jan 2019 09:00:06 +0100 From: Christoph Hellwig To: Jason Gunthorpe Cc: Logan Gunthorpe , Jerome Glisse , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Greg Kroah-Hartman , "Rafael J . Wysocki" , Bjorn Helgaas , Christian Koenig , Felix Kuehling , "linux-pci@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , Christoph Hellwig , Marek Szyprowski , Robin Murphy , Joerg Roedel , "iommu@lists.linux-foundation.org" Subject: Re: [RFC PATCH 3/5] mm/vma: add support for peer to peer to device vma Message-ID: <20190130080006.GB29665@lst.de> References: <20190129191120.GE3176@redhat.com> <20190129193250.GK10108@mellanox.com> <99c228c6-ef96-7594-cb43-78931966c75d@deltatee.com> <20190129205749.GN3176@redhat.com> <2b704e96-9c7c-3024-b87f-364b9ba22208@deltatee.com> <20190129215028.GQ3176@redhat.com> <20190129234752.GR3176@redhat.com> <655a335c-ab91-d1fc-1ed3-b5f0d37c6226@deltatee.com> <20190130041841.GB30598@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190130041841.GB30598@mellanox.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 30, 2019 at 04:18:48AM +0000, Jason Gunthorpe wrote: > Every attempt to give BAR memory to struct page has run into major > trouble, IMHO, so I like that this approach avoids that. Way less problems than not having struct page for doing anything non-trivial. If you map the BAR to userspace with remap_pfn_range and friends the mapping is indeed very simple. But any operation that expects a page structure, which is at least everything using get_user_pages won't work. So you can't do direct I/O to your remapped BAR, you can't create MRs on it, etc, etc.