Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6276162imu; Wed, 30 Jan 2019 11:50:16 -0800 (PST) X-Google-Smtp-Source: AHgI3IZBdVOyMH+yGaQb4f8Qkfc8euoDZpNuQwS/0UljmzQC8AJq1UBBJH/KileSNLgHVetLvc3x X-Received: by 2002:a17:902:9687:: with SMTP id n7mr9961760plp.94.1548877816684; Wed, 30 Jan 2019 11:50:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548877816; cv=none; d=google.com; s=arc-20160816; b=IELDZi3Sl4XdM4hj2n4SQg6DVJZORUbm3pWge2ckHPgHDJ9IsNjvxIIaTjeLYfhMxf QnCwRlNPNMJ5wRt8Fqc/sAy16h8hNvyUkuR+rhbtIi7dtMWS+nAHYWsrfLcZgCpXpyDK UtCl96SA9SbqXIXL1xxw90/9uuKEld8ShsAWAxgUGvI9hOL0aOHo3bYxx2IoNjo00Pj0 cSNawLXhpHNDyTlxUpJIEN3RwAd1YpOCyw2dE+8Uy6gzVbFZdfF1BEuF412tHj16w2yS ULC9GgAvg0i2huXpjrOhRFtjyHQL01r4nN2lqV8cJ2YGkO+yNGuLhoKfmnEXgtCB7sZi xR7Q== 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=R0XqkFHvjJbmr89hBrYpg4+Bb0t2c0TP+VUWudgcqs0=; b=eBfpux79Nhd3lCDs7eV2aiHQsBMK0+dXh6t62sm/leMEiL64spHqmu8C4ki0gcfH01 f09Hors0xloZexMq70Ej9Ww2qw7cD97oX6U6xIdvGdAKD1keNycSU3gxq3YLR9ujs3U0 jrc4bEO4ZBr5fMp9AEHjUYrQHa+ZzmlvLh25IanUrsLqRe7iLesdKUu9G8RMRykVIlEC nmWlh16MOBnUBcLpVwi1dy7dUDPTEbWlSytEf8fwGBJLaTuhhAroRO0DjQr5hPPo4zeX INGYpl0g858v/5E120JdCAAuGWltjf/ZAANVel6sLF3eKmcrwro3nBE5ZCfl3gBKQWe+ 74sA== 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 d142si2277941pfd.93.2019.01.30.11.50.01; Wed, 30 Jan 2019 11:50:16 -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 S1733063AbfA3Tso (ORCPT + 99 others); Wed, 30 Jan 2019 14:48:44 -0500 Received: from ale.deltatee.com ([207.54.116.67]:40874 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727046AbfA3Tso (ORCPT ); Wed, 30 Jan 2019 14:48:44 -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 1govqd-0008Qp-Gb; Wed, 30 Jan 2019 12:48:36 -0700 To: Jason Gunthorpe Cc: Christoph Hellwig , 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: <20190129174728.6430-1-jglisse@redhat.com> <20190129174728.6430-4-jglisse@redhat.com> <20190129191120.GE3176@redhat.com> <20190129193250.GK10108@mellanox.com> <99c228c6-ef96-7594-cb43-78931966c75d@deltatee.com> <20190129205827.GM10108@mellanox.com> <20190130080208.GC29665@lst.de> <20190130174424.GA17080@mellanox.com> <20190130191946.GD17080@mellanox.com> From: Logan Gunthorpe Message-ID: <3793c115-2451-1479-29a9-04bed2831e4b@deltatee.com> Date: Wed, 30 Jan 2019 12:48:33 -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: <20190130191946.GD17080@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:19 p.m., Jason Gunthorpe wrote: > On Wed, Jan 30, 2019 at 11:13:11AM -0700, Logan Gunthorpe wrote: >> >> >> On 2019-01-30 10:44 a.m., Jason Gunthorpe wrote: >>> I don't see why a special case with a VMA is really that different. >> >> Well one *really* big difference is the VMA changes necessarily expose >> specialized new functionality to userspace which has to be supported >> forever and may be difficult to change. > > The only user change here is that more things will succeed when > creating RDMA MRs (and vice versa to GPU). I don't think this > restricts the kernel implementation at all, unless we intend to > remove P2P entirely.. Well for MRs I'd expect you are using struct pages to track the memory some how.... VMAs that aren't backed by pages and use this special interface must therefore be creating new special interfaces that can call p2p_[un]map... I'd much rather see special cases around struct page so we can find ways to generalize it in the future than create special cases tied to random userspace interfaces. Logan