From: "Christian König" <christian.koenig@amd.com>
To: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
intel-xe@lists.freedesktop.org,
"Srinivasan Shanmugam" <srinivasan.shanmugam@amd.com>
Cc: 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@linux.intel.com>,
David Howells <dhowells@redhat.com>,
Christian Brauner <brauner@kernel.org>,
Kees Cook <kees@kernel.org>, Davidlohr Bueso <dave@stgolabs.net>,
Dave Airlie <airlied@gmail.com>,
Simona Vetter <simona.vetter@ffwll.ch>,
dri-devel@lists.freedesktop.org,
LMKL <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 0/4] Xe driver asynchronous notification mechanism
Date: Mon, 15 Jun 2026 10:12:06 +0200 [thread overview]
Message-ID: <3a5ef552-bd49-4a61-97cb-8af395a84de1@amd.com> (raw)
In-Reply-To: <20260612135340.116100-1-thomas.hellstrom@linux.intel.com>
Hi Thomas, Srini,
Srini is already working quite a while on something similar for amdgpu. We use eventfd and a device specific IOCTL instead of the watch_queue proposed here.
Srini please take a look at this, it is basically the equivalent of our event notification approach for KFD/KGD unification. Maybe we could learn from that and/or have something common for both drivers.
Thanks,
Christian.
On 6/12/26 15:53, Thomas Hellström wrote:
> 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 best 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.
>
> Patch 1 Implements a restart IOCTL for rebind-workers
> paused on OOM.
> Patch 2 Adds fault-injection into the rebind worker for
> testing.
> Patch 3 Adds a DRM_XE_NOTIFY watch_type.
> Patch 4 Implements watch_queue event sending from within
> xe.
>
> igt series:
> Test-with: https://patchwork.freedesktop.org/series/168429/
>
> Compute UMD side is not available yet. Will be available before
> final review.
>
> Thomas Hellström (4):
> drm/xe: Add DRM_IOCTL_XE_VM_RESTART IOCTL
> drm/xe: Add fault injection for rebind worker -ENOSPC
> watch_queue: Add a DRM_XE_NOTIFY watch type and export init_watch()
> drm/xe: Add watch_queue-based device event notification
>
> MAINTAINERS | 1 +
> drivers/gpu/drm/xe/Kconfig | 1 +
> drivers/gpu/drm/xe/Makefile | 1 +
> drivers/gpu/drm/xe/xe_debugfs.c | 4 +-
> drivers/gpu/drm/xe/xe_device.c | 8 ++
> drivers/gpu/drm/xe/xe_device_types.h | 6 ++
> drivers/gpu/drm/xe/xe_vm.c | 135 ++++++++++++++++++++++++++-
> drivers/gpu/drm/xe/xe_vm.h | 13 ++-
> drivers/gpu/drm/xe/xe_vm_types.h | 3 +
> drivers/gpu/drm/xe/xe_watch_queue.c | 111 ++++++++++++++++++++++
> drivers/gpu/drm/xe/xe_watch_queue.h | 20 ++++
> include/uapi/drm/xe_drm.h | 91 +++++++++++++++++-
> include/uapi/drm/xe_drm_events.h | 62 ++++++++++++
> include/uapi/linux/watch_queue.h | 3 +-
> kernel/watch_queue.c | 13 ++-
> 15 files changed, 462 insertions(+), 10 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
>
next prev parent reply other threads:[~2026-06-15 8:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-12 13:53 Thomas Hellström
2026-06-12 13:53 ` [PATCH 1/4] drm/xe: Add DRM_IOCTL_XE_VM_RESTART IOCTL Thomas Hellström
2026-06-12 13:53 ` [PATCH 2/4] drm/xe: Add fault injection for rebind worker -ENOSPC Thomas Hellström
2026-06-12 13:53 ` [PATCH 3/4] watch_queue: Add a DRM_XE_NOTIFY watch type and export init_watch() Thomas Hellström
2026-06-12 13:53 ` [PATCH 4/4] drm/xe: Add watch_queue-based device event notification Thomas Hellström
2026-07-20 4:29 ` Matthew Brost
2026-07-20 10:24 ` Thomas Hellström
2026-06-15 8:12 ` Christian König [this message]
2026-06-15 9:06 ` [RFC PATCH 0/4] Xe driver asynchronous notification mechanism SHANMUGAM, SRINIVASAN
2026-06-16 11:18 ` SHANMUGAM, SRINIVASAN
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=3a5ef552-bd49-4a61-97cb-8af395a84de1@amd.com \
--to=christian.koenig@amd.com \
--cc=airlied@gmail.com \
--cc=brauner@kernel.org \
--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@linux.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 \
--cc=srinivasan.shanmugam@amd.com \
--cc=thomas.hellstrom@linux.intel.com \
/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
all inboxes | Powered by JetHome®