Received: by 10.223.185.116 with SMTP id b49csp7886428wrg; Thu, 1 Mar 2018 12:58:50 -0800 (PST) X-Google-Smtp-Source: AG47ELtaopNy1JdslDMPcChDTWf4jwpj6gpDHzWwxxdYqg51+wLhanq54PUV5tK4TAClmCRryMxA X-Received: by 10.99.117.83 with SMTP id f19mr2553071pgn.318.1519937930275; Thu, 01 Mar 2018 12:58:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519937930; cv=none; d=google.com; s=arc-20160816; b=de08jAdP9NtHcUqpptbUPocLITpd10QpfuVFJK8x+7BDm0cFeoaq/SAR+OkpUvcgZb R+3Gb35hcq7g8OdLcZZpFJy+va+NmX3EICNEUgj77ZueGGUHzRzTCrJnsPetj5L9HH6E nYViMjcL6YtQDc7CliAbaWslX1GU5P7MTpUJYYPcbxKTa18ej65L3Pvd7d5A9ljSxmU2 lmyRST3++9VMo5BivmmHfHgZpp06nRKgRxk78uKCYzprwkVlAmSiGqSSAEAcHvWhi0xU lQJdqisXHFxLPH2Ck8oRvn3AbGjOD85dsLp/MS+fYDu1tTicWe6Ib00tErQB0D+GV0HR a0sg== 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:arc-authentication-results; bh=eFgMvqXY8yHMEsyQjURyhlOHWpTisNhZVdzVp8r9FNc=; b=XbI6+D3pVQ9c2ciJgNzVCJOMBTHHIRDO6hB3Lelu8+hA0E7/gEBRVAUAdlCYKvuu3/ cyIbpRZblTi/o9xl+VFxVYRyjxG4NUCWj7DWsSukkUpGMBut5nx96Ve16w7VXVC2n5cz qnAGcFbxKmCIpXwbE97m8jMAuBCiSUI5oknhFLxDM2KcSI/8w1FdqMoVYuedtD9rnYh5 M+XrcU6J+LW3ex6+uP/1wUINqoQaKBWIcvLv1wPZonWmAyspGkPO/RFRW1RiaNyqlb4c qfK2hPnwXXd+VbnIQtH/iUBtaJv4PAO0wcIbPLbXppPRABid3bxtZazmHrYelLQ9lQjm A29g== 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 j125si2927856pgc.697.2018.03.01.12.58.35; Thu, 01 Mar 2018 12:58:50 -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 S1161716AbeCAU43 (ORCPT + 99 others); Thu, 1 Mar 2018 15:56:29 -0500 Received: from ale.deltatee.com ([207.54.116.67]:38354 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161577AbeCAU4Z (ORCPT ); Thu, 1 Mar 2018 15:56:25 -0500 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.89) (envelope-from ) id 1erVFH-0001BD-S6; Thu, 01 Mar 2018 13:56:10 -0700 To: benh@au1.ibm.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, linux-nvdimm@lists.01.org, linux-block@vger.kernel.org Cc: Stephen Bates , Christoph Hellwig , Jens Axboe , Keith Busch , Sagi Grimberg , Bjorn Helgaas , Jason Gunthorpe , Max Gurtovoy , Dan Williams , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Alex Williamson , Oliver OHalloran References: <20180228234006.21093-1-logang@deltatee.com> <1519876489.4592.3.camel@kernel.crashing.org> <1519876569.4592.4.camel@au1.ibm.com> <8e808448-fc01-5da0-51e7-1a6657d5a23a@deltatee.com> <1519936195.4592.18.camel@au1.ibm.com> From: Logan Gunthorpe Message-ID: Date: Thu, 1 Mar 2018 13:55:59 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1519936195.4592.18.camel@au1.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: oliveroh@au1.ibm.com, alex.williamson@redhat.com, jglisse@redhat.com, dan.j.williams@intel.com, maxg@mellanox.com, jgg@mellanox.com, bhelgaas@google.com, sagi@grimberg.me, keith.busch@intel.com, axboe@kernel.dk, hch@lst.de, sbates@raithlin.com, linux-block@vger.kernel.org, linux-nvdimm@lists.01.org, linux-rdma@vger.kernel.org, linux-nvme@lists.infradead.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, benh@au1.ibm.com X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE,T_RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 Subject: Re: [PATCH v2 00/10] Copy Offload in NVMe Fabrics with P2P PCI Memory 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 01/03/18 01:29 PM, Benjamin Herrenschmidt wrote: > Oliver can you look into this ? You sais the memory was effectively > hotplug'ed into the system when creating the struct pages. That would > mean to me that it's a) mapped (which for us is cachable, maybe x86 has > tricks to avoid that) and b) potentially used to populate userspace > pages (that will definitely be cachable). Unless there's something in > there you didn't see that prevents it. Yes, we've been specifically prohibiting all cases where these pages get passed to userspace. We don't want that. Although it works in limited cases (ie x86), and we use it for some testing, there are dragons there. > - Our MMIO space is very far away from memory (high bits set in the > address) which causes problem with things like vmmemmap, page_address, > virt_to_page etc... Do you have similar issues on arm64 ? No similar issues on arm64. Any chance you could simply not map the PCI bars that way? What's the point of that? It may simply mean ppc64 can't be supported until either that changes or the kernel infrastructure gets more sophisticated. > Logan, the only reason you need struct page's to begin with is for the > DMA API right ? Or am I missing something here ? It's not so much the DMA map API as it is the entire kernel infrastructure. Scatter lists (which are universally used to setup DMA requests) require pages and bios require pages, etc, etc. In fact, this patch set, in its current form, routes around the DMA API entirely. Myself[1] and others have done prototype work to migrate away from struct pages and to use pfn_t instead but this work doesn't seem to get very far in the community. Logan [1] https://marc.info/?l=linux-kernel&m=149566222124326&w=2