Received: by 10.223.185.116 with SMTP id b49csp7730023wrg; Thu, 1 Mar 2018 10:05:47 -0800 (PST) X-Google-Smtp-Source: AG47ELsjVFHQaRN8ASZWgAyEJLK2hDYGifQWBT8VBHs77t/5340cTNcv+nYPSpnyTDgamyEQBSes X-Received: by 10.98.98.194 with SMTP id w185mr2812872pfb.9.1519927547670; Thu, 01 Mar 2018 10:05:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519927547; cv=none; d=google.com; s=arc-20160816; b=kpZFrtXYrAnqr7gRei3fV7YQBUd9XifaWWzbrvuSUFmCFggZrDECFGPe621B0Nvtvi rYLbw8ogzUWaX8Q7CKCqss9+s5FL3V0f/26Dy0H72h2XJ8jV27Fjnd3MNEtZVZlb1G2v +YCsaOm1CosXP7Tin1XGBOf/1B7ntS7ycpdTKKCDG9r6zacSOgTNJeTspLXOKwi8jGf6 /oMa6UYP7nhcWK3NrUMln57PVw2i0y/kt5JgB2SBLe2QdkZmPcxHVInDjNcHCke/k/wL n7E64NvSYUShkkFUJwZLxQqOI1cHOkky8xmlEv+M8kn8FRXCDSO/RdmnKkd4UNFroKEV VXCw== 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=BOJAFRxvfpr8giIES3lNS9/VNc70ng1g6TgA5ng8L8g=; b=pOuI7ww/k3+kmgThVsKMVrWUndYmvuRySouC42kht9UVIGEdexMG1pj7WjaIZkcLmW /Z0Z+aq1kCOgGPD26+Bn/CEA29550B1NNBIh10XGz7jFGmHVzw8t/XKEDxyxekrCeWeG YhEOiJvdA/7Jd59/6lpCWvGq/jcEnD0gdrC35rfEMPXpA8Dw/v9nDlw9+MEOCpw0pQd7 JG7510+AjBxdpZWRwaYCixp2dhbsG7V2uHSRCtm42OY6XSgXKzNnGWbaGnobp8oOXOTK +KS25IviKifxFl9XY38bd0+ijrppi+H3sjhV2tCQtBPZOfkvzimK7fUdiGM0BIJv6aqv TijQ== 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 q87si3324682pfa.385.2018.03.01.10.05.32; Thu, 01 Mar 2018 10:05:47 -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 S1033771AbeCASEz (ORCPT + 99 others); Thu, 1 Mar 2018 13:04:55 -0500 Received: from ale.deltatee.com ([207.54.116.67]:36960 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033627AbeCASEx (ORCPT ); Thu, 1 Mar 2018 13:04:53 -0500 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.89) (envelope-from ) id 1erSZG-0007nt-5i; Thu, 01 Mar 2018 11:04:34 -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> From: Logan Gunthorpe Message-ID: <8e808448-fc01-5da0-51e7-1a6657d5a23a@deltatee.com> Date: Thu, 1 Mar 2018 11:04:32 -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: <1519876569.4592.4.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 28/02/18 08:56 PM, Benjamin Herrenschmidt wrote: > On Thu, 2018-03-01 at 14:54 +1100, Benjamin Herrenschmidt wrote: >> The problem is that acccording to him (I didn't double check the latest >> patches) you effectively hotplug the PCIe memory into the system when >> creating struct pages. >> >> This cannot possibly work for us. First we cannot map PCIe memory as >> cachable. (Note that doing so is a bad idea if you are behind a PLX >> switch anyway since you'd ahve to manage cache coherency in SW). > > Note: I think the above means it won't work behind a switch on x86 > either, will it ? This works perfectly fine on x86 behind a switch and we've tested it on multiple machines. We've never had an issue of running out of virtual space despite our PCI bars typically being located with an offset of 56TB or more. The arch code on x86 also somehow figures out not to map the memory as cachable so that's not an issue (though, at this point, the CPU never accesses the memory so even if it were, it wouldn't affect anything). We also had this working on ARM64 a while back but it required some out of tree ZONE_DEVICE patches and some truly horrid hacks to it's arch code to ioremap the memory into the page map. You didn't mention what architecture you were trying this on. It may make sense at this point to make this feature dependent on x86 until more work is done to make it properly portable. Something like arch functions that allow adding IO memory pages to with a specific cache setting. Though, if an arch has such restrictive limits on the map size it would probably need to address that too somehow. Thanks, Logan