[PATCH 0/1] drm/xe: serialize store_data and user_interrupt for ufence wait
fei.yang at intel.com
fei.yang at intel.com
Tue Aug 12 18:28:45 UTC 2025
From: Fei Yang <fei.yang at intel.com>
Quote BSpec, MI_STORE_DATA_IMM "simply initiates the write operation with
command execution proceeding normally. Although the write operation is
guaranteed to complete eventually, there is no mechanism to synchronize
command execution with the completion (or even initiation) of these
operations."
The KMD currently emit MI_STORE_DATA_IMM and MI_USER_INTERRUPT consecutively
to implement user fence. However, according to the BSpec, the data write
operation is not guaranteed to be completed when triggering the interrupt,
that would cause the xe_wait_user_fence_ioctl to wait until the full user
specified timeout is reached before checking the fence value again. Great
performance degradation has been observed in IGT xe_exec_fault_mode test
cases due to this unnecessary wait. The worst case is that if user set the
timeout to MAX_INT32, the wait could end up being a hang until some other
random program triggers a user interrupt to wake it up.
A semaphore wait is added right after the data write to avoid the unexpected
wait.
Signed-off-by: Fei Yang <fei.yang at intel.com>
Fei Yang (1):
drm/xe: serialize store_data and user_interrupt for ufence wait
drivers/gpu/drm/xe/instructions/xe_mi_commands.h | 11 +++++++++++
drivers/gpu/drm/xe/xe_ring_ops.c | 14 ++++++++++++++
2 files changed, 25 insertions(+)
--
2.43.0
More information about the Intel-xe
mailing list