Re: [PATCH v4 1/2] PCI: Take other bus devices into account when distributing resources

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09.01.2023 06:11, Mika Westerberg wrote:
On Thu, Jan 05, 2023 at 11:04:13AM -0600, Bjorn Helgaas wrote:
On Thu, Jan 05, 2023 at 03:43:29PM +0200, Mika Westerberg wrote:
On Thu, Jan 05, 2023 at 11:12:11AM +0200, Mika Westerberg wrote:
What happens in a topology like this:

   10:00.0 non-hotplug bridge to [bus 20-3f]
   10:01.0 non-hotplug bridge to [bus 40]
   20:00.0 hotplug bridge
   40:00.0 NIC

where we're distributing space on "bus" 10, hotplug_bridges == 0 and
normal_bridges == 2?  Do we give half the extra space to bus 20 and
the other half to bus 40, even though we could tell up front that bus
20 is the only place that can actually use any extra space?

Yes we split it into half.

Forgot to reply also that would it make sense here to look at below the
non-hotplug bridges and if we find hotplug bridges, distribute the space
equally between those or something like that?

Yes, I do think ultimately it would make sense to keep track at every
bridge whether it or any descendant is a hotplug bridge so we could
distribute extra space only to bridges that could potentially use it.

But I don't know if that needs to be done in this series.  This code
is so complicated and fragile that I think being ruthless about
defining the minimal problem we're solving and avoiding scope creep
will improve our chances of success.

So treat this as a question to improve my understanding more than
anything.

Okay, undestood ;-)

I was also wondering about this problem. But my first though was: if we are not going to look down through all the tree, may be we should better distribute resources between all bridges no this bus, no matter whether they are hot-plug or not? Because behind any non-hotplug bridge may appear a hot-plug one. As a possible trivial approach, give hot-plug bridges twice of what is given to non-hot-plug ones. ;)

PS: Thank you, Mika, for working on this.

--
Alexander Motin



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux