Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6273312imu; Wed, 30 Jan 2019 11:46:45 -0800 (PST) X-Google-Smtp-Source: ALg8bN7PEQ23DR+KR6RaPZT5AunOqmgtHHp7065qflxHPHh2VkLYwRDTfoqdBXqukHkqeGEiNJ8Y X-Received: by 2002:a63:cc4e:: with SMTP id q14mr28403042pgi.291.1548877605220; Wed, 30 Jan 2019 11:46:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548877605; cv=none; d=google.com; s=arc-20160816; b=jSUSgo9vmV6K8zXL3fWaCZbn/YXjzc0EJmMi1qtxZsx7EmF3fJC3OH0aCKnjo8hiol qEI4YcNPSmXFbiM8QlQo8zN8hFr+xjGdmXJ4RtRNTgAkpq8z0z4MtKmOpd9dsc4nsjaO nh5a/r4p/q/1WLrT/56ddFGI5goZQmXhE1T5m6qISGoi5rPL2aTDDbKm7FEOjwNUJN29 zp6tqXwJyFlqylApbNny0tRPnUbcr+BD1PbY+/s42otWgMhzDsQkmKrAxShxitn/C+4t btwM/fzpPScHRxHmhRWq3OITcFWOYN2L8RVFcpsP0dPoIP4e4SFL/HZoEFcOBE9X3Foa M7Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to; bh=fpZGsSzil/iXoEwQkvIs5BnVmUKnDpCsYxqfz253Eac=; b=i6D/XlXz0LLYCfX7MO48mYWmohp3Xt8lBJrz918Rq+DRnPwA69AG269o+M989I+c8o N2/x3SQMZ0n9dc0stNj4es4KIJmtfMBEJqPS+QyBo5fj46Kj9uDsu5fK/ykUb4pUpDAA 8AZ7EYQ2WaR2mEDzpXqVBvMRrT8nsv+3gre2ft+boxULQhAGEiITQ1lmslzTUfEKF27J z6QPUOmINV7BoEC5YLURq/Fj/XBWPw5DJou/qGh3LuSGlHiOBpx3I91ddb886JXci8k1 tgQqre4CmnlbucslGccNxbKIIq3nc1NjJqZcbXBCvBWCbqntkT7tVcEMXq+OlV097n7B 4n8A== 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 v5si2204505plg.318.2019.01.30.11.46.28; Wed, 30 Jan 2019 11:46:45 -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 S2387693AbfA3TqF (ORCPT + 99 others); Wed, 30 Jan 2019 14:46:05 -0500 Received: from ale.deltatee.com ([207.54.116.67]:40824 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727890AbfA3TqF (ORCPT ); Wed, 30 Jan 2019 14:46:05 -0500 Received: from s01061831bf6ec98c.cg.shawcable.net ([68.147.80.180] helo=[192.168.6.205]) by ale.deltatee.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1govny-0008PD-5M; Wed, 30 Jan 2019 12:45:51 -0700 To: Jason Gunthorpe , Christoph Hellwig Cc: 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" , Marek Szyprowski , Robin Murphy , Joerg Roedel , "iommu@lists.linux-foundation.org" References: <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> <20190130080006.GB29665@lst.de> <20190130190651.GC17080@mellanox.com> From: Logan Gunthorpe Message-ID: <840256f8-0714-5d7d-e5f5-c96aec5c2c05@deltatee.com> Date: Wed, 30 Jan 2019 12:45:46 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190130190651.GC17080@mellanox.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 68.147.80.180 X-SA-Exim-Rcpt-To: iommu@lists.linux-foundation.org, jroedel@suse.de, robin.murphy@arm.com, m.szyprowski@samsung.com, dri-devel@lists.freedesktop.org, linux-pci@vger.kernel.org, Felix.Kuehling@amd.com, christian.koenig@amd.com, bhelgaas@google.com, rafael@kernel.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, jglisse@redhat.com, hch@lst.de, jgg@mellanox.com X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [RFC PATCH 3/5] mm/vma: add support for peer to peer to device vma X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-01-30 12:06 p.m., Jason Gunthorpe wrote: >> 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. > > GUP doesn't work anyhow today, and won't work with BAR struct pages in > the forseeable future (Logan has sent attempts on this before). I don't recall ever attempting that... But patching GUP for special pages or VMAS; or working around by not calling it in some cases seems like the thing that's going to need to be done one way or another. > Jerome made the HMM mirror API use this flow, so afer his patch to > switch the ODP MR to use HMM, and to switch GPU drivers, it will work > for those cases. Which is more than the zero cases than we have today > :) But we're getting the same bait and switch here... If you are using HMM you are using struct pages, but we're told we need this special VMA hack for cases that don't use HMM and thus don't have struct pages... Logan