Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] Use user-defined workqueue lockdep map for drm sched
@ 2024-10-02 13:16 Matthew Brost
  2024-10-02 13:16 ` [PATCH v4 1/2] drm/sched: Use drm sched lockdep map for submit_wq Matthew Brost
                   ` (9 more replies)
  0 siblings, 10 replies; 18+ messages in thread
From: Matthew Brost @ 2024-10-02 13:16 UTC (permalink / raw)
  To: intel-xe, dri-devel; +Cc: dakr, pstanner, ltuikov89

By default, each DRM scheduler instance creates an ordered workqueue for
submission, and each workqueue creation allocates a new lockdep map.
This becomes problematic when a DRM scheduler is created for every user
queue (e.g., in DRM drivers with firmware schedulers like Xe) due to the
limited number of available lockdep maps. With numerous user queues
being created and destroyed, lockdep may run out of maps, leading to
lockdep being disabled. Xe mitigated this by creating a pool of
workqueues for DRM scheduler use. However, this approach also encounters
issues if the driver is unloaded and reloaded multiple times or if many
VFs are probed.

To address this, we propose creating a single lockdep map for all DRM
scheduler workqueues, which will also resolve issues for other DRM
drivers that create a DRM scheduler per user queue.

This solution has been tested by unloading and reloading the Xe driver.
Before this series, around 30 driver reloads would result in lockdep
being turned off. After implementing the series, the driver can be
unloaded and reloaded hundreds of times without issues.

v2:
 - Split workqueue changes into multiple patches
 - Add alloc_workqueue_lockdep_map (Tejun)
 - Drop RFC
v3:
 - Drop __WQ_USER_OWNED_LOCKDEP (Tejun)
 - static inline alloc_ordered_workqueue_lockdep_map (Tejun)
v4:
 - Rebase on 6.12 which has required work queue patches

Matt

Matthew Brost (2):
  drm/sched: Use drm sched lockdep map for submit_wq
  drm/xe: Drop GuC submit_wq pool

 drivers/gpu/drm/scheduler/sched_main.c | 11 +++++
 drivers/gpu/drm/xe/xe_guc_submit.c     | 60 +-------------------------
 drivers/gpu/drm/xe/xe_guc_types.h      |  7 ---
 3 files changed, 12 insertions(+), 66 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2024-10-03  3:30 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-02 13:16 [PATCH v4 0/2] Use user-defined workqueue lockdep map for drm sched Matthew Brost
2024-10-02 13:16 ` [PATCH v4 1/2] drm/sched: Use drm sched lockdep map for submit_wq Matthew Brost
2024-10-02 14:14   ` Nirmoy Das
2024-10-02 14:16   ` Danilo Krummrich
2024-10-02 15:00     ` Matthew Brost
2024-10-02 15:13       ` Danilo Krummrich
2024-10-03  3:29   ` Ghimiray, Himal Prasad
2024-10-02 13:16 ` [PATCH v4 2/2] drm/xe: Drop GuC submit_wq pool Matthew Brost
2024-10-02 14:15   ` Nirmoy Das
2024-10-03  3:30   ` Ghimiray, Himal Prasad
2024-10-02 14:30 ` ✓ CI.Patch_applied: success for Use user-defined workqueue lockdep map for drm sched Patchwork
2024-10-02 14:31 ` ✓ CI.checkpatch: " Patchwork
2024-10-02 14:33 ` ✓ CI.KUnit: " Patchwork
2024-10-02 14:51 ` ✓ CI.Build: " Patchwork
2024-10-02 14:53 ` ✓ CI.Hooks: " Patchwork
2024-10-02 14:54 ` ✓ CI.checksparse: " Patchwork
2024-10-02 15:29 ` ✓ CI.BAT: " Patchwork
2024-10-02 18:44 ` ✗ CI.FULL: failure " Patchwork

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