Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/xe: Adjust long-running workload timeslices to reasonable values

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.

Also change min_run_period_ms to 'unsiged int' type rather than 's64' as
only positive values make sense.

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>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patch.msgid.link/20251212182847.1683222-2-matthew.brost@intel.com

+5 -2
+4 -1
drivers/gpu/drm/xe/xe_vm.c
··· 1508 1508 INIT_WORK(&vm->destroy_work, vm_destroy_work_func); 1509 1509 1510 1510 INIT_LIST_HEAD(&vm->preempt.exec_queues); 1511 - vm->preempt.min_run_period_ms = 10; /* FIXME: Wire up to uAPI */ 1511 + if (flags & XE_VM_FLAG_FAULT_MODE) 1512 + vm->preempt.min_run_period_ms = 0; 1513 + else 1514 + vm->preempt.min_run_period_ms = 5; 1512 1515 1513 1516 for_each_tile(tile, xe, id) 1514 1517 xe_range_fence_tree_init(&vm->rftree[id]);
+1 -1
drivers/gpu/drm/xe/xe_vm_types.h
··· 263 263 * @min_run_period_ms: The minimum run period before preempting 264 264 * an engine again 265 265 */ 266 - s64 min_run_period_ms; 266 + unsigned int min_run_period_ms; 267 267 /** @exec_queues: list of exec queues attached to this VM */ 268 268 struct list_head exec_queues; 269 269 /** @num_exec_queues: number exec queues attached to this VM */