Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755390AbdCaWmR (ORCPT ); Fri, 31 Mar 2017 18:42:17 -0400 Received: from ale.deltatee.com ([207.54.116.67]:47872 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754963AbdCaWmN (ORCPT ); Fri, 31 Mar 2017 18:42:13 -0400 To: Sinan Kaya , Christoph Hellwig , Sagi Grimberg , "James E.J. Bottomley" , "Martin K. Petersen" , Jens Axboe , Steve Wise , Stephen Bates , Max Gurtovoy , Dan Williams , Keith Busch , Jason Gunthorpe References: <1490911959-5146-1-git-send-email-logang@deltatee.com> <1490911959-5146-2-git-send-email-logang@deltatee.com> <7158f2e8-2016-f398-e77f-0fcbe6cb41dd@deltatee.com> Cc: linux-pci@vger.kernel.org, linux-scsi@vger.kernel.org, linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, linux-nvdimm@ml01.01.org, linux-kernel@vger.kernel.org From: Logan Gunthorpe Message-ID: <0280fbb4-ba9e-ac64-6bb3-b72590a54e57@deltatee.com> Date: Fri, 31 Mar 2017 16:42:01 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.111 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org, linux-rdma@vger.kernel.org, linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org, linux-pci@vger.kernel.org, jgunthorpe@obsidianresearch.com, keith.busch@intel.com, dan.j.williams@intel.com, maxg@mellanox.com, sbates@raithlin.com, swise@opengridcomputing.com, axboe@kernel.dk, martin.petersen@oracle.com, jejb@linux.vnet.ibm.com, sagi@grimberg.me, hch@lst.de, okaya@codeaurora.org X-SA-Exim-Mail-From: logang@deltatee.com Subject: Re: [RFC 1/8] Introduce Peer-to-Peer memory (p2pmem) device X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2714 Lines: 53 On 31/03/17 03:38 PM, Sinan Kaya wrote: > On 3/31/2017 5:23 PM, Logan Gunthorpe wrote: >> What exactly would you white/black list? It can't be the NIC or the >> disk. If it's going to be a white/black list on the switch or root port >> then you'd need essentially the same code to ensure they are all behind >> the same switch or root port. > > What is so special about being connected to the same switch? > > Why don't we allow the feature by default and blacklist by the root ports > that don't work with a quirk. Well root ports have the same issue here. There may be more than one root port or other buses (ie QPI) between the devices in question. So you can't just say "this system has root port X therefore we can always use p2pmem". In the end, if you want to do any kind of restrictions you're going to have to walk the tree, as the code currently does, and figure out what's between the devices being used and black or white list accordingly. Then seeing there's just such a vast number of devices out there you'd almost certainly have to use some kind of white list and not a black list. Then the question becomes which devices will be white listed? The first to be listed would be switches seeing they will always work. This is pretty much what we have (though it doesn't currently cover multiple levels of switches). The next step, if someone wanted to test with specific hardware, might be to allow the case where all the devices are behind the same root port which Intel Ivy Bridge or newer. However, I don't think a comprehensive white list should be a requirement for this work to go forward and I don't think anything you've suggested will remove any of the "ugliness". What we discussed at LSF was that only allowing cases with a switch was the simplest way to be sure any given setup would actually work. > I'm looking at this from portability perspective to be honest. I'm looking at this from the fact that there's a vast number of topologies and devices involved, and figuring out which will work is very complicated and could require a lot of hardware testing. The LSF folks were primarily concerned with not having users enable the feature and see breakage or terrible performance. > I'd rather see the feature enabled by default without any assumptions. > Using it with a switch is just a use case that you happened to test. > It can allow new architectures to use your code tomorrow. That's why I was advocating for letting userspace decide such that if you're setting up a system with this you say to use a specific p2pmem device and then you are responsible to test and benchmark it and decide to use it in going forward. However, this has received a lot of push back. Logan