Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp202697imm; Fri, 21 Sep 2018 12:49:04 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaCGMSVLEKicDp+ryc/8g6gNw24ErRlesGY+rpj3tsrcC7dox1HE/WTpMiYqDGVRoMxQSsN X-Received: by 2002:a62:d085:: with SMTP id p127-v6mr47783166pfg.119.1537559344299; Fri, 21 Sep 2018 12:49:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537559344; cv=none; d=google.com; s=arc-20160816; b=Wf5JXIQlvdkeFqTrBTKJkZYJN14Ag+OrzB3EGcbqbJqdWObfWcoqaP9iMfO9LQI2bW vNNk8kqnxJSfH1gEwkUhDW77xusjg32PrQioAHOfLN7rEF2uxZLqgRMKUu2ZzGmyF7Fs TPRFEZewcvKC+jBTOldOnDPamelNJCwk5nFppDP41brZIu/w67D8UnphMdxlh/WI+Rg1 RuYtVzPG/G1BYnWJ0oy1wYPDebBH4OTvLXO2YRZO6Rmr8RfHuKUO129S6GnVAdSBtPca hcTZTOec6Vun/48PWV9TQzjvJQiVDyf1YtpJF92tyISvpPApX0Rfms8Pk2T/KQIHrTKI H3yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=D4+WX1uJPtawS5EN5I9rdFxzLf92ROZrAIazn4924Tg=; b=DETEhbKsXKkLxiXzKtHJQUEwMb8RfCzHltGlPblNb+NrZjTZBK6japBfXfmfwTK7sZ J/1gjh7ESg3BsYQDwiwQWzvVUhGlfnmRoHI2eQH53cINMZO8qeUMB177wPxkqA7G392Z Itl47+kt2Iv4gkQg8wPrlnCtXfW+nVs45uIp3AbP5DJ4Nr6g2o9br7lbQWzsxC7R3fY8 CrSfd+mRdF+1nJvaIERZiGu82fu2BnuLegWJ74Ffw8acvqq5tw1HZekus1CCPk8+kteU cIbtjqq3Z/I56VF13G8fhcdUpxModdqJOQyvc+16pYkgdm0WqrhwIDkR3A3aNYgHt0+K CJ3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xHBi263M; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u129-v6si29482676pfb.247.2018.09.21.12.48.48; Fri, 21 Sep 2018 12:49:04 -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=@kernel.org header.s=default header.b=xHBi263M; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391394AbeIVBhZ (ORCPT + 99 others); Fri, 21 Sep 2018 21:37:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:33658 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391160AbeIVBhZ (ORCPT ); Fri, 21 Sep 2018 21:37:25 -0400 Received: from localhost (unknown [69.71.4.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D39552154F; Fri, 21 Sep 2018 19:47:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1537559223; bh=bwwdKytrqE/ZeMFNEmzuY/p2evCoUPSzt2gxc6XlLNc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=xHBi263Me/pRUHvZiVU1oj0v/INeUveaW/+rdr2V73NuTxJqQ3X2L2k3f7rDDfQoI U6RjoonWmPuH+K4/s0+qJoxz4SSTONiCpUe8B+6WNl6Ydwn9BSdIOKsr0NdIrIN75J +SF84vNwUXniGCrCO52Khf4TB0m97hMHgrRaKx44= Date: Fri, 21 Sep 2018 14:47:00 -0500 From: Bjorn Helgaas To: Logan Gunthorpe Cc: 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, Stephen Bates , Christoph Hellwig , Keith Busch , Sagi Grimberg , Bjorn Helgaas , Jason Gunthorpe , Max Gurtovoy , Dan Williams , =?iso-8859-1?B?Suly9G1l?= Glisse , Benjamin Herrenschmidt , Alex Williamson , Christian =?iso-8859-1?Q?K=F6nig?= , Jens Axboe , Jonathan Corbet Subject: Re: [PATCH v6 06/13] PCI/P2PDMA: Add P2P DMA driver writer's documentation Message-ID: <20180921194700.GM224714@bhelgaas-glaptop.roam.corp.google.com> References: <20180913001156.4115-1-logang@deltatee.com> <20180913001156.4115-7-logang@deltatee.com> <20180921164126.GI224714@bhelgaas-glaptop.roam.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 21, 2018 at 12:03:12PM -0600, Logan Gunthorpe wrote: > On 2018-09-21 10:41 AM, Bjorn Helgaas wrote: > >> +away, the one returned will be chosen at random. This function returns the PCI > > > > s/the one returned will be chosen at random/one will be chosen > > arbitrarily/ ? (I doubt it's really random) > > You're the second person to ask this, but yes, we really do it randomly. > Such that if there are multiple drivers getting resources they should be > evenly distributed. It's not the ideal solution but if it were to do it > arbitrarily then the code would likely return the same device all the > time and any additional devices would not get used. Ah, I see, I should have searched for "random" in that patch and answered my own question :) Sorry for the noise. Bjorn