All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] Xe driver asynchronous notification mechanism
@ 2026-03-04 12:52 Thomas Hellström
  2026-03-04 12:52 ` [RFC PATCH 1/2] watch_queue: Add a DRM_XE_NOTIFY watch type and export init_watch() Thomas Hellström
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Thomas Hellström @ 2026-03-04 12:52 UTC (permalink / raw)
  To: intel-xe
  Cc: Thomas Hellström, Matthew Brost, Maarten Lankhorst,
	Michal Mrozek, John Falkowski, Rodrigo Vivi, Lahtinen Joonas,
	David Howells, Christian König, Dave Airlie, Simona Vetter,
	dri-devel

There is a need to inform user-space clients when a rebind worker
has ran out of memory so that it can react, adjust its working-set
and restart the job. This patch series aims to start a discussion
about the bet way to accomplish this.

The series builds on the core "general notification mechanism" or
"watch_queue", and attaches a watch queue to each xe drm file.

The watch_queue is extremely flexible and allows filtering out
events of interest at the kernel level. There can be multiple
listeners.

Another approach would be to use drm events, but then there
could only be one listener per open file and no filtering.
Otoh drm events would probably have the shortest delivery
latency.

Finally there is eventfd (man 2 eventfd) but doesn't appear to
allow carrying metadata.

Any feedback appreciated, also on method preference.

Patch 1 extende the watch_queue interface slightly,
Patch 2 implements delivery of a VM rebind worker error.

Note this is to be regarded as a POC at this time. No need for
a detailed review.

A user-space igt user is posted as an RFC here:

https://patchwork.freedesktop.org/series/162576/

Thomas Hellström (2):
  watch_queue: Add a DRM_XE_NOTIFY watch type and export init_watch()
  drm/xe: Add watch_queue-based device event notification

 drivers/gpu/drm/xe/Kconfig           |   1 +
 drivers/gpu/drm/xe/Makefile          |   1 +
 drivers/gpu/drm/xe/xe_device.c       |   7 ++
 drivers/gpu/drm/xe/xe_device_types.h |   6 ++
 drivers/gpu/drm/xe/xe_vm.c           |   7 +-
 drivers/gpu/drm/xe/xe_vm_types.h     |   2 +
 drivers/gpu/drm/xe/xe_watch_queue.c  | 107 +++++++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_watch_queue.h  |  20 +++++
 include/uapi/drm/xe_drm.h            |  46 ++++++++++++
 include/uapi/drm/xe_drm_events.h     |  56 ++++++++++++++
 include/uapi/linux/watch_queue.h     |   3 +-
 kernel/watch_queue.c                 |  13 +++-
 12 files changed, 263 insertions(+), 6 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/xe_watch_queue.c
 create mode 100644 drivers/gpu/drm/xe/xe_watch_queue.h
 create mode 100644 include/uapi/drm/xe_drm_events.h

-- 
2.53.0


^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: [RFC PATCH 2/2] drm/xe: Add watch_queue-based device event notification
@ 2026-03-04 13:50 kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2026-03-04 13:50 UTC (permalink / raw)
  To: oe-kbuild

:::::: 
:::::: Manual check reason: "high confidence checkpatch report"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20260304125220.165004-3-thomas.hellstrom@linux.intel.com>
References: <20260304125220.165004-3-thomas.hellstrom@linux.intel.com>
TO: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>

Hi Thomas,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-xe/drm-xe-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Thomas-Hellstr-m/watch_queue-Add-a-DRM_XE_NOTIFY-watch-type-and-export-init_watch/20260304-205630
base:   https://gitlab.freedesktop.org/drm/xe/kernel.git drm-xe-next
patch link:    https://lore.kernel.org/r/20260304125220.165004-3-thomas.hellstrom%40linux.intel.com
patch subject: [RFC PATCH 2/2] drm/xe: Add watch_queue-based device event notification
:::::: branch date: 49 minutes ago
:::::: commit date: 49 minutes ago
reproduce: (https://download.01.org/0day-ci/archive/20260304/202603041444.dsixkspP-lkp@intel.com/reproduce)

# many are suggestions rather than must-fix

ERROR:BAD_SIGN_OFF: Unrecognized email address: 'GitHub Copilot:claude-sonnet-4.6'
#32: 
Assisted-by: GitHub Copilot:claude-sonnet-4.6

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

end of thread, other threads:[~2026-03-06  4:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-04 12:52 [RFC PATCH 0/2] Xe driver asynchronous notification mechanism Thomas Hellström
2026-03-04 12:52 ` [RFC PATCH 1/2] watch_queue: Add a DRM_XE_NOTIFY watch type and export init_watch() Thomas Hellström
2026-03-04 12:52 ` [RFC PATCH 2/2] drm/xe: Add watch_queue-based device event notification Thomas Hellström
2026-03-05 15:44 ` ✗ CI.checkpatch: warning for Xe driver asynchronous notification mechanism Patchwork
2026-03-05 15:45 ` ✓ CI.KUnit: success " Patchwork
2026-03-05 17:06 ` ✓ Xe.CI.BAT: " Patchwork
2026-03-06  4:51 ` ✗ Xe.CI.FULL: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2026-03-04 13:50 [RFC PATCH 2/2] drm/xe: Add watch_queue-based device event notification kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.