Received: by 10.213.65.68 with SMTP id h4csp655157imn; Tue, 13 Mar 2018 16:48:45 -0700 (PDT) X-Google-Smtp-Source: AG47ELtj3bJ9jX/8HPvCN4gysEYaQFtXcJi2uxtV6wtKq7seGJGqvJnACJ6Z5pNqxSXacm7WgbnI X-Received: by 10.98.253.17 with SMTP id p17mr2261679pfh.105.1520984925614; Tue, 13 Mar 2018 16:48:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520984925; cv=none; d=google.com; s=arc-20160816; b=JPaCFfWvw+s5NvZYxUBORUdTR/DvRWm4UGwol2YhMvgt0k9z7CpycVRbhrLZKwzYBd /sQbJu96cxXzeKRReVj4j6Hbr3mNHTgJnXxTULjLdqSDnqtgGuSPJxwqRi6zKl5knee9 /Q9O/eQ3GyeLYEUxhNdgPIkK/ZJ+XAt4+7kiAraheJ7Ea2JgRrA5nI/TS4eroL/SpHtr Xyd+5oPkwsiQB1NkOwqDyMN87aiz4PvgyvPmjT8Y8K1QZnanpcDWBbTfwV3v7tQw4Z6b 50Hh3MPA+Y15KtR0AIPYptC2unkJgcGFaNbcQQR1ieQ9/BIr3zRwj9Q+7jhGNxI4oaus dwAA== 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=X0nCMJcKcWdCBTCQs7QiOaYutLnfMqlXFFRJLO3c4OQ=; b=kPa1ybXSvijxJlVtNtYkDsygz5SeS01MvIK8MQW9maJvWuEYDvSaZAu8gjNZIHLuKh m7N9SDbgermeBnDRWaMAXtiWuqlbOz3GwyvSJy/PLSp/JAgbR/LLT7pxeuKfJHmgJwrH G+XV49Wr39GtBkwvHMqCkOlcFDGq+aWvRIXrp1TGRMC1MeTjtgDR++/CAC6D9AYoX1VC jGyUwmXaIo3odGXWU3RX4KxBDUTqGtlzx6RisjTJ2o4f/4Z4gBTpmVbrS+2i0RAss76s GIILmrkhZEBKQNRv7HaJtQWih0R3rgw67+qb9zt4BV4OLzRW8TAPrLhrD2bRjHA6UAA5 E9Xw== 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 l63-v6si937312plb.7.2018.03.13.16.48.30; Tue, 13 Mar 2018 16:48:45 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932928AbeCMXqO (ORCPT + 99 others); Tue, 13 Mar 2018 19:46:14 -0400 Received: from ale.deltatee.com ([207.54.116.67]:36406 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932349AbeCMXqM (ORCPT ); Tue, 13 Mar 2018 19:46:12 -0400 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.89) (envelope-from ) id 1evtcG-0000WO-3A; Tue, 13 Mar 2018 17:46:00 -0600 To: Sinan Kaya , 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> <156c24fb-6e27-28f6-0b36-7fd83311ce37@codeaurora.org> From: Logan Gunthorpe Message-ID: <932bbf48-9d86-97ec-17bb-052099aff99e@deltatee.com> Date: Tue, 13 Mar 2018 17:45:58 -0600 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: <156c24fb-6e27-28f6-0b36-7fd83311ce37@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: alex.williamson@redhat.com, benh@kernel.crashing.org, 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, okaya@codeaurora.org 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 v3 01/11] PCI/P2PDMA: Support peer-to-peer 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 13/03/18 05:19 PM, Sinan Kaya wrote: > It is still a switch it can move packets but, maybe it can move data at > 100kbps speed. As Stephen pointed out, it's a requirement of the PCIe spec that a switch supports P2P. If you want to sell a switch that does P2P with bad performance then that's on you to deal with. > What prevents that switch from trying P2P and having a bad user experience? The fact that no one would buy such a switch as it would have a bad user experience with regular PCI transfers. A P2P TLP is not special on a switch as it's routed in just the same way as any others. There'd also be no cost gain in making such a broken-by-design device. > If everything is so broken, I was suggesting to at least list the switches > you have tested. > > What's the problem with this? More complexity for zero gain. > Why do you want to assume that all switches are good and all root ports are > bad? Because the assumption that all switches are good is more than reasonable and simplifies the code and maintenance significantly. No one wants to maintain a white list when they don't have to. > What if the design is so canned that you can't change anything? Based on the feedback we've got so far and the developers that have participated in getting it to where it is, it is not "canned". > 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. P2P and isolation will never be compatible at any point. They are two opposite concepts. So we could just disable isolation across the whole system and for our purposes that would be fine. But it's relatively simple to limit this and only disable it behind switches. So why wouldn't we? It enables use cases like having an isolated card on the root complex used in a VM while having P2P on cards behind switches. I personally have no interest in doing this but I also have no reason to prevent it with my code. > 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. It is not a requirement of an architecture or people that use a specific architecture. It is a requirement of the use-case and you have not said any use case or how we could do better. If you're running VMs that require isolation you will need to be *very* careful if you also want to do P2P between cards which requires no isolation. But, based on my understanding, most people will want to do one or the other -- not both. If you want to do P2P you enable the P2P config option, if you want isolation you don't. > 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. I don't have a problem adding EXPERT as a dependency. We can do that for v4. I'd rather hope that distros actually read and understand the kconfig help text before enabling an off-by-default option. But maybe I'm asking too much. Logan