From: Keith Busch <kbusch@kernel.org>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: Keith Busch <kbusch@meta.com>,
linux-pci@vger.kernel.org, bhelgaas@google.com,
Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCHv2 2/5] pci: make pci_destroy_dev concurrent safe
Date: Tue, 22 Oct 2024 14:29:19 -0600 [thread overview]
Message-ID: <ZxgLH5OqHNktgTkS@kbusch-mbp> (raw)
In-Reply-To: <20241003023354.txfw7w4ud247h5va@offworld>
On Wed, Oct 02, 2024 at 07:34:13PM -0700, Davidlohr Bueso wrote:
> On Tue, 27 Aug 2024, Keith Busch wrote:
>
> > +static inline bool pci_dev_test_and_set_removed(struct pci_dev *dev)
> > +{
> > + return test_and_set_bit(PCI_DEV_REMOVED, &dev->priv_flags);
> > +}
>
> Same ordering/dependency description observations as mentioned in
> patch 1 (both these cases are fully ordered).
Just rebasing everything so late reply here.
test_and_set_bit already has a memory barrier. It's the "set_bit" that
doesn't, but set_bit is not used for this new flag. This new flag only
indicates the device is being removed, so it's only set once before the
device is deleted. It's never accessed outside this path, and it's
safe compared to looking at the kobj parent.
next prev parent reply other threads:[~2024-10-22 20:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-27 19:28 [PATCHv2 0/5] pci cleanup/prep patches Keith Busch
2024-08-27 19:28 ` [PATCHv2 1/5] pci: make pci_stop_dev concurrent safe Keith Busch
2024-10-02 23:39 ` Davidlohr Bueso
2024-10-03 0:04 ` Keith Busch
2024-08-27 19:28 ` [PATCHv2 2/5] pci: make pci_destroy_dev " Keith Busch
2024-10-03 2:34 ` Davidlohr Bueso
2024-10-03 14:54 ` Keith Busch
2024-10-03 17:04 ` Davidlohr Bueso
2024-10-03 17:59 ` Keith Busch
2024-10-08 2:15 ` Davidlohr Bueso
2024-10-22 20:29 ` Keith Busch [this message]
2024-08-27 19:28 ` [PATCHv2 3/5] pci: move the walk bus lock to where its needed Keith Busch
2024-10-03 0:32 ` Davidlohr Bueso
2024-10-09 11:09 ` Ilpo Järvinen
2024-08-27 19:28 ` [PATCHv2 4/5] pci: walk bus recursively Keith Busch
2024-10-09 12:08 ` Ilpo Järvinen
2024-08-27 19:28 ` [PATCHv2 5/5] pci: unexport pci_walk_bus_locked Keith Busch
2024-10-03 0:35 ` Davidlohr Bueso
2024-10-09 12:20 ` Ilpo Järvinen
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=ZxgLH5OqHNktgTkS@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=bhelgaas@google.com \
--cc=dave@stgolabs.net \
--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