All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stuart Summers <stuart.summers@intel.com>
Cc: matthew.brost@intel.com, niranjana.vishwanathapura@intel.com,
	intel-xe@lists.freedesktop.org,
	Stuart Summers <stuart.summers@intel.com>
Subject: [PATCH] drm/xe: Always invalidate TLBs on userptr invalidation
Date: Mon, 23 Mar 2026 21:17:42 +0000	[thread overview]
Message-ID: <20260323211743.285064-1-stuart.summers@intel.com> (raw)

Right now we are only invalidating TLBs when we are
running in fault mode. For non-fault mode based userptr
VMs, we then rely on context switches after an MMAP has
happened to ensure the TLB is clean for the next submission.

With context based TLB invalidation, we can no longer rely
on the implicit invalidation happening during context switch,
so remove the fault mode limiter and simply always perform
that invalidation.

I was able to see this behavior using the following test:
xe_exec_compute_mode --r twice-userptr-invalidate

Signed-off-by: Stuart Summers <stuart.summers@intel.com>
---
 drivers/gpu/drm/xe/xe_userptr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_userptr.c b/drivers/gpu/drm/xe/xe_userptr.c
index 6761005c0b90..dfd679dd98d9 100644
--- a/drivers/gpu/drm/xe/xe_userptr.c
+++ b/drivers/gpu/drm/xe/xe_userptr.c
@@ -102,7 +102,7 @@ xe_vma_userptr_do_inval(struct xe_vm *vm, struct xe_userptr_vma *uvma, bool is_d
 				    false, MAX_SCHEDULE_TIMEOUT);
 	XE_WARN_ON(err <= 0);
 
-	if (xe_vm_in_fault_mode(vm) && userptr->initial_bind) {
+	if (userptr->initial_bind) {
 		if (!userptr->finish_inuse) {
 			/*
 			 * Defer the TLB wait to an extra pass so the caller
-- 
2.43.0


             reply	other threads:[~2026-03-23 21:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-23 21:17 Stuart Summers [this message]
2026-03-23 21:24 ` ✓ CI.KUnit: success for drm/xe: Always invalidate TLBs on userptr invalidation Patchwork
2026-03-23 22:01 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-03-24  2:21 ` [PATCH] " Matthew Brost
2026-03-24 14:53   ` Summers, Stuart
2026-03-24 21:51     ` Summers, Stuart
2026-03-24 23:53       ` Matthew Brost
2026-03-25 20:35         ` Summers, Stuart
2026-03-25 21:47           ` Matthew Brost
2026-03-25 22:21             ` Summers, Stuart
2026-03-24  6:12 ` ✓ Xe.CI.FULL: success for " Patchwork

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=20260323211743.285064-1-stuart.summers@intel.com \
    --to=stuart.summers@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    --cc=niranjana.vishwanathapura@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 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.