Received: by 10.213.65.68 with SMTP id h4csp633959imn; Wed, 28 Mar 2018 09:53:03 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/15P11FlyYu5cSO4MtsgJVwuyTYd8Cl7vLjt4JiOifd+OKNz1XRF4OPAKSEF2RCkJz3lnB X-Received: by 2002:a17:902:5716:: with SMTP id k22-v6mr4549904pli.229.1522255983825; Wed, 28 Mar 2018 09:53:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522255983; cv=none; d=google.com; s=arc-20160816; b=lcNJlhXsMitctbrXZkOppos3wMZIAbERbjo2oYnQAYKIq4oNPOiaekgb124KAEYwRK tl3xEa1UUxzSe1rVg521gJ5obsHDAnZ/0oatqHba2WfwkEcBz9iMp1VRv7jJEnnxvX9T nj/y4ryV5FTsXlbXPlolUGPb8q/d7s4qm6c1U/SeA81zeeHp6bkjnJl4iUwP5QllVg1r IwnkXHvRl2YykW6q3xmc18I8vdlt5xfm2XKjOe5GNBCdxYlT+4OF7GfJyO00HDsAMOjW +hjT+EyQyE4mxp+0MC4xvnh45iiMxLUuj1y7Aj5YzRO6oQhzW8h3l04P0aycSrHQPzQq BQFA== 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=GYF1UHLM2GwOeVUY1snI/7JsD2UgugE/qMs7tJwvsfI=; b=MXyunWneqJ5LEfoUzGE4CfqGbhuaOpqOTKARIu3KiO+L4lKCp0OcAaz+U9ouf6PO3Y Nc9EmvJzwE/wWO49mew1cWLEaGteRjsgEKQyanAc5hJjhwb9QH6Bpl7fQz511ai006j1 gwHGRKTVpGgxZXQNZWGeBxqf53D383Yly0cjrVdd5dm/iXbbWvI8jPyVPBg99sfRaNYk 8lqhpkL+mMNhLw0oS7tr7aMLEz5bRxVaevVzBQjFuoO4Pt1/wH9nlqLDvciIw39xHfEj n5p/y7i4p94NrvO8J9965wiNR13kgK8wPLs9O6so6Bmuxm7v6rvMABFwNyx/xMM85hRj jr4g== 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 d67si3040586pfb.232.2018.03.28.09.52.48; Wed, 28 Mar 2018 09:53:03 -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 S1753181AbeC1QZr (ORCPT + 99 others); Wed, 28 Mar 2018 12:25:47 -0400 Received: from ale.deltatee.com ([207.54.116.67]:39600 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752907AbeC1QZp (ORCPT ); Wed, 28 Mar 2018 12:25:45 -0400 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.89) (envelope-from ) id 1f1DtQ-000739-6H; Wed, 28 Mar 2018 10:25:44 -0600 To: =?UTF-8?Q?Christian_K=c3=b6nig?= , Christoph Hellwig Cc: linaro-mm-sig@lists.linaro.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20180325110000.2238-1-christian.koenig@amd.com> <20180325110000.2238-2-christian.koenig@amd.com> <20180328123830.GB25060@infradead.org> <613a6c91-7e72-5589-77e6-587ec973d553@gmail.com> <5498e9b5-8fe5-8999-a44e-f7dc483bc9ce@amd.com> From: Logan Gunthorpe Message-ID: <16c7bef8-5f03-9e89-1f50-b62fb139a36f@deltatee.com> Date: Wed, 28 Mar 2018 10:25:43 -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: <5498e9b5-8fe5-8999-a44e-f7dc483bc9ce@amd.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, hch@infradead.org, christian.koenig@amd.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 2/8] PCI: Add pci_find_common_upstream_dev() 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/03/18 10:02 AM, Christian König wrote: > Yeah, that looks very similar to what I picked up from the older > patches, going to read up on that after my vacation. Yeah, I was just reading through your patchset and there are a lot of similarities. Though, I'm not sure what you're trying to accomplish as I could not find a cover letter and it seems to only enable one driver. Is it meant to enable DMA transactions only between two AMD GPUs? I also don't see where you've taken into account the PCI bus address. On some architectures this is not the same as the CPU physical address. > Just in general why are you interested in the "distance" of the devices? We've taken a general approach where some drivers may provide p2p memory (ie. an NVMe card or an RDMA NIC) and other drivers make use of it (ie. the NVMe-of driver). The orchestrator driver needs to find the most applicable provider device for a transaction in a situation that may have multiple providers and multiple clients. So the most applicable provider is the one that's closest ("distance"-wise) to all the clients for the P2P transaction. > And BTW: At least for writes that Peer 2 Peer transactions between > different root complexes work is actually more common than the other way > around. Maybe on x86 with hardware made in the last few years. But on PowerPC, ARM64, and likely a lot more the chance of support is *much* less. Also, hardware that only supports P2P stores is hardly full support and is insufficient for our needs. > So I'm a bit torn between using a blacklist or a whitelist. A whitelist > is certainly more conservative approach, but that could get a bit long. I think a whitelist approach is correct. Given old hardware and other architectures, a black list is going to be too long and too difficult to comprehensively populate. Logan