Re: [PATCHv3 4/5] pci: walk bus recursively

Lukas Wunner
2024-11-11T08:21:12Z

On Tue, Oct 22, 2024 at 03:48:50PM -0700, Keith Busch wrote:
> The original implementation purposefully chose a non-recursive walk,
> presumably as a precaution on stack use. We do recursive bus walking in
> other places though. For example:
>
> pci_bus_resettable
> pci_stop_bus_device
> pci_remove_bus_device
> pci_bus_allocate_dev_resources
>
> So, recursive pci bus walking is well tested and safe, and the
> implementation is easier to follow. The motivation for changing it now
> is to make it easier to introduce finer grain locking in the future.

Hm, I find the loss of non-recursive bus walking regrettable.

If the solution proposed earlier today...

https://lore.kernel.org/all/ZzG5koPOn16KQ8uM@wunner.de/

... is workable and we find it doesn't need recursive bus walking,
perhaps we should consider reverting this change (which is now
e24eafdda271 on pci/locking).

Thanks,

Lukas