public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: Keith Busch <kbusch@meta.com>
Cc: linux-pci@vger.kernel.org, bhelgaas@google.com,
	"Keith Busch" <kbusch@kernel.org>,
	"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: Re: [PATCHv3 4/5] pci: walk bus recursively
Date: Mon, 11 Nov 2024 09:21:10 +0100	[thread overview]
Message-ID: <ZzG-dly2nGtTgNoC@wunner.de> (raw)
In-Reply-To: <20241022224851.340648-5-kbusch@meta.com>

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

  reply	other threads:[~2024-11-11  8:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22 22:48 [PATCHv3 0/5] pci cleanup/prep patches Keith Busch
2024-10-22 22:48 ` [PATCHv3 1/5] pci: make pci_stop_dev concurrent safe Keith Busch
2024-11-07 14:06   ` Lukas Wunner
2024-11-07 15:56     ` Keith Busch
2024-11-11  7:20       ` Lukas Wunner
2024-10-22 22:48 ` [PATCHv3 2/5] pci: make pci_destroy_dev " Keith Busch
2024-10-22 22:48 ` [PATCHv3 3/5] pci: move the walk bus lock to where its needed Keith Busch
2024-10-22 22:48 ` [PATCHv3 4/5] pci: walk bus recursively Keith Busch
2024-11-11  8:21   ` Lukas Wunner [this message]
2024-10-22 22:48 ` [PATCHv3 5/5] pci: unexport pci_walk_bus_locked Keith Busch
2024-10-23 21:43   ` Bjorn Helgaas
2024-10-23 22:00     ` Keith Busch
2024-10-23 22:07       ` Bjorn Helgaas
2024-10-23 22:20 ` [PATCHv3 0/5] pci cleanup/prep patches Bjorn Helgaas

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=ZzG-dly2nGtTgNoC@wunner.de \
    --to=lukas@wunner.de \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=bhelgaas@google.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=kbusch@kernel.org \
    --cc=kbusch@meta.com \
    --cc=linux-pci@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox