Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp616747imm; Fri, 31 Aug 2018 08:47:28 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZLHrhsMqQNV+DE33uXQHJVspHiuMBh5XQY7ZcoqoEJ1SkJsRQjeypAEY10Yt7ydgssf/ed X-Received: by 2002:a17:902:d211:: with SMTP id t17-v6mr16180263ply.258.1535730448355; Fri, 31 Aug 2018 08:47:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535730448; cv=none; d=google.com; s=arc-20160816; b=qNzsqM3pscmRZsfnf9NwVDvh8rAfXw1K1woUrld4cK2JXYRxYpUo90HXMVDUlBAy/c 3w95zOZRL/7F6Fu6AXkx/sHIfUoYzsULnqf8t4rtxS/9Q0UbDMg+bmKbwuBfQhW8S63f BCn/pRko5tIauUqrQZHkcxgsl22Re47xRr5Y3p3Cg7dlOTb/JixTTMEpSxWrCZT2GBUi EiPwfosn2QE7jvLKL59PeWyOReQFQWKC2L5ayPU46W2P2tKq+aNcyLfl2Qs1iYnaCkeV N6HK8Chk/aN9e7YwyljFSqINZAYy7PbUSQ/qpXHU763HqstuM/gLmh7iNS8NPuwvIQtY dZbg== 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=lA5WuUpGPAtv0hKR3edBOERYm8Q1Dj/qXaus43lA7ls=; b=kdEsnkLXrvgG3AL2AxTBAmCgo9O8PXBkFsMoVSHlPqLzg9Gp6lLkmDrwVnXXtIhP9y h8qgKylxZ32d2KGqgdNswVfFyU514LMbiHUSgqXVpLXufqYERQI3i6tmej9+R8IZdnnC 9hsCkQ3pAPDn1v7n+UMXifh4mYo2R6Hnpo0SOt9l1sRwGMgm7gyItQHoKV5C+UofgesE Aa/pbuxUqEsRfKuRVofU+abRIYwV2afRVZja4Y+sxzmAxZm4XpgUJdog+AP1f7+oRA1w GYXYvR5KY9sIOPNXakgrsiBZMz9Z/BjUL0RhhREX4CuDNLXzWNL+PNt0hHfadcyRVG+C 3f3g== 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 71-v6si10879385pfa.305.2018.08.31.08.47.13; Fri, 31 Aug 2018 08:47:28 -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 S1729085AbeHaTxT (ORCPT + 99 others); Fri, 31 Aug 2018 15:53:19 -0400 Received: from ale.deltatee.com ([207.54.116.67]:46886 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727824AbeHaTxT (ORCPT ); Fri, 31 Aug 2018 15:53:19 -0400 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.89) (envelope-from ) id 1fvlbS-0004B1-Ke; Fri, 31 Aug 2018 09:44:55 -0600 To: Randy Dunlap , 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 , Keith Busch , Sagi Grimberg , Bjorn Helgaas , Jason Gunthorpe , Max Gurtovoy , Dan Williams , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Benjamin Herrenschmidt , Alex Williamson , =?UTF-8?Q?Christian_K=c3=b6nig?= , Jonathan Corbet References: <20180830185352.3369-1-logang@deltatee.com> <20180830185352.3369-7-logang@deltatee.com> <382af881-0ae1-0274-4628-0137071125b1@infradead.org> From: Logan Gunthorpe Message-ID: Date: Fri, 31 Aug 2018 09:44:53 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <382af881-0ae1-0274-4628-0137071125b1@infradead.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: corbet@lwn.net, christian.koenig@amd.com, 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, 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, rdunlap@infradead.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 autolearn=ham autolearn_force=no version=3.4.1 Subject: Re: [PATCH v5 06/13] PCI/P2PDMA: Add P2P DMA driver writer's documentation 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 Hey, Thanks for the review. I'll make the fixes for the next version. On 30/08/18 06:34 PM, Randy Dunlap wrote: >> +With the client list in hand, the orchestrator may then call> +:c:func:`pci_p2pmem_find()` to obtain a published P2P memory provider >> +that is supported (behind the same root port) as all the clients. If more >> +than one provider is supported, the one nearest to all the clients will >> +be chosen first. If there are more than one provider is an equal distance >> +away, the one returned will be chosen at random. This function returns the PCI > > random or just arbitrarily? Randomly. See pci_p2pmem_find() in patch 1. We use prandom_u32_max() to select any of the supported devices. Logan