diff options
| author | Alison Schofield <[email protected]> | 2025-05-29 20:51:13 +0000 |
|---|---|---|
| committer | Dave Jiang <[email protected]> | 2025-06-30 23:36:06 +0000 |
| commit | 38b502e0a65215ddefaf84b672ec3908af97bacf (patch) | |
| tree | 807fbf621fce3abf703ca5a290eeb65ab8b7e4c0 /tools/testing/selftests/net/lib/py/utils.py | |
| parent | Documentation/driver-api/cxl: Introduce conventions.rst (diff) | |
| download | kernel-38b502e0a65215ddefaf84b672ec3908af97bacf.tar.gz kernel-38b502e0a65215ddefaf84b672ec3908af97bacf.zip | |
cxl/pci: Replace mutex_lock_io() w mutex_lock() for mailbox access
mutex_lock_io() differs from mutex_lock() in that it may call
io_schedule() when a task must sleep waiting for the lock. This
distinction only makes sense in block I/O or memory reclaim paths,
where giving I/O a chance to make progress is useful.
At this call site, cxl_pci_mbox_send(), the mutex protects an MMIO
mailbox. The task holding the lock is not blocking I/O progress, so
calling io_schedule(), as mutex_lock_io() may do, has no practical
effect.
Although there is no functional change, using the correct locking
primitive, that more accurately reflects the semantics and intended
use of the lock, improves code clarity and avoids misleading readers
and tools.
[ dj: Dropped fixes tag, no need to backport ]
Reported-by: Alok Tiwari <[email protected]>
Closes: https://lore.kernel.org/linux-cxl/[email protected]/
Suggested-by: Dan Williams <[email protected]>
Signed-off-by: Alison Schofield <[email protected]>
Reviewed-by: Davidlohr Bueso <[email protected]>
Reviewed-by: Dan Williams <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Dave Jiang <[email protected]>
Diffstat (limited to 'tools/testing/selftests/net/lib/py/utils.py')
0 files changed, 0 insertions, 0 deletions
