]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/xe: Store process name and pid in xe file
authorMatthew Brost <matthew.brost@intel.com>
Tue, 23 Jul 2024 15:10:45 +0000 (08:10 -0700)
committerMatthew Brost <matthew.brost@intel.com>
Tue, 23 Jul 2024 17:45:40 +0000 (10:45 -0700)
commit8af13c3fc1259c1b8cfc4459d3701fcf41ad74df
treec18276b6997bb1e6600b5e8d71d6f001987175f9
parentc8a31ff6199f12ca65d73f1235117c1d9e6365a9
drm/xe: Store process name and pid in xe file

An xe file can outlive the associated process as the GPU cleanup is just
triggered upon file close (process kill) and completes sometime later.
If the file close triggers error conditions (GPU hangs) the process
cannot be safely referenced to retrieve the name and pid for debug
information. Store the process name and pid directly in the xe file to
be safe.

v2:
 - Access file->pid via rcu_access_pointer (Matthew Auld)

Fixes: b10d0c5e9df7 ("drm/xe: Add process name to devcoredump")
Fixes: f6ca930d974e ("drm/xe: Add process name and PID to job timedout message")
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240723151045.1725417-1-matthew.brost@intel.com
drivers/gpu/drm/xe/xe_devcoredump.c
drivers/gpu/drm/xe/xe_device.c
drivers/gpu/drm/xe/xe_device_types.h
drivers/gpu/drm/xe/xe_guc_submit.c