Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix fs_reclaim deadlock caused by CCS save/restore
@ 2026-01-29 12:51 Satyanarayana K V P
  2026-01-29 12:51 ` [PATCH 1/2] drm/xe/vf: Fix fs_reclaim warning with CCS save/restore BB allocation Satyanarayana K V P
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Satyanarayana K V P @ 2026-01-29 12:51 UTC (permalink / raw)
  To: intel-xe; +Cc: Satyanarayana K V P

CCS save/restore batch buffers are currently attached during BO allocation
and detached during BO teardown. The shrinker also triggers xe_bo_move(),
which is used for both allocation and deletion paths.

When BO allocation and shrinking occur concurrently, a circular locking
dependency involving fs_reclaim and swap_guard can occur, leading to a
deadlock such as:

======================================================
WARNING: possible circular locking dependency detected
------------------------------------------------------
CPU0                    CPU1
----                    ----
lock(fs_reclaim);
                        lock(&sa_manager->swap_guard);
                        lock(fs_reclaim);
lock(&sa_manager->swap_guard);
***  DEADLOCK   ***
=====================================================

To avoid this, allocate CCS save/restore BB BOs using GFP_ATOMIC,
preventing reclaim from being invoked in this context.

Satyanarayana K V P (2):
  drm/xe/vf: Fix fs_reclaim warning with CCS save/restore BB allocation
  drm/xe/sa: Add lockdep annotations for SA manager swap_guard

 drivers/gpu/drm/xe/xe_bb.c | 4 ++--
 drivers/gpu/drm/xe/xe_sa.c | 6 ++++++
 2 files changed, 8 insertions(+), 2 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-01-31  1:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-29 12:51 [PATCH 0/2] Fix fs_reclaim deadlock caused by CCS save/restore Satyanarayana K V P
2026-01-29 12:51 ` [PATCH 1/2] drm/xe/vf: Fix fs_reclaim warning with CCS save/restore BB allocation Satyanarayana K V P
2026-01-29 15:39   ` Thomas Hellström
2026-01-29 18:03     ` Matthew Brost
2026-01-29 18:30       ` Thomas Hellström
2026-01-29 19:35         ` Matthew Brost
2026-01-31  1:28           ` Matthew Brost
2026-01-29 12:51 ` [PATCH 2/2] drm/xe/sa: Add lockdep annotations for SA manager swap_guard Satyanarayana K V P
2026-01-29 13:32 ` ✓ CI.KUnit: success for Fix fs_reclaim deadlock caused by CCS save/restore Patchwork
2026-01-29 14:13 ` ✓ Xe.CI.BAT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox