Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2281800imm; Thu, 27 Sep 2018 10:10:47 -0700 (PDT) X-Google-Smtp-Source: ACcGV63CVLpSckpCixUY6XDFui8CVMr1LSNtX8YeUeAZlXMyIoO2JB0b6cVt2mIWE7msViHeyBDl X-Received: by 2002:a62:c80d:: with SMTP id z13-v6mr12478646pff.176.1538068247888; Thu, 27 Sep 2018 10:10:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538068247; cv=none; d=google.com; s=arc-20160816; b=MLXhMSbB5Qwh++5+TM3eiaeDWAbBnZg9ckANaBd1lYiIts5RSmocDE9BMdQ1MXk2dP ewBpZGEN4Z8Gv7DeocIrqTuOGJikryZ6daDyiHO9XprhCTT5uVBwn59cW6LiP+BxKrqX +JYA012j/Gsn1CEBXNx+T0Qq3TnhIc9xhaHSLDPr/BWwXNpgQYus1cpgSlFR04KK44Sb laNGViufMx28oqxmfKcl8fJ034wevAuuJSCS8drkLhWRsiJkbngBVFNjvbFBcMjKGuN5 owelJmmKL3jNylJZk01Ma/UHBcVRvCG+V4J1zQM7e26pkctr2HGV8i1smNALx2ZDda80 CzVw== 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=UfiovRS1PLiKdKoelIw1BdmX/auvNuY6JYzOb1reTAE=; b=Bhq0Jm5lr32I5tg7J4iduLhnfH16dlxPg8APAYFy1x/0WtRrKZZLPVhVLcgk7imxnd hm8+Nh2cly6WKr1apbJLYI6b2DVykVjvpi2ZY6USu3syATQrx/AB0KPbt5nn2A5b7d6c HnfLaNug+PyBjGYU7SJAVEkYF0IS3meKaA3svn5QclJTPJtjqP9y1LLnfNCQ4LAz/5Vh F9WEUN1Y+FFpiqr11XcXHfd1M2rH2S3GFUFYMQoUnyg5aAjmVoTR7ir4iCeHZsSNzFPA XpW9fkS7H+dz3HsL5010TPWG1jW+QTLbZIeMhLVOWa4P6KUzY0g4h9E/ArmAIw2ECo3T Un6Q== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2-v6si2383942plh.206.2018.09.27.10.10.30; Thu, 27 Sep 2018 10:10:47 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728557AbeI0X3h (ORCPT + 99 others); Thu, 27 Sep 2018 19:29:37 -0400 Received: from mga03.intel.com ([134.134.136.65]:42530 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728062AbeI0X3h (ORCPT ); Thu, 27 Sep 2018 19:29:37 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Sep 2018 10:10:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,311,1534834800"; d="scan'208";a="260876714" Received: from unknown (HELO localhost.localdomain) ([10.232.112.44]) by orsmga005.jf.intel.com with ESMTP; 27 Sep 2018 10:10:21 -0700 Date: Thu, 27 Sep 2018 11:12:30 -0600 From: Keith Busch To: Logan Gunthorpe Cc: 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, Jens Axboe , Christian =?iso-8859-1?Q?K=F6nig?= , Benjamin Herrenschmidt , Steve Wise , Alex Williamson , =?iso-8859-1?B?Suly9G1l?= Glisse , Jason Gunthorpe , Bjorn Helgaas , Max Gurtovoy , Christoph Hellwig Subject: Re: [PATCH v8 13/13] nvmet: Optionally use PCI P2P memory Message-ID: <20180927171230.GE19589@localhost.localdomain> References: <20180927165420.5290-1-logang@deltatee.com> <20180927165420.5290-14-logang@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180927165420.5290-14-logang@deltatee.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 27, 2018 at 10:54:20AM -0600, Logan Gunthorpe wrote: > We create a configfs attribute in each nvme-fabrics target port to > enable p2p memory use. When enabled, the port will only then use the > p2p memory if a p2p memory device can be found which is behind the > same switch hierarchy as the RDMA port and all the block devices in > use. If the user enabled it and no devices are found, then the system > will silently fall back on using regular memory. > > If appropriate, that port will allocate memory for the RDMA buffers > for queues from the p2pmem device falling back to system memory should > anything fail. > > Ideally, we'd want to use an NVME CMB buffer as p2p memory. This would > save an extra PCI transfer as the NVME card could just take the data > out of it's own memory. However, at this time, only a limited number > of cards with CMB buffers seem to be available. > > Signed-off-by: Stephen Bates > Signed-off-by: Steve Wise > [hch: partial rewrite of the initial code] > Signed-off-by: Christoph Hellwig > Signed-off-by: Logan Gunthorpe I haven't the necessary hardware to try this out, but looking forward to it in the future. Looks good. Reviewed-by: Keith Busch