From: Matthew Brost <matthew.brost@intel.com>
To: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <francois.dugast@intel.com>,
<michal.mrozek@intel.com>
Subject: Re: [PATCH v2 1/7] drm/xe: Adjust long-running workload timeslices to reasonable values
Date: Mon, 15 Dec 2025 13:48:17 -0800 [thread overview]
Message-ID: <aUCCIVAhQs1sv1XB@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <86788bb40fabb2eee6cfe741514805d48d4e824f.camel@linux.intel.com>
On Mon, Dec 15, 2025 at 11:08:21AM +0100, Thomas Hellström wrote:
> On Fri, 2025-12-12 at 10:28 -0800, Matthew Brost wrote:
> > A 10ms timeslice for long-running workloads is far too long and
> > causes
> > significant jitter in benchmarks when the system is shared. Adjust
> > the
> > value to 5ms for preempt-fencing VMs, as the resume step there is
> > quite
> > costly as memory is moved around, and set it to zero for pagefault
> > VMs,
> > since switching back to pagefault mode after dma-fence mode is
> > relatively fast.
> >
> > Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel
> > GPUs")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Matthew Brost <matthew.brost@intel.com>
>
> Please add a comment in the commit message explaining why the type was
> changed.
>
Will do. I noticed s64 type which makes no sense at all when working on
this series, so fixed that part up too.
Matt
> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
>
>
> > ---
> > drivers/gpu/drm/xe/xe_vm.c | 5 ++++-
> > drivers/gpu/drm/xe/xe_vm_types.h | 2 +-
> > 2 files changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
> > index c2012d20faa6..4648f8a458cf 100644
> > --- a/drivers/gpu/drm/xe/xe_vm.c
> > +++ b/drivers/gpu/drm/xe/xe_vm.c
> > @@ -1508,7 +1508,10 @@ struct xe_vm *xe_vm_create(struct xe_device
> > *xe, u32 flags, struct xe_file *xef)
> > INIT_WORK(&vm->destroy_work, vm_destroy_work_func);
> >
> > INIT_LIST_HEAD(&vm->preempt.exec_queues);
> > - vm->preempt.min_run_period_ms = 10; /* FIXME: Wire up to
> > uAPI */
> > + if (flags & XE_VM_FLAG_FAULT_MODE)
> > + vm->preempt.min_run_period_ms = 0;
> > + else
> > + vm->preempt.min_run_period_ms = 5;
> >
> > for_each_tile(tile, xe, id)
> > xe_range_fence_tree_init(&vm->rftree[id]);
> > diff --git a/drivers/gpu/drm/xe/xe_vm_types.h
> > b/drivers/gpu/drm/xe/xe_vm_types.h
> > index 3bf912bfbdcc..18bad1dd08e6 100644
> > --- a/drivers/gpu/drm/xe/xe_vm_types.h
> > +++ b/drivers/gpu/drm/xe/xe_vm_types.h
> > @@ -263,7 +263,7 @@ struct xe_vm {
> > * @min_run_period_ms: The minimum run period before
> > preempting
> > * an engine again
> > */
> > - s64 min_run_period_ms;
> > + unsigned int min_run_period_ms;
> > /** @exec_queues: list of exec queues attached to
> > this VM */
> > struct list_head exec_queues;
> > /** @num_exec_queues: number exec queues attached to
> > this VM */
>
next prev parent reply other threads:[~2025-12-15 21:48 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-12 18:28 [PATCH v2 0/7] Fix performance when pagefaults and 3d/display share resources Matthew Brost
2025-12-12 18:28 ` [PATCH v2 1/7] drm/xe: Adjust long-running workload timeslices to reasonable values Matthew Brost
2025-12-15 10:08 ` Thomas Hellström
2025-12-15 21:48 ` Matthew Brost [this message]
2025-12-12 18:28 ` [PATCH v2 2/7] drm/xe: Use usleep_range for accurate long-running workload timeslicing Matthew Brost
2025-12-15 10:10 ` Thomas Hellström
2025-12-12 18:28 ` [PATCH v2 3/7] drm/xe: Add debugfs knobs to control long running " Matthew Brost
2025-12-15 10:11 ` Thomas Hellström
2025-12-12 18:28 ` [PATCH v2 4/7] drm/xe: Skip exec queue schedule toggle if queue is idle during suspend Matthew Brost
2025-12-15 12:08 ` Thomas Hellström
2025-12-12 18:28 ` [PATCH v2 5/7] drm/xe: Wait on in-syncs when swicthing to dma-fence mode Matthew Brost
2025-12-15 10:32 ` Thomas Hellström
2025-12-15 21:46 ` Matthew Brost
2025-12-15 21:48 ` Thomas Hellström
2025-12-16 1:12 ` Matthew Brost
2025-12-12 18:28 ` [PATCH v2 6/7] drm/xe: Add GT stats ktime helpers Matthew Brost
2025-12-15 10:17 ` Thomas Hellström
2025-12-12 18:28 ` [PATCH v2 7/7] drm/xe: Add more GT stats around pagefault mode switch flows Matthew Brost
2025-12-15 11:00 ` Thomas Hellström
2025-12-15 13:05 ` Francois Dugast
2025-12-12 22:37 ` ✗ CI.checkpatch: warning for Fix performance when pagefaults and 3d/display share resources (rev2) Patchwork
2025-12-12 22:38 ` ✓ CI.KUnit: success " Patchwork
2025-12-12 23:33 ` ✓ Xe.CI.BAT: " Patchwork
2025-12-13 19:27 ` ✗ Xe.CI.Full: failure " 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=aUCCIVAhQs1sv1XB@lstrano-desk.jf.intel.com \
--to=matthew.brost@intel.com \
--cc=francois.dugast@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=michal.mrozek@intel.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