diff options
author | Ira Weiny <[email protected]> | 2024-09-04 09:47:54 -0500 |
---|---|---|
committer | Dave Jiang <[email protected]> | 2024-09-09 11:33:44 -0700 |
commit | d9a476c837fab38856c6b6ff9f794c33907a9f81 (patch) | |
tree | 0c1adafafbab8bf41ee52dbc3549ce61e490f103 /tools/perf/scripts/python | |
parent | 3f9e07531778ce66e0100d93f482e9a299d10d8d (diff) |
cxl/region: Remove lock from memory notifier callback
In testing Dynamic Capacity Device (DCD) support, a lockdep splat
revealed an ABBA issue between the memory notifiers and the DCD extent
processing code.[0] Changing the lock ordering within DCD proved
difficult because regions must be stable while searching for the proper
region and then the device lock must be held to properly notify the DAX
region driver of memory changes.
Dan points out in the thread that notifiers should be able to trust that
it is safe to access static data. Region data is static once the device
is realized and until it's destruction. Thus it is better to manage the
notifiers within the region driver.
Remove the need for a lock by ensuring the notifiers are active only
during the region's lifetime.
Furthermore, remove cxl_region_nid() because resource can't be NULL
while the region is stable.
Link: https://lore.kernel.org/all/[email protected]/ [0]
Cc: Ying Huang <[email protected]>
Suggested-by: Dan Williams <[email protected]>
Reviewed-by: Davidlohr Bueso <[email protected]>
Reviewed-by: Jonathan Cameron <[email protected]>
Reviewed-by: Ying Huang <[email protected]>
Signed-off-by: Ira Weiny <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Dave Jiang <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions