From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Nicholas Johnson <nicholas.johnson-opensource@outlook.com.au>,
Logan Gunthorpe <logang@deltatee.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH 2/2] PCI: Skip resource distribution when no hotplug bridges
Date: Mon, 24 Jun 2019 14:24:49 +0300 [thread overview]
Message-ID: <20190624112449.GJ2640@lahna.fi.intel.com> (raw)
In-Reply-To: <20190622210310.180905-3-helgaas@kernel.org>
On Sat, Jun 22, 2019 at 04:03:11PM -0500, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <bhelgaas@google.com>
>
> If "hotplug_bridges == 0", "!dev->is_hotplug_bridge" is always true, so the
> loop that divides the remaining resources among hotplug-capable bridges
> does nothing.
>
> Check for "hotplug_bridges == 0" earlier, so we don't even have to compute
> the amount of remaining resources. No functional change intended.
>
> ---
>
> I'm pretty sure this patch preserves the previous behavior of
> pci_bus_distribute_available_resources(), but I'm not sure that
> behavior is what we want.
>
> For example, in the following topology, when we process bus 10, we
> find two non-hotplug bridges and no hotplug bridges, so IIUC we return
> without distributing any resources to them. But I would think we
> should try to give 10:1c.0 more space if possible because it has a
> hotplug bridge below it.
>
> 00:1c.0: hotplug bridge to [bus 10-2f]
> 10:1c.0: non-hotplug bridge to [bus 11-2e]
> 11:00.0: hotplug bridge to [bus 12-2e]
> 10:1c.1: non-hotplug bridge to [bus 2f]
Yes, I agree in this case we want to preserve more space for 10:1c.0.
For this patch,
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
next prev parent reply other threads:[~2019-06-24 11:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-22 21:03 [PATCH 0/2] PCI: Simplify pci_bus_distribute_available_resources() Bjorn Helgaas
2019-06-22 21:03 ` [PATCH 1/2] " Bjorn Helgaas
2019-06-24 11:09 ` Mika Westerberg
2019-06-24 16:21 ` Logan Gunthorpe
2019-06-22 21:03 ` [PATCH 2/2] PCI: Skip resource distribution when no hotplug bridges Bjorn Helgaas
2019-06-24 11:24 ` Mika Westerberg [this message]
2019-06-24 23:45 ` Benjamin Herrenschmidt
2019-06-25 10:05 ` Mika Westerberg
2019-06-25 11:48 ` Benjamin Herrenschmidt
2019-06-25 12:04 ` Mika Westerberg
2019-06-25 12:23 ` Benjamin Herrenschmidt
2019-06-25 12:43 ` Mika Westerberg
2019-06-25 23:22 ` Benjamin Herrenschmidt
2019-06-26 17:35 ` Bjorn Helgaas
2019-06-26 22:35 ` Benjamin Herrenschmidt
2019-06-24 16:26 ` Logan Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190624112449.GJ2640@lahna.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=benh@kernel.crashing.org \
--cc=bhelgaas@google.com \
--cc=helgaas@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=logang@deltatee.com \
--cc=nicholas.johnson-opensource@outlook.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.