Received: by 10.213.65.68 with SMTP id h4csp645738imn; Tue, 13 Mar 2018 16:20:41 -0700 (PDT) X-Google-Smtp-Source: AG47ELtUPdExJzWj7JIkdCt7iYsI9U1qlYB4yGM6rh9HOvOuNbYYrZgr5EyALjNBNZXHCn8Sg51S X-Received: by 2002:a17:902:66e6:: with SMTP id e93-v6mr2107103plk.312.1520983241903; Tue, 13 Mar 2018 16:20:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520983241; cv=none; d=google.com; s=arc-20160816; b=iMS/nlxexm+uDLZ8f4dFTyV9kIsvGvJrPOhraAObcoulQ5e/PqCtyMCiu7q7g8SAWx +mtO/4KpzLeTZYMW5pHdSJ9Nz6UZZxx6nkm17ahYpNctfRJuNGiVVkBf1Vq1z+zorpfJ 2j/NGFldfUZq3eZJtn6Taeoa4AwkJ4nGexgICZ22xavIdFKBphenxm6uBNTmiiOfAcaD 0N9FRUnnEmuPZRr8ALC0sWKjwSGKqdFD9HbH6Nz2gd/PCT6pGOwr3AAhatpJL8NLEQ2d u6GMTbQMG3cRVuGMFGYZWz61jyKsHQKRVZhD8H+jNu4CO56B7j2sG4++mz81LmZqOuzp A7gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=DX4gA7Z+l23xYj7blnTB3Iax3t2Z+5unOp0KPlKdUR8=; b=UEnS7TrSdY/mkD4L+XvK6NkcjkmaBirF8tbxCcEKu8TR6VN6ULGApi6gr339IXuDdm C1KaA3xqrhSrr5R9YV3e5aJSjW5VaN5pxUCAQ7lwIZ+OhXuDvtQzi2C4OK5eOHstHogb e4uCepgu9IK0S8yza1tK6QSL54oppnmnP40msBu6JnRev52bcbyh8pPW0simX/d0q3xA ZgRk9CtnySDhzpBvVoTmnQF2RNDDsDkntrDzIVBPrwxkJ5mbmWqi7pRh0K5bvT4N/CaV Ltgfj632kZYx3grukP56k3F6Np69kEHinD6uNJUb1+gilh9pNgh2WSFZppz9xrnmjfJG TR2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=jcOSBcSa; dkim=pass header.i=@codeaurora.org header.s=default header.b=JICOsiIa; 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 a13si964218pfg.61.2018.03.13.16.20.27; Tue, 13 Mar 2018 16:20:41 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=jcOSBcSa; dkim=pass header.i=@codeaurora.org header.s=default header.b=JICOsiIa; 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 S932808AbeCMXTO (ORCPT + 99 others); Tue, 13 Mar 2018 19:19:14 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:51036 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752757AbeCMXTM (ORCPT ); Tue, 13 Mar 2018 19:19:12 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8CC6260591; Tue, 13 Mar 2018 23:19:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520983151; bh=cbzQbhOUjOke3oARShudj4k4DqiyByGMDxdxqMyAW10=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=jcOSBcSaUEJbY3C58i77USylebUaahXs56UIjHJ7+p1skpxCZrqVJAhG0LsgwQ10z qvskVEFvA4V1SxFqnx6MaP45Fr4NcL4AKk4BECqabkFjG+TKnxYoExjcD1stSs6wGi ImLhObU7kTEkfJIhI2TZ64LdanIXBKFW/65ZU7GE= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.235.228.150] (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2F8B1605FB; Tue, 13 Mar 2018 23:19:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520983149; bh=cbzQbhOUjOke3oARShudj4k4DqiyByGMDxdxqMyAW10=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=JICOsiIab7bbEG3JTFyQOGO0if0cbQ6JQTAgL/yrTOWHUViPsIS1nVHHRO/z7RkLq G0vePOFl2qRt+iDWhTXv7uJBN5lCx+UhT576f/OX5095c4gpZHN+F0gZRFd1fNWzYX B6IipTBCbj+ASueZ392SarpKOJdpJKw9l6oSKtds= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2F8B1605FB Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org Subject: Re: [PATCH v3 01/11] PCI/P2PDMA: Support peer-to-peer memory To: Logan Gunthorpe , 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?= , Benjamin Herrenschmidt , Alex Williamson References: <20180312193525.2855-1-logang@deltatee.com> <20180312193525.2855-2-logang@deltatee.com> <59fd2f5d-177f-334a-a9c4-0f8a6ec7c303@codeaurora.org> <24d8e5c2-065d-8bde-3f5d-7f158be9c578@deltatee.com> <52cbbbc4-c488-f83f-8d02-14d455b4efd7@codeaurora.org> <3e738f95-d73c-4182-2fa1-8664aafb1ab7@deltatee.com> <703aa92c-0c1c-4852-5887-6f6e6ccde0fb@codeaurora.org> <3ea80992-a0fc-08f2-d93d-ae0ec4e3f4ce@codeaurora.org> <4eb6850c-df1b-fd44-3ee0-d43a50270b53@deltatee.com> <757fca36-dee4-e070-669e-f2788bd78e41@codeaurora.org> <4f761f55-4e9a-dccb-d12f-c59d2cd689db@deltatee.com> <016dc910-f96a-8a60-4bda-fa24eea98ea5@codeaurora.org> <2b152932-2f44-408b-e3ed-b4608d95f82e@deltatee.com> From: Sinan Kaya Message-ID: <156c24fb-6e27-28f6-0b36-7fd83311ce37@codeaurora.org> Date: Tue, 13 Mar 2018 19:19:07 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <2b152932-2f44-408b-e3ed-b4608d95f82e@deltatee.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/13/2018 6:48 PM, Logan Gunthorpe wrote: > > > On 13/03/18 04:29 PM, Sinan Kaya wrote: >> If hardware doesn't support it, blacklisting should have been the right >> path and I still think that you should remove all switch business from the code. >> I did not hear enough justification for having a switch requirement >> for P2P. > > I disagree. > >> You are also saying that root ports have issues not because of functionality but >> because of performance. > > No... performance can also be an issue but the main justification for > this is that many root ports do not support P2P at all and can fail in > different ways (usually just dropping the TLPs). > >> What if I come up with a very cheap/crappy switch (something like used in data >> mining)? > > Good luck. That's not how hardware is designed. PCIe switches that have > any hope to compete with the existing market will need features like > NTB, non-transparent ports, etc... and that implies a certain symmetry > (ie there isn't a special host port because there may be more than one > and it may move around) which implies that packets will always be able > to forward between each ports which implies P2P will work. > It is still a switch it can move packets but, maybe it can move data at 100kbps speed. What prevents that switch from trying P2P and having a bad user experience? If everything is so broken, I was suggesting to at least list the switches you have tested. What's the problem with this? Why do you want to assume that all switches are good and all root ports are bad? >> I have been doing my best to provide feedback. It feels like you are throwing >> them over the wall to be honest. >> >> You keep implying "not my problem". > > Well, the fact of the matter is that extending this in all the ways > people like you want face huge problems on all sides. These are not > trivial issues and holding back work that works for our problem because > it doesn't solve your problem is IMO just going to grind development in > this area to a halt. We have to have something we can agree on which is > safe to start building on. The building can't just emerge fully formed > in one go. > What if the design is so canned that you can't change anything? I have been asking things like getting rid of switch search in ACS enablement towards achieving generic P2P. You seem to be pushing back. You said yourself P2P and isolation doesn't go together at this point but you also care about isolation for other devices that are not doing P2P. Confusing... > P2P proposal go back a long time and have never gotten anywhere because > there are limitations and people want it to do things that are hard but > don't want to contribute the work to solving those problems. > >>> Well, if it's a problem for someone they'll have to solve it. We're >>> targeting JBOFs that have no use for ACS / IOMMU groups at all. >> >> IMO, you (not somebody) should address this one way or the other before this >> series land in upstream. > > The real way to address this (as I've mentioned before) is with some way > of doing ACS and iomem groups dynamically. But this is a huge project in > itself and is never going to be part of the P2P patchset. fair enough. > >> Another assumption: There are other architectures like ARM64 where IOMMU >> is enabled by default even if you don't use VMs for security reasons. >> IOMMU blocks stray transactions. > > True, but it doesn't change my point: ACS is not a requirement for Linux > many many systems do not have it on at all or by default. I don't think so. It is not a requirement for you but it is a requirement for me (ARM64 guy). Linux happens to run on multiple architectures. One exception invalidates your point. > >> Didn't the ACS behavior change suddenly for no good reason when we enabled >> your code even though I might not be using the P2P but I happen to have >> a kernel with P2P config option? > If you are assuming that your kernel option should not be used by general distributions like Ubuntu/redhat etc. and requires a kernel compilation, creating a dependency to EXPERT is the right way to do. Distributions assume that no damage is done by enabling PCI bus options under normal circumstances. > Well no, presumably you made a conscious choice to turn the config > option on and build a custom kernel for your box. That doesn't seem very > sudden and the reason is that the two concepts are very much at odds > with each other: you can't have isolation and still have transactions > between devices. > > Logan > > -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.