From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: intel-xe@lists.freedesktop.org
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Matthew Brost" <matthew.brost@intel.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Michal Mrozek" <michal.mrozek@intel.com>,
"John Falkowski" <john.falkowski@intel.com>,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
"Lahtinen Joonas" <joonas.lahtinen@intel.com>,
"David Howells" <dhowells@redhat.com>,
"Christian Brauner" <brauner@kernel.org>,
"Kees Cook" <kees@kernel.org>,
"Davidlohr Bueso" <dave@stgolabs.net>,
"Christian König" <christian.koenig@amd.com>,
"Dave Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona.vetter@ffwll.ch>,
dri-devel@lists.freedesktop.org,
LMKL <linux-kernel@vger.kernel.org>
Subject: [RFC PATCH RESEND 0/2] Xe driver asynchronous notification mechanism
Date: Tue, 10 Mar 2026 16:57:39 +0100 [thread overview]
Message-ID: <20260310155741.87191-1-thomas.hellstrom@linux.intel.com> (raw)
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/
RESEND:
- Widening the audience to solicit watch_queue feedback.
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
next reply other threads:[~2026-03-10 15:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-10 15:57 Thomas Hellström [this message]
2026-03-10 15:57 ` [RFC PATCH RESEND 1/2] watch_queue: Add a DRM_XE_NOTIFY watch type and export init_watch() Thomas Hellström
2026-03-18 19:54 ` Watch queue maintainer? WAS:[RFC " Thomas Hellström
2026-03-10 15:57 ` [RFC PATCH RESEND 2/2] drm/xe: Add watch_queue-based device event notification Thomas Hellström
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260310155741.87191-1-thomas.hellstrom@linux.intel.com \
--to=thomas.hellstrom@linux.intel.com \
--cc=airlied@gmail.com \
--cc=brauner@kernel.org \
--cc=christian.koenig@amd.com \
--cc=dave@stgolabs.net \
--cc=dhowells@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=john.falkowski@intel.com \
--cc=joonas.lahtinen@intel.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthew.brost@intel.com \
--cc=michal.mrozek@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=simona.vetter@ffwll.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox