Skip to content

xe: watch queue event support and VM restart recovery

Thomas Hellström igt-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4lib/xe: add xe_vm_restart ioctl helperinclude/drm-uapi/xe_drm.h lib/xe/xe_ioctl.c lib/xe/xe_ioctl.h+86 -01 reply
2/4lib/xe: add xe_watch listener for watch queue eventsinclude/drm-uapi/xe_drm.h include/drm-uapi/xe_drm_events.h lib/meson.build +2 more+419 -00 replies
3/4tests/intel/xe_exec_compute_mode: Add a listener for file eventstests/intel/xe_exec_compute_mode.c+61 -20 replies
4/4tests/intel/xe_exec_compute_mode: Restart VM on ENOMEM/ENOSPC errorsinclude/drm-uapi/xe_drm.h tests/intel/xe_exec_compute_mode.c+33 -100 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH i-g-t 0/4] xe: watch queue event support and VM restart recovery

This series adds IGT support for two new Xe kernel interfaces: the watch queue event notification mechanism and the VM restart IOCTL.

The watch queue allows a userspace process to subscribe to device-scoped events delivered through a pipe — notably VM errors caused by memory pressure. The VM restart IOCTL lets userspace synchronously trigger a re-run of the preempt-rebind worker to recover a VM after such an error.

Together they enable a fault-tolerance loop: a listener thread receives VM error events carrying an error code and VM id; when the error is -ENOMEM or -ENOSPC the test can immediately attempt to restart the affected VM rather than letting it stay faulted.

The xe_exec_compute_mode test is extended to demonstrate this: it subscribes to file events at fixture time, logs all notifications, and automatically calls VM restart on memory-pressure errors.

Thomas Hellström (4):
lib/xe: add xe_vm_restart ioctl helper
lib/xe: add xe_watch listener for watch queue events tests/intel/xe_exec_compute_mode: Add a listener for file events tests/intel/xe_exec_compute_mode: Restart VM on ENOMEM/ENOSPC errors

 include/drm-uapi/xe_drm.h          |  84 +++++++++++
 include/drm-uapi/xe_drm_events.h   |  71 +++++++++
 lib/meson.build                    |   1 +
 lib/xe/xe_ioctl.c                  |  44 ++++++
 lib/xe/xe_ioctl.h                  |   2 +
 lib/xe/xe_watch.c                  | 221 +++++++++++++++++++++++++++++
 lib/xe/xe_watch.h                  |  80 +++++++++++
 tests/intel/xe_exec_compute_mode.c |  92 +++++++++++-
 8 files changed, 591 insertions(+), 4 deletions(-)
 create mode 100644 include/drm-uapi/xe_drm_events.h
 create mode 100644 lib/xe/xe_watch.c
 create mode 100644 lib/xe/xe_watch.h
Signature · 1 line
2.54.0