diff options
| author | Satyanarayana K V P <satyanarayana.k.v.p@intel.com> | 2026-02-20 08:55:23 +0300 |
|---|---|---|
| committer | Matthew Brost <matthew.brost@intel.com> | 2026-02-20 21:54:05 +0300 |
| commit | dfeef98e55d0e5f622886d0a9980c235ff08fd97 (patch) | |
| tree | e76fd321fd8a1d0a80738ed1a93462afbcebb874 | |
| parent | bcd768d787e7bb4e06d77709fa17d5bafec8612e (diff) | |
| download | linux-dfeef98e55d0e5f622886d0a9980c235ff08fd97.tar.xz | |
drm/xe/sa: Add lockdep annotations for SA manager swap_guard
Annotate the SA manager init path to model taking swap_guard while under
reclaim context. This helps lockdep catch potential circular dependencies
between fs_reclaim and swap_guard in debug builds. Without this annotation,
lockdep is unaware of this chain until the shrinker runs.
Signed-off-by: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
Suggested-by: Matthew Brost <matthew.brost@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260220055519.2485681-8-satyanarayana.k.v.p@intel.com
| -rw-r--r-- | drivers/gpu/drm/xe/xe_sa.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_sa.c b/drivers/gpu/drm/xe/xe_sa.c index c7ee952e8914..f32045f40b7a 100644 --- a/drivers/gpu/drm/xe/xe_sa.c +++ b/drivers/gpu/drm/xe/xe_sa.c @@ -89,6 +89,12 @@ struct xe_sa_manager *__xe_sa_bo_manager_init(struct xe_tile *tile, u32 size, if (ret) return ERR_PTR(ret); + if (IS_ENABLED(CONFIG_PROVE_LOCKING)) { + fs_reclaim_acquire(GFP_KERNEL); + might_lock(&sa_manager->swap_guard); + fs_reclaim_release(GFP_KERNEL); + } + shadow = xe_managed_bo_create_pin_map(xe, tile, size, XE_BO_FLAG_VRAM_IF_DGFX(tile) | XE_BO_FLAG_GGTT | |
