On Tue, Apr 12, 2022 at 07:06:40PM -0700, Dan Williams wrote:
> On Tue, Apr 12, 2022 at 5:04 PM Dave Chinner wrote:
> > On Mon, Apr 11, 2022 at 12:09:03AM +0800, Shiyang Ruan wrote:
> > > Introduce xfs_notify_failure.c to handle failure related works, such as
> > > implement ->notify_failure(), re
While device_set_lock_class() allows device_lock() to take a nested lock
per the requirements of a given subsystem, it does not allow multiple
subsystems to enable lockdep validation at the same time. For example if
CXL does:
device_set_lock_class(&cxlmd->dev, 1);
...and LIBNVDIMM does:
device_s
Register libnvdimm subsystem devices with a non-zero lock_class to
enable the device-core to track lock dependencies.
Cc: Vishal Verma
Cc: Dave Jiang
Cc: Ira Weiny
Reviewed-by: Dave Jiang
Reviewed-by: Kevin Tian
Signed-off-by: Dan Williams
---
drivers/nvdimm/bus.c |3 +++
drivers/nv
In preparation for moving to the device-core device_lock lockdep
validation, refactor an nvdimm_lock_class() helper to be used with
device_set_lock_class().
Cc: Vishal Verma
Cc: Dave Jiang
Cc: Ira Weiny
Reviewed-by: Dave Jiang
Reviewed-by: Kevin Tian
Signed-off-by: Dan Williams
---
drivers/
In preparation for switching to the core device_lock lockdep validation
scheme, convert nd_device_lock() calls back to device_lock().
Note that this temporarily reverts the code back to the typical no
validation of device_lock() until a follow-on patch to set
dev->lock_class.
Cc: Vishal Verma
Cc
In preparation for the libnvdimm subsystem switching to device-core
common lockdep validation. Delete nfit_device_lock() which will need to
be replaced with an implementation that specifies a non-zero lock class.
Note this reverts back to the default state of unvalidated
device_lock(), until a loc
In preparation for upleveling device_lock() lockdep annotation support into
the core, provide a helper to retrieve the lock class. This lock_class
will be used with device_set_lock_class() to identify the CXL nested
locking rules.
Cc: Alison Schofield
Cc: Vishal Verma
Cc: Ira Weiny
Cc: Ben Wida
Update CONFIG_PROVE_CXL_LOCKING to use the common device-core helpers
for device_lock validation.
When CONFIG_PROVE_LOCKING is enabled, and device_set_lock_class() is
passed a non-zero lock class , the core acquires the 'struct device'
@lockdep_mutex everywhere it acquires the device_lock. Where
l
Now that the device-core can start validating lockdep usage after the
device has been added, use that capability to validate usage of
device_lock() against the ACPI0017 device relative to other subsystem
locks.
The 'enum cxl_lock_class' definition moves outside of the ifdef guard to
support device
MAX_LOCKDEP_SUBCLASSES limits the depth of the CXL topology that can be
validated by lockdep. Given that the cxl_test topology is already at
this limit collapse some of the levels and clamp the max depth.
Cc: Alison Schofield
Cc: Vishal Verma
Cc: Ira Weiny
Cc: Ben Widawsky
Reviewed-by: Dave Ji
In preparation for new infrastructure to support lockdep validation of
device_lock() usage across driver subsystems, add a
device_lockdep_init() helper to contain those updates.
Suggested-by: Pierre-Louis Bossart
Reviewed-by: Dave Jiang
Reviewed-by: Kevin Tian
Signed-off-by: Dan Williams
---
In preparation for moving lockdep_mutex nested lock acquisition into the
core, remove the cxl_device_lock() wrapper, but preserve
cxl_lock_class() that will be used to inform the core of the subsystem's
lock ordering rules.
Note that this reverts back to the default state of unvalidated
device_loc
The device_lock() is hidden from lockdep by default because, for
example, a device subsystem may do something like:
---
device_add(dev1);
...in driver core...
device_lock(dev1);
bus->probe(dev1); /* where bus->probe() calls driver1_probe() */
driver1_probe(struct device *dev)
{
...do some
Changes since v1 [1]:
- Improve the clarity of the cover letter and changelogs of the
major patches (Patch2 and Patch12) (Pierre, Kevin, and Dave)
- Fix device_lock_interruptible() false negative deadlock detection
(Kevin)
- Fix off-by-one error in the device_set_lock_class() enable case (Kevin
On Tue, Apr 12, 2022 at 5:04 PM Dave Chinner wrote:
>
> On Mon, Apr 11, 2022 at 12:09:03AM +0800, Shiyang Ruan wrote:
> > Introduce xfs_notify_failure.c to handle failure related works, such as
> > implement ->notify_failure(), register/unregister dax holder in xfs, and
> > so on.
> >
> > If the r
On Mon, Apr 11, 2022 at 12:09:03AM +0800, Shiyang Ruan wrote:
> Introduce xfs_notify_failure.c to handle failure related works, such as
> implement ->notify_failure(), register/unregister dax holder in xfs, and
> so on.
>
> If the rmap feature of XFS enabled, we can query it to find files and
> me
On Sun, Apr 10, 2022 at 9:09 AM Shiyang Ruan wrote:
>
> To easily track filesystem from a pmem device, we introduce a holder for
> dax_device structure, and also its operation. This holder is used to
> remember who is using this dax_device:
> - When it is the backend of a filesystem, the holder
17 matches
Mail list logo