Non-fatal repin retries and NUMA-local rebind worker
Subsystems (2)
cover Non-fatal repin retries and NUMA-local rebind worker
drm_gpusvm_get_pages() fails with -EBUSY after a fixed 1s budget when CPU mappings keep changing during a userptr repin (for instance under AutoNUMA balancing or concurrent mapping churn), which Xe currently treats as fatal.
Retry userptr repins with locks dropped up to a configurable userptr_repin_timeout_ms sysfs timeout (requeuing the compute rebind worker on -EAGAIN), restore userptr invalidations lost on VMA op unwind, and run the compute rebind worker on the device's NUMA node so HMM faults do not trigger remote AutoNUMA migrations (hopefully).
First patch is mostly orthogonal bug fix, however series here could potentially make the race more likely, so included it here.
Entire series is not necessarily intended to be merged upstream as-is.
---
Matthew Auld (2):
drm/xe/vm: restore userptr invalidations on VMA op unwind drm/xe: run compute rebind worker on device NUMA node
Thomas Hellström (3):
drm/xe: Requeue the rebind worker instead of retrying in-line on -EAGAIN drm/xe: Add a userptr repin timeout sysfs attribute drm/xe/userptr: Make the repin retry loop non-fatal
drivers/gpu/drm/xe/xe_device.c | 13 +++- drivers/gpu/drm/xe/xe_device.h | 2 + drivers/gpu/drm/xe/xe_device_sysfs.c | 56 ++++++++++++++ drivers/gpu/drm/xe/xe_device_types.h | 18 ++++- drivers/gpu/drm/xe/xe_exec.c | 9 ++- drivers/gpu/drm/xe/xe_pagefault.c | 4 + drivers/gpu/drm/xe/xe_userptr.c | 47 ++++++++++-- drivers/gpu/drm/xe/xe_userptr.h | 53 +++++++++++++ drivers/gpu/drm/xe/xe_vm.c | 145 ++++++++++++++++++++++++----------- drivers/gpu/drm/xe/xe_vm.h | 6 +- drivers/gpu/drm/xe/xe_vm_madvise.c | 23 +++++- drivers/gpu/drm/xe/xe_vm_types.h | 8 ++ 12 files changed, 328 insertions(+), 56 deletions(-)
---
base-commit: 84508686117ca3be5756049acdf15e3e47fd2683
change-id: 20261118-userptr-repin-52499936a13c
PATCH 1/5 drm/xe/vm: restore userptr invalidations on VMA op unwind
When xe_vma_op_commit() commits DRM_GPUVA_OP_UNMAP or DRM_GPUVA_OP_REMAP, prep_vma_destroy() sets XE_VMA_DESTROYED while the old VMA's GPU page tables remain live. If a subsequent step fails and unwinds (for example splitting a userptr VMA where new_vma() fails, or a later op in an array of binds failing), a concurrent MMU notifier invalidation is lost on non-fault-mode VMs:
CPU0 (VM_BIND / MADVISE) CPU1 (MMU notifier)
------------------------ -------------------
down_write(&vm->lock)
xe_vma_op_commit()
prep_vma_destroy(vma)
flags |= XE_VMA_DESTROYED
...
/* later step fails */
xe_vma_userptr_invalidate_start()
down_write(¬ifier_lock)
mmu_interval_set_seq()
/* XE_VMA_DESTROYED set: skips
* vm->userptr.invalidated
*/
drm_gpusvm_unmap_pages()
up_write(¬ifier_lock) xe_vma_op_unwind()
flags &= ~XE_VMA_DESTROYED
xe_vm_insert_vma(vm, vma)
up_write(&vm->lock)
Once vm->lock is dropped, the VMA remains in the VM with live GPU PTEs pointing at unmapped pages, while neither exec nor the rebind worker knows to repin and rebind it.
Add unprep_vma_destroy() to check xe_vma_userptr_check_repin() while clearing XE_VMA_DESTROYED under the notifier lock and queue invalidated non-fault-mode userptr VMAs onto vm->userptr.invalidated.
--- drivers/gpu/drm/xe/xe_vm.c | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-)
drivers/gpu/drm/xe/xe_vm.c +24 -11
@@ -44,6 +44,7 @@#include "xe_tile.h" #include "xe_tlb_inval.h" #include "xe_trace_bo.h" +#include "xe_userptr.h" #include "xe_vm_madvise.h" #include "xe_wa.h"
@@ -2401,6 +2402,26 @@ static void prep_vma_destroy(struct xe_vm *vm, struct xe_vma *vma,xe_vm_remove_vma (vm, vma); } +static void unprep_vma_destroy (struct xe_vm *vm,struct xe_vma *vma, +bool post_commit) +{ +xe_svm_notifier_lock (vm); + vma->gpuva.flags &= ~XE_VMA_DESTROYED ; +if (IS_ENABLED (CONFIG_DRM_GPUSVM ) && !xe_vm_in_fault_mode (vm) && +xe_vma_is_userptr (vma) && +xe_vma_userptr_check_repin (to_userptr_vma (vma))) { +struct xe_userptr_vma *uvma =to_userptr_vma (vma); + +spin_lock (&vm->userptr.invalidated_lock); +list_move_tail (&uvma->userptr.invalidate_link, + &vm->userptr.invalidated); +spin_unlock (&vm->userptr.invalidated_lock); + } +xe_svm_notifier_unlock (vm); +if (post_commit) +xe_vm_insert_vma (vm, vma); +} +#undef ULL#define ULL unsigned long long
@@ -3093,13 +3114,8 @@ static void xe_vma_op_unwind(struct xe_vm *vm, struct xe_vma_op *op,xe_vm_assert_write_mode_or_garbage_collector (vm); -if (vma) { -xe_svm_notifier_lock (vm); - vma->gpuva.flags &= ~XE_VMA_DESTROYED ; -xe_svm_notifier_unlock (vm); -if (post_commit) -xe_vm_insert_vma (vm, vma); - } +if (vma) +unprep_vma_destroy (vm, vma, post_commit);break ; }case DRM_GPUVA_OP_REMAP :
@@ -3117,9 +3133,6 @@ static void xe_vma_op_unwind(struct xe_vm *vm, struct xe_vma_op *op,xe_vma_destroy_unlocked (op->remap.next); }if (vma) { -xe_svm_notifier_lock (vm); - vma->gpuva.flags &= ~XE_VMA_DESTROYED ; -xe_svm_notifier_unlock (vm);if (post_commit) {/* * Restore the old va range, in case of the
@@ -3131,8 +3144,8 @@ static void xe_vma_op_unwind(struct xe_vm *vm, struct xe_vma_op *op, op->remap.old_start; op->base.remap.unmap->va->va.range = op->remap.old_range; -xe_vm_insert_vma (vm, vma); } +unprep_vma_destroy (vm, vma, post_commit); }break ; }
Signature · 1 line
2.56.1
Re: [PATCH 1/5] drm/xe/vm: restore userptr invalidations on VMA op unwind
Quoted 42 lines · Matthew Auld
When
xe_vma_op_commit()commitsDRM_GPUVA_OP_UNMAPorDRM_GPUVA_OP_REMAP,prep_vma_destroy()setsXE_VMA_DESTROYEDwhile the
old VMA's GPU page tables remain live. If a subsequent step fails and unwinds (for example splitting a userptr VMA wherenew_vma()fails, or a
later op in an array of binds failing), a concurrent MMU notifier invalidation is lost on non-fault-mode VMs:CPU0 (
VM_BIND/ MADVISE) CPU1 (MMU notifier) ------------------------ -------------------down_write(&vm->lock)
xe_vma_op_commit()
prep_vma_destroy(vma)
flags |=XE_VMA_DESTROYED
...
/* later step fails */xe_vma_userptr_invalidate_start()down_write(¬ifier_lock)mmu_interval_set_seq()/*XE_VMA_DESTROYEDset:
skips
*vm->userptr.invalidated*/drm_gpusvm_unmap_pages()up_write(¬ifier_lock)xe_vma_op_unwind()
flags &= ~XE_VMA_DESTROYED
xe_vm_insert_vma(vm, vma)
up_write(&vm->lock)Once
vm->lockis dropped, the VMA remains in the VM with live GPU PTEs
pointing at unmapped pages, while neither exec nor the rebind worker knows to repin and rebind it.Add
unprep_vma_destroy()to checkxe_vma_userptr_check_repin()while clearingXE_VMA_DESTROYEDunder the notifier lock and queue invalidated
non-fault-mode userptr VMAs ontovm->userptr.invalidated.
Quoted 5 lines
Fixes b06d47be7c83 ("drm/xe: Port Xe to GPUVA")Signed-off-by Matthew Auld <[email protected]>Cc Thomas Hellström <[email protected]>Cc Matthew Brost <[email protected]>Cc <[email protected]> # v6.12+
Quoted 85 lines
---
drivers/gpu/drm/xe/xe_vm.c | 35 ++++++++++++++++++++++++-----------1 file changed, 24 insertions(+), 11 deletions(-)drivers/gpu/drm/xe/xe_vm.c +1
-0@@ -44,6 +44,7 @@ #include "xe_tile.h" #include "xe_tlb_inval.h" #include "xe_trace_bo.h" +#include "xe_userptr.h" #include "xe_vm_madvise.h" #include "xe_wa.h"drivers/gpu/drm/xe/xe_vm.c +0
-0@@ -2401,6 +2402,26 @@ static void prep_vma_destroy(struct xe_vm *vm,struct xe_vma *vma, xe_vm_remove_vma(vm, vma); }drivers/gpu/drm/xe/xe_vm.c +6
-0+static void unprep_vma_destroy (struct xe_vm *vm,struct xe_vma *vma, + bool post_commit) +{ +xe_svm_notifier_lock (vm); + vma->gpuva.flags &= ~XE_VMA_DESTROYED ; + if (IS_ENABLED(CONFIG_DRM_GPUSVM) &&!xe_vm_in_fault_mode(vm) &&
drivers/gpu/drm/xe/xe_vm.c +14
-0+ xe_vma_is_userptr(vma) && + xe_vma_userptr_check_repin(to_userptr_vma(vma))) { +struct xe_userptr_vma *uvma =to_userptr_vma (vma); + +spin_lock (&vm->userptr.invalidated_lock); +list_move_tail (&uvma->userptr.invalidate_link, + &vm->userptr.invalidated); +spin_unlock (&vm->userptr.invalidated_lock); + } +xe_svm_notifier_unlock (vm); +if (post_commit) +xe_vm_insert_vma (vm, vma); +} +#undef ULL
#define ULL unsigned long longdrivers/gpu/drm/xe/xe_vm.c +0
-0@@ -3093,13 +3114,8 @@ static void xe_vma_op_unwind(struct xe_vm *vm, struct xe_vma_op *op,
xe_vm_assert_write_mode_or_garbage_collector(vm);drivers/gpu/drm/xe/xe_vm.c +2
-7-if (vma) { -xe_svm_notifier_lock (vm); - vma->gpuva.flags &= ~XE_VMA_DESTROYED ; -xe_svm_notifier_unlock (vm); -if (post_commit) -xe_vm_insert_vma (vm, vma); - } +if (vma) +unprep_vma_destroy (vm, vma, post_commit);break;
}
caseDRM_GPUVA_OP_REMAP:drivers/gpu/drm/xe/xe_vm.c +0
-3@@ -3117,9 +3133,6 @@ static void xe_vma_op_unwind(struct xe_vm *vm,struct xe_vma_op *op, xe_vma_destroy_unlocked(op->remap.next); } if (vma) { -xe_svm_notifier_lock (vm); - vma->gpuva.flags &= ~XE_VMA_DESTROYED ; -xe_svm_notifier_unlock (vm); if (post_commit) { /** Restore the old va range, in case of the
drivers/gpu/drm/xe/xe_vm.c +0
-0@@ -3131,8 +3144,8 @@ static void xe_vma_op_unwind(struct xe_vm *vm,struct xe_vma_op *op, op->remap.old_start;
op->base.remap.unmap->va->va.range=op->remap.old_range;drivers/gpu/drm/xe/xe_vm.c +0
-1-xe_vm_insert_vma (vm, vma);}
drivers/gpu/drm/xe/xe_vm.c +1
-0+unprep_vma_destroy (vm, vma, post_commit);}
break;
}
Re: [PATCH 1/5] drm/xe/vm: restore userptr invalidations on VMA op unwind
In reply to Matthew AuldQuoted 71 lines · Matthew Auld
When
xe_vma_op_commit()commitsDRM_GPUVA_OP_UNMAPorDRM_GPUVA_OP_REMAP,prep_vma_destroy()setsXE_VMA_DESTROYEDwhile the old VMA's GPU page tables remain live. If a subsequent step fails and unwinds (for example splitting a userptr VMA wherenew_vma()fails, or a later op in an array of binds failing), a concurrent MMU notifier invalidation is lost on non-fault-mode VMs:CPU0 (VM_BIND / MADVISE) CPU1 (MMU notifier) ------------------------ ------------------- down_write(&vm->lock) xe_vma_op_commit() prep_vma_destroy(vma) flags |= XE_VMA_DESTROYED ... /* later step fails */ xe_vma_userptr_invalidate_start() down_write(¬ifier_lock) mmu_interval_set_seq() /* XE_VMA_DESTROYED set: skips * vm->userptr.invalidated */ drm_gpusvm_unmap_pages() up_write(¬ifier_lock) xe_vma_op_unwind() flags &= ~XE_VMA_DESTROYED xe_vm_insert_vma(vm, vma) up_write(&vm->lock)Once
vm->lockis dropped, the VMA remains in the VM with live GPU PTEs pointing at unmapped pages, while neither exec nor the rebind worker knows to repin and rebind it.Add
unprep_vma_destroy()to checkxe_vma_userptr_check_repin()while clearingXE_VMA_DESTROYEDunder the notifier lock and queue invalidated non-fault-mode userptr VMAs ontovm->userptr.invalidated.Fixes b06d47be7c83 ("drm/xe: Port Xe to GPUVA")Signed-off-by Matthew Auld <[email protected]>Cc Thomas Hellström <[email protected]>Cc Matthew Brost <[email protected]>Cc <[email protected]> # v6.12+--- drivers/gpu/drm/xe/xe_vm.c | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-)drivers/gpu/drm/xe/xe_vm.c +11
-0@@ -44,6 +44,7 @@#include "xe_tile.h" #include "xe_tlb_inval.h" #include "xe_trace_bo.h" +#include "xe_userptr.h" #include "xe_vm_madvise.h" #include "xe_wa.h" @@ -2401,6 +2402,26 @@ static void prep_vma_destroy(struct xe_vm *vm, struct xe_vma *vma,xe_vm_remove_vma (vm, vma); } +static void unprep_vma_destroy (struct xe_vm *vm,struct xe_vma *vma, +bool post_commit) +{ +xe_svm_notifier_lock (vm); + vma->gpuva.flags &= ~XE_VMA_DESTROYED ; +if (IS_ENABLED (CONFIG_DRM_GPUSVM ) && !xe_vm_in_fault_mode (vm) && +xe_vma_is_userptr (vma) && +xe_vma_userptr_check_repin (to_userptr_vma (vma))) { +struct xe_userptr_vma *uvma =to_userptr_vma (vma); +
drivers/gpu/drm/xe/xe_vm.c static void prep_vma_destroy(struct xe_vm *vm, struct xe_vma *vma, · line 2424
Quoted 10 lines
drivers/gpu/drm/xe/xe_vm.c +10
-0+spin_lock (&vm->userptr.invalidated_lock); +list_move_tail (&uvma->userptr.invalidate_link, + &vm->userptr.invalidated); +spin_unlock (&vm->userptr.invalidated_lock); + } +xe_svm_notifier_unlock (vm); +if (post_commit) +xe_vm_insert_vma (vm, vma); +} +
LGTM
Quoted 40 lines
drivers/gpu/drm/xe/xe_vm.c +3
-11#undef ULL#define ULL unsigned long long@@ -3093,13 +3114,8 @@ static void xe_vma_op_unwind(struct xe_vm *vm, struct xe_vma_op *op,xe_vm_assert_write_mode_or_garbage_collector (vm); -if (vma) { -xe_svm_notifier_lock (vm); - vma->gpuva.flags &= ~XE_VMA_DESTROYED ; -xe_svm_notifier_unlock (vm); -if (post_commit) -xe_vm_insert_vma (vm, vma); - } +if (vma) +unprep_vma_destroy (vm, vma, post_commit);break ; }case DRM_GPUVA_OP_REMAP :@@ -3117,9 +3133,6 @@ static void xe_vma_op_unwind(struct xe_vm *vm, struct xe_vma_op *op,xe_vma_destroy_unlocked (op->remap.next); }if (vma) { -xe_svm_notifier_lock (vm); - vma->gpuva.flags &= ~XE_VMA_DESTROYED ; -xe_svm_notifier_unlock (vm);if (post_commit) {/* * Restore the old va range, in case of the @@ -3131,8 +3144,8 @@ static void xe_vma_op_unwind(struct xe_vm *vm, struct xe_vma_op *op, op->remap.old_start; op->base.remap.unmap->va->va.range = op->remap.old_range; -xe_vm_insert_vma (vm, vma); } +unprep_vma_destroy (vm, vma, post_commit); }break ; }
PATCH 2/5 drm/xe: Requeue the rebind worker instead of retrying in-line on -EAGAIN
In reply to Matthew AuldFrom: Thomas Hellström <[email protected]>
When the preempt rebind worker needs to retry, it currently jumps back and keeps holding vm->lock in write mode across the retry. Only VFs with migration support drop the lock and requeue the worker.
Holding the vm lock across retries needlessly blocks other users of the lock and other work on the ordered workqueue, and makes the retry unfit for conditions that may last for a while, like repeatedly invalidated userptrs.
Always drop the vm lock and requeue the worker on -EAGAIN. This also fixes a leak of the preempt fences allocated in the failed attempt on the existing VF path.
The userptr invalidation injection state that forces one retry per rebind sequence was a local variable that would be reset by a requeue. Move it to the vm.
--- drivers/gpu/drm/xe/xe_vm.c | 59 ++++++++++++++++++++++++++-------------- drivers/gpu/drm/xe/xe_vm_types.h | 8 ++++++ 2 files changed, 46 insertions(+), 21 deletions(-)
drivers/gpu/drm/xe/xe_vm.c +38 -21
@@ -542,6 +542,31 @@ void xe_vm_resume_rebind_worker(struct xe_vm *vm)queue_work (vm->xe->ordered_wq, &vm->preempt.rebind_work); } +#if IS_ENABLED (CONFIG_DRM_XE_USERPTR_INVAL_INJECT ) +/* +* Force one retry per rebind sequence. The sequence spans requeues of the +* worker, so the state must live in the vm. +*/ +static bool xe_vm_rebind_worker_inject_retry (struct xe_vm *vm) +{ +return !vm->preempt.inval_inject_tries++; +} + +static void xe_vm_rebind_worker_reset_inject (struct xe_vm *vm) +{ + vm->preempt.inval_inject_tries =0 ; +} +#else +static bool xe_vm_rebind_worker_inject_retry (struct xe_vm *vm) +{ +return false; +} + +static void xe_vm_rebind_worker_reset_inject (struct xe_vm *vm) +{ +} +#endif +static void preempt_rebind_work_func (struct work_struct *w) { struct xe_vm *vm = container_of(w, struct xe_vm, preempt.rebind_work);
@@ -551,7 +576,6 @@ static void preempt_rebind_work_func(struct work_struct *w)LIST_HEAD (preempt_fences);int err =0 ;long wait; -int __maybe_unused tries =0 ;xe_assert (vm->xe,xe_vm_in_preempt_fence_mode (vm));trace_xe_vm_rebind_worker_enter (vm);
@@ -564,7 +588,6 @@ static void preempt_rebind_work_func(struct work_struct *w)return ; } -retry:if (!try_wait_for_completion (&vm->xe->pm_block) &&vm_suspend_rebind_worker (vm)) {up_write (&vm->lock);/* We don't actually block but don't make progress. */
@@ -614,20 +637,14 @@ static void preempt_rebind_work_func(struct work_struct *w) goto out_unlock; } -#define retry_required (__tries, __vm) \ - (IS_ENABLED(CONFIG_DRM_XE_USERPTR_INVAL_INJECT) ? \ - (!(__tries)++ || __xe_vm_userptr_needs_repin(__vm)) : \ - __xe_vm_userptr_needs_repin(__vm)) -xe_svm_notifier_lock (vm); -if (retry_required (tries, vm)) { +if (xe_vm_rebind_worker_inject_retry (vm) || +__xe_vm_userptr_needs_repin (vm)) {xe_svm_notifier_unlock (vm); err = -EAGAIN ; goto out_unlock; } -#undef retry_required -xe_vm_bump_lru (vm, &exec);/* Point of no return. */
@@ -642,20 +659,20 @@ static void preempt_rebind_work_func(struct work_struct *w)trace_xe_vm_rebind_worker_retry (vm);/* -* We can't block in workers on a VF which supports migration -* given this can block the VF post-migration workers from -* getting scheduled. +* Drop all locks and requeue rather than retrying in-line. +* This avoids blocking other work items, such as VF +* post-migration workers, and lets other users of the vm +* lock make progress between attempts. */ -if (IS_SRIOV_VF (vm->xe) && -xe_sriov_vf_migration_supported (vm->xe)) { -up_write (&vm->lock); -xe_vm_queue_rebind_worker (vm); -return ; - } - - goto retry; +up_write (&vm->lock); +free_preempt_fences (&preempt_fences); +xe_vm_queue_rebind_worker (vm); +trace_xe_vm_rebind_worker_exit (vm); +return ; } +xe_vm_rebind_worker_reset_inject (vm); +if (err) {drm_warn (&vm->xe->drm,"VM worker error: %d\n" , err);xe_vm_kill (vm, true);
drivers/gpu/drm/xe/xe_vm_types.h +8 -0
@@ -350,6 +350,14 @@ struct xe_vm {* kicked on resume. */ struct list_head pm_activate_link; +#if IS_ENABLED (CONFIG_DRM_XE_USERPTR_INVAL_INJECT ) +/** +* @inval_inject_tries: Number of rebind attempts in the +* current rebind sequence. Used to force a retry for testing. +* Protected by @lock. +*/ +unsigned int inval_inject_tries; +#endif } preempt;/** @exec_queues: Manages list of exec queues attached to this VM, protected by lock. */
Signature · 1 line
2.56.1
Thomas Hellström
maintainerRe: [PATCH 2/5] drm/xe: Requeue the rebind worker instead of retrying in-line on -EAGAIN
Quoted 14 lines · Matthew Auld
From: Thomas Hellström <[email protected]>
When the preempt rebind worker needs to retry, it currently jumps back
and keeps holdingvm->lockin write mode across the retry. Only VFs with migration support drop the lock and requeue the worker.Holding the vm lock across retries needlessly blocks other users of the
lock and other work on the ordered workqueue, and makes the retry unfit
for conditions that may last for a while, like repeatedly invalidated userptrs.
Quoted 3 lines
Always drop the vm lock and requeue the worker on
-EAGAIN. This also fixes a leak of the preempt fences allocated in the failed attempt on the existing VF path.
Do we need a Fixes: here?
Also needs a separate reviewer.
Quoted 158 lines
The userptr invalidation injection state that forces one retry per rebind sequence was a local variable that would be reset by a requeue.
Move it to the vm.Signed-off-by Thomas Hellström <[email protected]>Signed-off-by Matthew Auld <[email protected]>---
drivers/gpu/drm/xe/xe_vm.c | 59 ++++++++++++++++++++++++++----
----------
drivers/gpu/drm/xe/xe_vm_types.h | 8 ++++++2 files changed, 46 insertions(+), 21 deletions(-)drivers/gpu/drm/xe/xe_vm.c +0
-0@@ -542,6 +542,31 @@ void xe_vm_resume_rebind_worker(struct xe_vm *vm) queue_work(vm->xe->ordered_wq, &vm->preempt.rebind_work); }drivers/gpu/drm/xe/xe_vm.c +3
-0+#if IS_ENABLED (CONFIG_DRM_XE_USERPTR_INVAL_INJECT ) +/* +* Force one retry per rebind sequence. The sequence spans requeues of the
+ * worker, so the state must live in the vm.
+ */drivers/gpu/drm/xe/xe_vm.c +20
-0+static bool xe_vm_rebind_worker_inject_retry (struct xe_vm *vm) +{ +return !vm->preempt.inval_inject_tries++; +} + +static void xe_vm_rebind_worker_reset_inject (struct xe_vm *vm) +{ + vm->preempt.inval_inject_tries =0 ; +} +#else +static bool xe_vm_rebind_worker_inject_retry (struct xe_vm *vm) +{ +return false; +} + +static void xe_vm_rebind_worker_reset_inject (struct xe_vm *vm) +{ +} +#endif +static void
preempt_rebind_work_func(struct work_struct *w){
structxe_vm*vm =container_of(w, struct xe_vm, preempt.rebind_work);drivers/gpu/drm/xe/xe_vm.c +0
-1@@ -551,7 +576,6 @@ static void preempt_rebind_work_func(struct work_struct *w) LIST_HEAD(preempt_fences); int err = 0; long wait; -int __maybe_unused tries =0 ;
xe_assert(vm->xe, xe_vm_in_preempt_fence_mode(vm));trace_xe_vm_rebind_worker_enter(vm);drivers/gpu/drm/xe/xe_vm.c +0
-0@@ -564,7 +588,6 @@ static void preempt_rebind_work_func(struct work_struct *w) return; }
-retry:
if (!try_wait_for_completion(&vm->xe->pm_block) &&vm_suspend_rebind_worker(vm)) {
up_write(&vm->lock);
/* We don't actually block but don't make progress. */drivers/gpu/drm/xe/xe_vm.c +0
-0@@ -614,20 +637,14 @@ static void preempt_rebind_work_func(struct work_struct *w) goto out_unlock; }drivers/gpu/drm/xe/xe_vm.c +0
-5-#define retry_required (__tries, __vm) \ - (IS_ENABLED(CONFIG_DRM_XE_USERPTR_INVAL_INJECT) ? \ - (!(__tries)++ || __xe_vm_userptr_needs_repin(__vm)) : \ - __xe_vm_userptr_needs_repin(__vm)) -
xe_svm_notifier_lock(vm);drivers/gpu/drm/xe/xe_vm.c +2
-1-if (retry_required (tries, vm)) { +if (xe_vm_rebind_worker_inject_retry (vm) || + __xe_vm_userptr_needs_repin(vm)) {
xe_svm_notifier_unlock(vm);
err =-EAGAIN;
gotoout_unlock;
}drivers/gpu/drm/xe/xe_vm.c +0
-2-#undef retry_required -
xe_vm_bump_lru(vm, &exec);
/* Point of no return. */drivers/gpu/drm/xe/xe_vm.c +0
-0@@ -642,20 +659,20 @@ static void preempt_rebind_work_func(struct work_struct *w) trace_xe_vm_rebind_worker_retry(vm);
/*drivers/gpu/drm/xe/xe_vm.c +0
-1-* We can't block in workers on a VF which supports migration
drivers/gpu/drm/xe/xe_vm.c +0
-1-* given this can block the VF post-migration workers from
drivers/gpu/drm/xe/xe_vm.c +1
-1-* getting scheduled. +* Drop all locks and requeue rather than retrying in-line.
drivers/gpu/drm/xe/xe_vm.c +2
-0+* This avoids blocking other work items, such as VF +* post-migration workers, and lets other users of the vm
drivers/gpu/drm/xe/xe_vm.c +1
-0+* lock make progress between attempts. */
drivers/gpu/drm/xe/xe_vm.c +5
-8-if (IS_SRIOV_VF (vm->xe) && - xe_sriov_vf_migration_supported(vm->xe)) { -up_write (&vm->lock); -xe_vm_queue_rebind_worker (vm); -return ; - } - - goto retry; +up_write (&vm->lock); +free_preempt_fences (&preempt_fences); +xe_vm_queue_rebind_worker (vm); +trace_xe_vm_rebind_worker_exit (vm); +return ;}
drivers/gpu/drm/xe/xe_vm.c +2
-0+xe_vm_rebind_worker_reset_inject (vm); +if (err) {
drm_warn(&vm->xe->drm, "VM worker error: %d\n", err);
xe_vm_kill(vm, true);drivers/gpu/drm/xe/xe_vm_types.h +3
-0@@ -350,6 +350,14 @@ struct xe_vm {* kicked on resume. */ struct list_head pm_activate_link; +#if IS_ENABLED (CONFIG_DRM_XE_USERPTR_INVAL_INJECT ) +/** +* @inval_inject_tries: Number of rebind attempts in the
drivers/gpu/drm/xe/xe_vm_types.h +1
-0+* current rebind sequence. Used to force a retry for testing.
drivers/gpu/drm/xe/xe_vm_types.h +4
-0+* Protected by @lock. +*/ +unsigned int inval_inject_tries; +#endif } preempt;
/** @exec_queues: Manages list of exec queues attached to this VM, protected by lock. */
Matthew Auld
Reviewed-byRe: [PATCH 2/5] drm/xe: Requeue the rebind worker instead of retrying in-line on -EAGAIN
Quoted 15 lines · Thomas Hellström
Quoted 14 lines · Matthew Auld
From: Thomas Hellström <[email protected]>
When the preempt rebind worker needs to retry, it currently jumps back
and keeps holdingvm->lockin write mode across the retry. Only VFs with migration support drop the lock and requeue the worker.Holding the vm lock across retries needlessly blocks other users of the
lock and other work on the ordered workqueue, and makes the retry unfit
for conditions that may last for a while, like repeatedly invalidated userptrs.
Quoted 5 lines
Quoted 3 lines
Always drop the vm lock and requeue the worker on
-EAGAIN. This also fixes a leak of the preempt fences allocated in the failed attempt on the existing VF path.Do we need a Fixes: here?
Yeah, should I also split out the leak fix? Feels like a separate change? And do we want a fixes tag also for the new requeue behaviour?
Quoted 2 lines
Also needs a separate reviewer.
I don't think I touched anything other than adding my sob:
Quoted 159 lines
Quoted 159 lines
The userptr invalidation injection state that forces one retry per rebind sequence was a local variable that would be reset by a requeue.
Move it to the vm.Signed-off-by Thomas Hellström <[email protected]>Signed-off-by Matthew Auld <[email protected]>--- drivers/gpu/drm/xe/xe_vm.c | 59 ++++++++++++++++++++++++++---- ---------- drivers/gpu/drm/xe/xe_vm_types.h | 8 ++++++ 2 files changed, 46 insertions(+), 21 deletions(-)drivers/gpu/drm/xe/xe_vm.c +3
-0@@ -542,6 +542,31 @@ void xe_vm_resume_rebind_worker(struct xe_vm *vm) queue_work(vm->xe->ordered_wq, &vm->preempt.rebind_work); } +#if IS_ENABLED (CONFIG_DRM_XE_USERPTR_INVAL_INJECT ) +/* +* Force one retry per rebind sequence. The sequence spans requeues of the
+ * worker, so the state must live in the vm.
+ */drivers/gpu/drm/xe/xe_vm.c +20
-0+static bool xe_vm_rebind_worker_inject_retry (struct xe_vm *vm) +{ +return !vm->preempt.inval_inject_tries++; +} + +static void xe_vm_rebind_worker_reset_inject (struct xe_vm *vm) +{ + vm->preempt.inval_inject_tries =0 ; +} +#else +static bool xe_vm_rebind_worker_inject_retry (struct xe_vm *vm) +{ +return false; +} + +static void xe_vm_rebind_worker_reset_inject (struct xe_vm *vm) +{ +} +#endif + static void preempt_rebind_work_func(struct work_struct *w) { struct xe_vm *vm = container_of(w, struct xe_vm,preempt.rebind_work);
drivers/gpu/drm/xe/xe_vm.c +0
-1@@ -551,7 +576,6 @@ static void preempt_rebind_work_func(struct work_struct *w) LIST_HEAD(preempt_fences); int err = 0; long wait; -int __maybe_unused tries =0 ; xe_assert(vm->xe, xe_vm_in_preempt_fence_mode(vm));
trace_xe_vm_rebind_worker_enter(vm);drivers/gpu/drm/xe/xe_vm.c +0
-1@@ -564,7 +588,6 @@ static void preempt_rebind_work_func(struct work_struct *w) return; } -retry: if (!try_wait_for_completion(&vm->xe->pm_block) &&vm_suspend_rebind_worker (vm)) {
up_write(&vm->lock);
/* We don't actually block but don't make progress.
*/drivers/gpu/drm/xe/xe_vm.c +2
-8@@ -614,20 +637,14 @@ static void preempt_rebind_work_func(struct work_struct *w) goto out_unlock; } -#define retry_required (__tries, __vm) \ - (IS_ENABLED(CONFIG_DRM_XE_USERPTR_INVAL_INJECT) ? \ - (!(__tries)++ || __xe_vm_userptr_needs_repin(__vm)) : \ - __xe_vm_userptr_needs_repin(__vm)) - xe_svm_notifier_lock(vm); -if (retry_required (tries, vm)) { +if (xe_vm_rebind_worker_inject_retry (vm) || + __xe_vm_userptr_needs_repin(vm)) { xe_svm_notifier_unlock(vm); err = -EAGAIN; goto out_unlock; } -#undef retry_required - xe_vm_bump_lru(vm, &exec);/* Point of no return. */
drivers/gpu/drm/xe/xe_vm.c +0
-1@@ -642,20 +659,20 @@ static void preempt_rebind_work_func(struct work_struct *w) trace_xe_vm_rebind_worker_retry(vm); /* -* We can't block in workers on a VF which supports migration
drivers/gpu/drm/xe/xe_vm.c +0
-1-* given this can block the VF post-migration workers from
drivers/gpu/drm/xe/xe_vm.c +1
-1-* getting scheduled. +* Drop all locks and requeue rather than retrying in-line.
drivers/gpu/drm/xe/xe_vm.c +2
-0+* This avoids blocking other work items, such as VF +* post-migration workers, and lets other users of the vm
drivers/gpu/drm/xe/xe_vm.c +8
-8+* lock make progress between attempts. */ -if (IS_SRIOV_VF (vm->xe) && - xe_sriov_vf_migration_supported(vm->xe)) { -up_write (&vm->lock); -xe_vm_queue_rebind_worker (vm); -return ; - } - - goto retry; +up_write (&vm->lock); +free_preempt_fences (&preempt_fences); +xe_vm_queue_rebind_worker (vm); +trace_xe_vm_rebind_worker_exit (vm); +return ; } +xe_vm_rebind_worker_reset_inject (vm); + if (err) { drm_warn(&vm->xe->drm, "VM worker error: %d\n",err);
xe_vm_kill(vm, true);drivers/gpu/drm/xe/xe_vm_types.h +3
-0@@ -350,6 +350,14 @@ struct xe_vm {* kicked on resume. */ struct list_head pm_activate_link; +#if IS_ENABLED (CONFIG_DRM_XE_USERPTR_INVAL_INJECT ) +/** +* @inval_inject_tries: Number of rebind attempts in the
drivers/gpu/drm/xe/xe_vm_types.h +1
-0+* current rebind sequence. Used to force a retry for testing.
drivers/gpu/drm/xe/xe_vm_types.h +4
-0+* Protected by @lock. +*/ +unsigned int inval_inject_tries; +#endif } preempt; /** @exec_queues: Manages list of exec queues attached tothis VM, protected by lock. */
Thomas Hellström
maintainerRe: [PATCH 2/5] drm/xe: Requeue the rebind worker instead of retrying in-line on -EAGAIN
Quoted 25 lines · Matthew Auld
Quoted 24 lines · Thomas Hellström
Quoted 22 lines · Matthew Auld
From: Thomas Hellström <[email protected]>
When the preempt rebind worker needs to retry, it currently jumps back
and keeps holdingvm->lockin write mode across the retry. Only VFs
with migration support drop the lock and requeue the worker.Holding the vm lock across retries needlessly blocks other users of
the
lock and other work on the ordered workqueue, and makes the retry unfit
for conditions that may last for a while, like repeatedly invalidated
userptrs.Always drop the vm lock and requeue the worker on
-EAGAIN. This also
fixes a leak of the preempt fences allocated in the failed attempt on
the existing VF path.
Quoted 4 lines
Quoted 1 line
Do we need a Fixes: here?
Yeah, should I also split out the leak fix? Feels like a separate change?
Yes please do.
Quoted 1 line
And do we want a fixes tag also for the new requeue behaviour?
Hm. You mean if we want to backport the whole series to fix the timeout?
/Thomas
Quoted 181 lines
Quoted 3 lines
Also needs a separate reviewer.
I don't think I touched anything other than adding my sob:
Reviewed-by Matthew Auld <[email protected]>Quoted 173 lines
Quoted 173 lines
The userptr invalidation injection state that forces one retry per
rebind sequence was a local variable that would be reset by a requeue.
Move it to the vm.Signed-off-by: Thomas Hellström
<[email protected]>Signed-off-by Matthew Auld <[email protected]>---
drivers/gpu/drm/xe/xe_vm.c | 59
++++++++++++++++++++++++++----
----------
drivers/gpu/drm/xe/xe_vm_types.h | 8 ++++++2 files changed, 46 insertions(+), 21 deletions(-)drivers/gpu/drm/xe/xe_vm.c +0
-0@@ -542,6 +542,31 @@ void xe_vm_resume_rebind_worker(struct xe_vm *vm)queue_work(vm->xe->ordered_wq, &vm-
Quoted 1 line
preempt.rebind_work);
}
drivers/gpu/drm/xe/xe_vm.c +3
-0+#if IS_ENABLED (CONFIG_DRM_XE_USERPTR_INVAL_INJECT ) +/* +* Force one retry per rebind sequence. The sequence spans requeues
of the
+ * worker, so the state must live in the vm.
+ */drivers/gpu/drm/xe/xe_vm.c +20
-0+static bool xe_vm_rebind_worker_inject_retry (struct xe_vm *vm) +{ +return !vm->preempt.inval_inject_tries++; +} + +static void xe_vm_rebind_worker_reset_inject (struct xe_vm *vm) +{ + vm->preempt.inval_inject_tries =0 ; +} +#else +static bool xe_vm_rebind_worker_inject_retry (struct xe_vm *vm) +{ +return false; +} + +static void xe_vm_rebind_worker_reset_inject (struct xe_vm *vm) +{ +} +#endif +static void
preempt_rebind_work_func(struct work_struct *w){
structxe_vm*vm =container_of(w, struct xe_vm, preempt.rebind_work);drivers/gpu/drm/xe/xe_vm.c +0
-1@@ -551,7 +576,6 @@ static void preempt_rebind_work_func(struct work_struct *w) LIST_HEAD(preempt_fences); int err = 0; long wait; -int __maybe_unused tries =0 ;
xe_assert(vm->xe, xe_vm_in_preempt_fence_mode(vm));trace_xe_vm_rebind_worker_enter(vm);drivers/gpu/drm/xe/xe_vm.c +0
-0@@ -564,7 +588,6 @@ static void preempt_rebind_work_func(struct work_struct *w) return; }
-retry:
if (!try_wait_for_completion(&vm->xe->pm_block) &&vm_suspend_rebind_worker(vm)) {up_write(&vm->lock);
/* We don't actually block but don't make progress.
*/drivers/gpu/drm/xe/xe_vm.c +0
-0@@ -614,20 +637,14 @@ static void preempt_rebind_work_func(struct work_struct *w) goto out_unlock; }drivers/gpu/drm/xe/xe_vm.c +0
-5-#define retry_required (__tries, __vm) \ - (IS_ENABLED(CONFIG_DRM_XE_USERPTR_INVAL_INJECT) ? \ - (!(__tries)++ || __xe_vm_userptr_needs_repin(__vm)) : \ - __xe_vm_userptr_needs_repin(__vm)) -
xe_svm_notifier_lock(vm);drivers/gpu/drm/xe/xe_vm.c +2
-1-if (retry_required (tries, vm)) { +if (xe_vm_rebind_worker_inject_retry (vm) || + __xe_vm_userptr_needs_repin(vm)) {
xe_svm_notifier_unlock(vm);
err =-EAGAIN;
gotoout_unlock;
}drivers/gpu/drm/xe/xe_vm.c +0
-2-#undef retry_required -
xe_vm_bump_lru(vm, &exec);
/* Point of no return. */drivers/gpu/drm/xe/xe_vm.c +0
-0@@ -642,20 +659,20 @@ static void preempt_rebind_work_func(struct work_struct *w) trace_xe_vm_rebind_worker_retry(vm);
/*drivers/gpu/drm/xe/xe_vm.c +0
-1-* We can't block in workers on a VF which supports
migrationdrivers/gpu/drm/xe/xe_vm.c +0
-1-* given this can block the VF post-migration workers from
drivers/gpu/drm/xe/xe_vm.c +1
-1-* getting scheduled. +* Drop all locks and requeue rather than retrying
in-line.drivers/gpu/drm/xe/xe_vm.c +1
-0+* This avoids blocking other work items, such as VF
drivers/gpu/drm/xe/xe_vm.c +1
-0+* post-migration workers, and lets other users of
the vmdrivers/gpu/drm/xe/xe_vm.c +1
-0+* lock make progress between attempts. */
drivers/gpu/drm/xe/xe_vm.c +5
-8-if (IS_SRIOV_VF (vm->xe) && - xe_sriov_vf_migration_supported(vm->xe)) { -up_write (&vm->lock); -xe_vm_queue_rebind_worker (vm); -return ; - } - - goto retry; +up_write (&vm->lock); +free_preempt_fences (&preempt_fences); +xe_vm_queue_rebind_worker (vm); +trace_xe_vm_rebind_worker_exit (vm); +return ;}
drivers/gpu/drm/xe/xe_vm.c +2
-0+xe_vm_rebind_worker_reset_inject (vm); +if (err) {
drm_warn(&vm->xe->drm, "VM worker error: %d\n", err);
xe_vm_kill(vm, true);drivers/gpu/drm/xe/xe_vm_types.h +3
-0@@ -350,6 +350,14 @@ struct xe_vm {* kicked on resume. */ struct list_head pm_activate_link; +#if IS_ENABLED (CONFIG_DRM_XE_USERPTR_INVAL_INJECT ) +/** +* @inval_inject_tries: Number of rebind attempts in
thedrivers/gpu/drm/xe/xe_vm_types.h +1
-0+* current rebind sequence. Used to force a retry
for testing.drivers/gpu/drm/xe/xe_vm_types.h +4
-0+* Protected by @lock. +*/ +unsigned int inval_inject_tries; +#endif } preempt;
/** @exec_queues: Manages list of exec queues attached to
this VM, protected by lock. */
Re: [PATCH 2/5] drm/xe: Requeue the rebind worker instead of retrying in-line on -EAGAIN
Quoted 31 lines · Thomas Hellström
Quoted 25 lines · Matthew Auld
Quoted 24 lines · Thomas Hellström
Quoted 22 lines · Matthew Auld
From: Thomas Hellström <[email protected]>
When the preempt rebind worker needs to retry, it currently jumps back
and keeps holdingvm->lockin write mode across the retry. Only VFs
with migration support drop the lock and requeue the worker.Holding the vm lock across retries needlessly blocks other users of
the
lock and other work on the ordered workqueue, and makes the retry unfit
for conditions that may last for a while, like repeatedly invalidated
userptrs.Always drop the vm lock and requeue the worker on
-EAGAIN. This also
fixes a leak of the preempt fences allocated in the failed attempt on
the existing VF path.Quoted 4 lines
Quoted 1 line
Do we need a Fixes: here?
Yeah, should I also split out the leak fix? Feels like a separate change?
Quoted 6 lines
Yes please do.
Quoted 1 line
And do we want a fixes tag also for the new requeue behaviour?
Hm. You mean if we want to backport the whole series to fix the timeout?
Just for the requeue patch here, I wasn't sure if you meant to also consider that as a fixes or not, or just a fixes for the leak angle (once split out). I assume we don't want to backport the entire series here?
Quoted 185 lines
/Thomas
Quoted 181 lines
Quoted 3 lines
Also needs a separate reviewer.
I don't think I touched anything other than adding my sob:
Reviewed-by Matthew Auld <[email protected]>Quoted 173 lines
Quoted 173 lines
The userptr invalidation injection state that forces one retry per
rebind sequence was a local variable that would be reset by a requeue.
Move it to the vm.Signed-off-by: Thomas Hellström
<[email protected]>Signed-off-by Matthew Auld <[email protected]>--- drivers/gpu/drm/xe/xe_vm.c | 59 ++++++++++++++++++++++++++---- ---------- drivers/gpu/drm/xe/xe_vm_types.h | 8 ++++++ 2 files changed, 46 insertions(+), 21 deletions(-)drivers/gpu/drm/xe/xe_vm.c +3
-0@@ -542,6 +542,31 @@ void xe_vm_resume_rebind_worker(struct xe_vm *vm) queue_work(vm->xe->ordered_wq, &vm- > preempt.rebind_work); } +#if IS_ENABLED (CONFIG_DRM_XE_USERPTR_INVAL_INJECT ) +/* +* Force one retry per rebind sequence. The sequence spans requeues
of the
+ * worker, so the state must live in the vm.
+ */drivers/gpu/drm/xe/xe_vm.c +20
-0+static bool xe_vm_rebind_worker_inject_retry (struct xe_vm *vm) +{ +return !vm->preempt.inval_inject_tries++; +} + +static void xe_vm_rebind_worker_reset_inject (struct xe_vm *vm) +{ + vm->preempt.inval_inject_tries =0 ; +} +#else +static bool xe_vm_rebind_worker_inject_retry (struct xe_vm *vm) +{ +return false; +} + +static void xe_vm_rebind_worker_reset_inject (struct xe_vm *vm) +{ +} +#endif + static void preempt_rebind_work_func(struct work_struct *w) { struct xe_vm *vm = container_of(w, struct xe_vm,preempt.rebind_work);
drivers/gpu/drm/xe/xe_vm.c +0
-1@@ -551,7 +576,6 @@ static void preempt_rebind_work_func(struct work_struct *w) LIST_HEAD(preempt_fences); int err = 0; long wait; -int __maybe_unused tries =0 ; xe_assert(vm->xe, xe_vm_in_preempt_fence_mode(vm));
trace_xe_vm_rebind_worker_enter(vm);drivers/gpu/drm/xe/xe_vm.c +0
-1@@ -564,7 +588,6 @@ static void preempt_rebind_work_func(struct work_struct *w) return; } -retry: if (!try_wait_for_completion(&vm->xe->pm_block) &&vm_suspend_rebind_worker (vm)) {
up_write(&vm->lock);
/* We don't actually block but don't make
progress.
*/drivers/gpu/drm/xe/xe_vm.c +2
-8@@ -614,20 +637,14 @@ static void preempt_rebind_work_func(struct work_struct *w) goto out_unlock; } -#define retry_required (__tries, __vm) \ - (IS_ENABLED(CONFIG_DRM_XE_USERPTR_INVAL_INJECT) ? \ - (!(__tries)++ || __xe_vm_userptr_needs_repin(__vm)) : \ - __xe_vm_userptr_needs_repin(__vm)) - xe_svm_notifier_lock(vm); -if (retry_required (tries, vm)) { +if (xe_vm_rebind_worker_inject_retry (vm) || + __xe_vm_userptr_needs_repin(vm)) { xe_svm_notifier_unlock(vm); err = -EAGAIN; goto out_unlock; } -#undef retry_required - xe_vm_bump_lru(vm, &exec);/* Point of no return. */
drivers/gpu/drm/xe/xe_vm.c +0
-1@@ -642,20 +659,20 @@ static void preempt_rebind_work_func(struct work_struct *w) trace_xe_vm_rebind_worker_retry(vm); /* -* We can't block in workers on a VF which supports
migrationdrivers/gpu/drm/xe/xe_vm.c +0
-1-* given this can block the VF post-migration workers from
drivers/gpu/drm/xe/xe_vm.c +1
-1-* getting scheduled. +* Drop all locks and requeue rather than retrying
in-line.drivers/gpu/drm/xe/xe_vm.c +1
-0+* This avoids blocking other work items, such as VF
drivers/gpu/drm/xe/xe_vm.c +1
-0+* post-migration workers, and lets other users of
the vmdrivers/gpu/drm/xe/xe_vm.c +8
-8+* lock make progress between attempts. */ -if (IS_SRIOV_VF (vm->xe) && - xe_sriov_vf_migration_supported(vm->xe)) { -up_write (&vm->lock); -xe_vm_queue_rebind_worker (vm); -return ; - } - - goto retry; +up_write (&vm->lock); +free_preempt_fences (&preempt_fences); +xe_vm_queue_rebind_worker (vm); +trace_xe_vm_rebind_worker_exit (vm); +return ; } +xe_vm_rebind_worker_reset_inject (vm); + if (err) { drm_warn(&vm->xe->drm, "VM worker error: %d\n",err);
xe_vm_kill(vm, true);drivers/gpu/drm/xe/xe_vm_types.h +3
-0@@ -350,6 +350,14 @@ struct xe_vm {* kicked on resume. */ struct list_head pm_activate_link; +#if IS_ENABLED (CONFIG_DRM_XE_USERPTR_INVAL_INJECT ) +/** +* @inval_inject_tries: Number of rebind attempts in
thedrivers/gpu/drm/xe/xe_vm_types.h +1
-0+* current rebind sequence. Used to force a retry
for testing.drivers/gpu/drm/xe/xe_vm_types.h +4
-0+* Protected by @lock. +*/ +unsigned int inval_inject_tries; +#endif } preempt; /** @exec_queues: Manages list of exec queues attachedto
this VM, protected by lock. */
Re: [PATCH 2/5] drm/xe: Requeue the rebind worker instead of retrying in-line on -EAGAIN
In reply to Matthew AuldQuoted 15 lines · Matthew Auld
From: Thomas Hellström <[email protected]>
When the preempt rebind worker needs to retry, it currently jumps back and keeps holding
vm->lockin write mode across the retry. Only VFs with migration support drop the lock and requeue the worker.Holding the vm lock across retries needlessly blocks other users of the lock and other work on the ordered workqueue, and makes the retry unfit for conditions that may last for a while, like repeatedly invalidated userptrs.
Always drop the vm lock and requeue the worker on
-EAGAIN. This also fixes a leak of the preempt fences allocated in the failed attempt on the existing VF path.
Quoted 6 lines
The userptr invalidation injection state that forces one retry per rebind sequence was a local variable that would be reset by a requeue. Move it to the vm.
Signed-off-by Thomas Hellström <[email protected]>Signed-off-by Matthew Auld <[email protected]>
LGTM
Quoted 132 lines
--- drivers/gpu/drm/xe/xe_vm.c | 59 ++++++++++++++++++++++++++-------------- drivers/gpu/drm/xe/xe_vm_types.h | 8 ++++++ 2 files changed, 46 insertions(+), 21 deletions(-)drivers/gpu/drm/xe/xe_vm.c +38
-21@@ -542,6 +542,31 @@ void xe_vm_resume_rebind_worker(struct xe_vm *vm)queue_work (vm->xe->ordered_wq, &vm->preempt.rebind_work); } +#if IS_ENABLED (CONFIG_DRM_XE_USERPTR_INVAL_INJECT ) +/* +* Force one retry per rebind sequence. The sequence spans requeues of the +* worker, so the state must live in the vm. +*/ +static bool xe_vm_rebind_worker_inject_retry (struct xe_vm *vm) +{ +return !vm->preempt.inval_inject_tries++; +} + +static void xe_vm_rebind_worker_reset_inject (struct xe_vm *vm) +{ + vm->preempt.inval_inject_tries =0 ; +} +#else +static bool xe_vm_rebind_worker_inject_retry (struct xe_vm *vm) +{ +return false; +} + +static void xe_vm_rebind_worker_reset_inject (struct xe_vm *vm) +{ +} +#endif +static void preempt_rebind_work_func (struct work_struct *w) { struct xe_vm *vm = container_of(w, struct xe_vm, preempt.rebind_work);@@ -551,7 +576,6 @@ static void preempt_rebind_work_func(struct work_struct *w)LIST_HEAD (preempt_fences);int err =0 ;long wait; -int __maybe_unused tries =0 ;xe_assert (vm->xe,xe_vm_in_preempt_fence_mode (vm));trace_xe_vm_rebind_worker_enter (vm);@@ -564,7 +588,6 @@ static void preempt_rebind_work_func(struct work_struct *w)return ; } -retry:if (!try_wait_for_completion (&vm->xe->pm_block) &&vm_suspend_rebind_worker (vm)) {up_write (&vm->lock);/* We don't actually block but don't make progress. */ @@ -614,20 +637,14 @@ static void preempt_rebind_work_func(struct work_struct *w) goto out_unlock; } -#define retry_required (__tries, __vm) \ - (IS_ENABLED(CONFIG_DRM_XE_USERPTR_INVAL_INJECT) ? \ - (!(__tries)++ || __xe_vm_userptr_needs_repin(__vm)) : \ - __xe_vm_userptr_needs_repin(__vm)) -xe_svm_notifier_lock (vm); -if (retry_required (tries, vm)) { +if (xe_vm_rebind_worker_inject_retry (vm) || +__xe_vm_userptr_needs_repin (vm)) {xe_svm_notifier_unlock (vm); err = -EAGAIN ; goto out_unlock; } -#undef retry_required -xe_vm_bump_lru (vm, &exec);/* Point of no return. */ @@ -642,20 +659,20 @@ static void preempt_rebind_work_func(struct work_struct *w)trace_xe_vm_rebind_worker_retry (vm);/* -* We can't block in workers on a VF which supports migration -* given this can block the VF post-migration workers from -* getting scheduled. +* Drop all locks and requeue rather than retrying in-line. +* This avoids blocking other work items, such as VF +* post-migration workers, and lets other users of the vm +* lock make progress between attempts. */ -if (IS_SRIOV_VF (vm->xe) && -xe_sriov_vf_migration_supported (vm->xe)) { -up_write (&vm->lock); -xe_vm_queue_rebind_worker (vm); -return ; - } - - goto retry; +up_write (&vm->lock); +free_preempt_fences (&preempt_fences); +xe_vm_queue_rebind_worker (vm); +trace_xe_vm_rebind_worker_exit (vm); +return ; } +xe_vm_rebind_worker_reset_inject (vm); +if (err) {drm_warn (&vm->xe->drm,"VM worker error: %d\n" , err);xe_vm_kill (vm, true);drivers/gpu/drm/xe/xe_vm_types.h +8
-0@@ -350,6 +350,14 @@ struct xe_vm {* kicked on resume. */ struct list_head pm_activate_link; +#if IS_ENABLED (CONFIG_DRM_XE_USERPTR_INVAL_INJECT ) +/** +* @inval_inject_tries: Number of rebind attempts in the +* current rebind sequence. Used to force a retry for testing. +* Protected by @lock. +*/ +unsigned int inval_inject_tries; +#endif } preempt;/** @exec_queues: Manages list of exec queues attached to this VM, protected by lock. */
PATCH 3/5 drm/xe: Add a userptr repin timeout sysfs attribute
In reply to Matthew AuldFrom: Thomas Hellström <[email protected]>
Add a per-device sysfs attribute, userptr_repin_timeout_ms, to be used to bound the overall time a userptr repin is retried when the CPU mappings keep changing during the repin. The default is 100000 ms and zero means retry indefinitely. The value can be changed at any time and is read each time the timeout is checked.
v2 (Matt):
- Reject values above INT_MAX (or reaching MAX_JIFFY_OFFSET) with -EINVAL in userptr_repin_timeout_ms_store() so msecs_to_jiffies() does not treat them as an infinite timeout.
--- drivers/gpu/drm/xe/xe_device.c | 2 ++ drivers/gpu/drm/xe/xe_device.h | 2 ++ drivers/gpu/drm/xe/xe_device_sysfs.c | 56 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/xe/xe_device_types.h | 8 ++++++ 4 files changed, 68 insertions(+)
drivers/gpu/drm/xe/xe_device.c +2 -0
@@ -437,6 +437,8 @@ struct xe_device *xe_device_create(struct pci_dev *pdev)if (err)return ERR_PTR (err); + xe->userptr_repin_timeout_ms =XE_USERPTR_REPIN_TIMEOUT_MS_DEFAULT ; +return xe; }ALLOW_ERROR_INJECTION (xe_device_create,ERRNO );/* See xe_pci_probe() */
drivers/gpu/drm/xe/xe_device.h +2 -0
@@ -43,6 +43,8 @@ static inline struct xe_device *ttm_to_xe_device(struct ttm_device *ttm) return container_of(ttm, struct xe_device, ttm); } +#define XE_USERPTR_REPIN_TIMEOUT_MS_DEFAULT 100000 +struct xe_device *xe_device_create (struct pci_dev *pdev);int xe_device_init_early (struct xe_device *xe);int xe_device_probe_early (struct xe_device *xe);
drivers/gpu/drm/xe/xe_device_sysfs.c +56 -0
81 lines not on this page · raw message
drivers/gpu/drm/xe/xe_device_types.h +8 -0
@@ -437,6 +437,14 @@ struct xe_device {u16 idx[__XE_CACHE_LEVEL_COUNT]; } pat; +/** +* @userptr_repin_timeout_ms: Overall time in milliseconds a userptr +* repin is retried before failing with -EBUSY. Zero means retry +* indefinitely. Accessed with READ_ONCE() / WRITE_ONCE() and tunable +* through sysfs. +*/ +u32 userptr_repin_timeout_ms; +/** @d3cold: Encapsulate d3cold related stuff */ struct {/** @d3cold.capable: Indicates if root port is d3cold capable */
Signature · 1 line
2.56.1
Re: [PATCH 3/5] drm/xe: Add a userptr repin timeout sysfs attribute
Quoted 40 lines · Matthew Auld
From: Thomas Hellström <[email protected]>
Add a per-device sysfs attribute,
userptr_repin_timeout_ms, to be used to bound the overall time a userptr repin is retried when the CPU mappings keep changing during the repin. The default is 100000 ms and zero means retry indefinitely. The value can be changed at any time and is read each time the timeout is checked.v2 (Matt):
- Reject values aboveINT_MAX(or reachingMAX_JIFFY_OFFSET) with-EINVALinuserptr_repin_timeout_ms_store()somsecs_to_jiffies()does not treat them as an infinite timeout.Signed-off-by Thomas Hellström <[email protected]>Signed-off-by Matthew Auld <[email protected]>--- drivers/gpu/drm/xe/xe_device.c | 2 ++ drivers/gpu/drm/xe/xe_device.h | 2 ++ drivers/gpu/drm/xe/xe_device_sysfs.c | 56 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/xe/xe_device_types.h | 8 ++++++ 4 files changed, 68 insertions(+)drivers/gpu/drm/xe/xe_device.c +2
-0@@ -437,6 +437,8 @@ struct xe_device *xe_device_create(struct pci_dev *pdev)if (err)return ERR_PTR (err); + xe->userptr_repin_timeout_ms =XE_USERPTR_REPIN_TIMEOUT_MS_DEFAULT ; +return xe; }ALLOW_ERROR_INJECTION (xe_device_create,ERRNO );/* See xe_pci_probe() */ drivers/gpu/drm/xe/xe_device.h +0
-0
drivers/gpu/drm/xe/xe_device.h static inline struct xe_device *ttm_to_xe_device(struct ttm_device *ttm) · line 46
Quoted 4 lines
drivers/gpu/drm/xe/xe_device.h +1
-0@@ -43,6 +43,8 @@ static inline struct xe_device *ttm_to_xe_device(struct ttm_device *ttm) return container_of(ttm, struct xe_device, ttm); } +#define XE_USERPTR_REPIN_TIMEOUT_MS_DEFAULT 100000h
Isn't the default too high, if device is connected to no numa node host ?
Quoted 113 lines
drivers/gpu/drm/xe/xe_device.h +1
-0+struct xe_device *xe_device_create (struct pci_dev *pdev);int xe_device_init_early (struct xe_device *xe);int xe_device_probe_early (struct xe_device *xe);drivers/gpu/drm/xe/xe_device_sysfs.c +56
-0@@ -4,7 +4,9 @@*/ #include <linux/device.h> +#include <linux/jiffies.h> #include <linux/kobject.h> +#include <linux/limits.h> #include <linux/pci.h> #include <linux/sysfs.h> @@ -38,6 +40,15 @@* reclaimed by the shrinker. Higher values reduce reclaim pressure on * non-purgeable buffer objects. Valid values are 1 to 64. Defaults to * CONFIG_DRM_XE_SHRINKER_NON_PURGEABLE_SEEKS. +* +* userptr_repin_timeout_ms - Report/change the overall time, in +* milliseconds, a userptr repin is retried, with all locks dropped between +* the attempts, when the CPU mappings keep changing during the repin. The +* time is measured from the first repin attempt after an invalidation. When +* it expires the repin fails with -EBUSY. Zero means retry indefinitely. +* Valid values are 0 to INT_MAX (capped by MAX_JIFFY_OFFSET). The value is +* read each time the timeout is checked, so a change takes effect +* immediately. Defaults to 100000. */ static ssize_t@@ -340,6 +351,47 @@ static const struct attribute_group shrinker_attr_group = { .attrs = shrinker_attrs, }; +static ssize_t +userptr_repin_timeout_ms_show (struct device *dev, +struct device_attribute *attr,char *buf) +{ +struct xe_device *xe =pdev_to_xe_device (to_pci_dev (dev)); + +return sysfs_emit (buf,"%u\n" ,READ_ONCE (xe->userptr_repin_timeout_ms)); +} + +static ssize_t +userptr_repin_timeout_ms_store (struct device *dev, +struct device_attribute *attr, +const char *buf,size_t count) +{ +struct xe_device *xe =pdev_to_xe_device (to_pci_dev (dev)); +u32 val; +int ret; + + ret =kstrtou32 (buf,0 , &val); +if (ret) +return ret; + +if (val >INT_MAX ||msecs_to_jiffies (val) >=MAX_JIFFY_OFFSET ) +return -EINVAL ; + +WRITE_ONCE (xe->userptr_repin_timeout_ms, val); + +return count; +} + +static DEVICE_ATTR_RW (userptr_repin_timeout_ms); + +static struct attribute *userptr_attrs[] = { + &dev_attr_userptr_repin_timeout_ms.attr, +NULL +}; + +static const struct attribute_group userptr_attr_group = { + .attrs = userptr_attrs, +}; +int xe_device_sysfs_init (struct xe_device *xe) {struct device *dev = xe->drm.dev;@@ -349,6 +401,10 @@ int xe_device_sysfs_init(struct xe_device *xe)if (ret)return ret; + ret =devm_device_add_group (dev, &userptr_attr_group); +if (ret) +return ret; +if (xe->d3cold.capable) { ret =devm_device_add_group (dev, &vram_attr_group);if (ret)drivers/gpu/drm/xe/xe_device_types.h +8
-0@@ -437,6 +437,14 @@ struct xe_device {u16 idx[__XE_CACHE_LEVEL_COUNT]; } pat; +/** +* @userptr_repin_timeout_ms: Overall time in milliseconds a userptr +* repin is retried before failing with -EBUSY. Zero means retry +* indefinitely. Accessed with READ_ONCE() / WRITE_ONCE() and tunable +* through sysfs. +*/ +u32 userptr_repin_timeout_ms; +/** @d3cold: Encapsulate d3cold related stuff */ struct {/** @d3cold.capable: Indicates if root port is d3cold capable */
Re: [PATCH 3/5] drm/xe: Add a userptr repin timeout sysfs attribute
Quoted 41 lines · Himal prasad Ghimiray
Quoted 39 lines · Matthew Auld
From: Thomas Hellström <[email protected]>
Add a per-device sysfs attribute,
userptr_repin_timeout_ms, to be used to bound the overall time a userptr repin is retried when the CPU mappings keep changing during the repin. The default is 100000 ms and zero means retry indefinitely. The value can be changed at any time and is read each time the timeout is checked.v2 (Matt):
- Reject values aboveINT_MAX(or reachingMAX_JIFFY_OFFSET) with-EINVALinuserptr_repin_timeout_ms_store()somsecs_to_jiffies()does not treat them as an infinite timeout.Signed-off-by Thomas Hellström <[email protected]>Signed-off-by Matthew Auld <[email protected]>---
drivers/gpu/drm/xe/xe_device.c | 2 ++ drivers/gpu/drm/xe/xe_device.h | 2 ++drivers/gpu/drm/xe/xe_device_sysfs.c| 56 ++++++++++++++++++++++++++
++++++++++
drivers/gpu/drm/xe/xe_device_types.h| 8 ++++++4 files changed, 68 insertions(+)drivers/gpu/drm/xe/xe_device.c +2
-0@@ -437,6 +437,8 @@ struct xe_device *xe_device_create(struct pci_dev *pdev) if (err) return ERR_PTR(err); + xe->userptr_repin_timeout_ms = XE_USERPTR_REPIN_TIMEOUT_MS_DEFAULT; + return xe; }
ALLOW_ERROR_INJECTION(xe_device_create, ERRNO); /* Seexe_pci_probe()*/drivers/gpu/drm/xe/ xe_device.h renamed from drivers/gpu/drm/xe/xe_device.h +0
-1--- a/drivers/gpu/drm/xe/xe_device.h
Quoted 8 lines
drivers/gpu/drm/xe/ xe_device.h static inline struct xe_device · line 46
Quoted 6 lines
+++
b/drivers/gpu/drm/xe/xe_device.hdrivers/gpu/drm/xe/ xe_device.h renamed from drivers/gpu/drm/xe/xe_device.h +1
-0@@ -43,6 +43,8 @@ static inline struct xe_device *ttm_to_xe_device(struct ttm_device *ttm) return container_of(ttm, struct xe_device, ttm); } +#define XE_USERPTR_REPIN_TIMEOUT_MS_DEFAULT 100000hIsn't the default too high, if device is connected to no numa node host ?
We could lower this to 30s? That should still be more than enough, I would hope. Also, maybe we can have two different timeouts for NUMA vs non-NUMA?
So what about:
#define XE_USERPTR_REPIN_TIMEOUT_MS_DEFAULT 10000
#define XE_USERPTR_REPIN_TIMEOUT_MS_NUMA_DEFAULT 30000
And then:
xe->userptr_repin_timeout_ms = num_online_nodes() > 1 ?
XE_USERPTR_REPIN_TIMEOUT_MS_NUMA_DEFAULT :
XE_USERPTR_REPIN_TIMEOUT_MS_DEFAULT;Quoted 116 lines
Quoted 116 lines
drivers/gpu/drm/xe/ xe_device.h renamed from drivers/gpu/drm/xe/xe_device.h +1
-0+ struct xe_device *xe_device_create(struct pci_dev *pdev); int xe_device_init_early(struct xe_device *xe); int xe_device_probe_early(struct xe_device *xe);drivers/gpu/drm/xe/xe_device_sysfs.c +5
-0@@ -4,7 +4,9 @@*/ #include <linux/device.h> +#include <linux/jiffies.h> #include <linux/kobject.h> +#include <linux/limits.h> #include <linux/pci.h> #include <linux/sysfs.h>@@ -38,6 +40,15 @@ * reclaimed by the shrinker. Higher values reduce reclaim pressure on * non-purgeable buffer objects. Valid values are 1 to 64. Defaults to * CONFIG_DRM_XE_SHRINKER_NON_PURGEABLE_SEEKS. + * + * userptr_repin_timeout_ms - Report/change the overall time, in + * milliseconds, a userptr repin is retried, with all locks droppedbetween
+ * the attempts, when the CPU mappings keep changing during the repin. The
+ * time is measured from the first repin attempt after an invalidation. When
+ * it expires the repin fails with-EBUSY. Zero means retry indefinitely.
+ * Valid values are 0 toINT_MAX(capped byMAX_JIFFY_OFFSET). The value is
+ * read each time the timeout is checked, so a change takes effect
+ * immediately. Defaults to 100000.
*/
staticssize_tdrivers/gpu/drm/xe/xe_device_sysfs.c +41
-0@@ -340,6 +351,47 @@ static const struct attribute_group shrinker_attr_group = { .attrs = shrinker_attrs, }; +static ssize_t +userptr_repin_timeout_ms_show (struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct xe_device *xe = pdev_to_xe_device(to_pci_dev(dev)); + + return sysfs_emit(buf, "%u\n", READ_ONCE(xe- >userptr_repin_timeout_ms)); +} + +static ssize_t +userptr_repin_timeout_ms_store (struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct xe_device *xe = pdev_to_xe_device(to_pci_dev(dev)); + u32 val; + int ret; + + ret = kstrtou32(buf, 0, &val); + if (ret) + return ret; + + if (val > INT_MAX || msecs_to_jiffies(val) >= MAX_JIFFY_OFFSET) + return -EINVAL; + + WRITE_ONCE(xe->userptr_repin_timeout_ms, val); + + return count; +} + +static DEVICE_ATTR_RW (userptr_repin_timeout_ms); + +static struct attribute *userptr_attrs[] = { + &dev_attr_userptr_repin_timeout_ms.attr, + NULL +}; + +static const struct attribute_group userptr_attr_group = { + .attrs = userptr_attrs, +}; + int xe_device_sysfs_init(struct xe_device *xe) {struct device *dev =
xe->drm.dev;drivers/gpu/drm/xe/xe_device_sysfs.c +4
-0@@ -349,6 +401,10 @@ int xe_device_sysfs_init(struct xe_device *xe) if (ret) return ret; + ret = devm_device_add_group(dev, &userptr_attr_group); + if (ret) + return ret; + if (xe->d3cold.capable) { ret = devm_device_add_group(dev, &vram_attr_group); if (ret)drivers/gpu/drm/xe/xe_device_types.h +4
-0@@ -437,6 +437,14 @@ struct xe_device { u16 idx[__XE_CACHE_LEVEL_COUNT]; } pat; + /** +* @userptr_repin_timeout_ms: Overall time in milliseconds a userptr +* repin is retried before failing with -EBUSY. Zero means retry +* indefinitely. Accessed with READ_ONCE() / WRITE_ONCE() and tunable
+ * through sysfs.
+ */
+ u32userptr_repin_timeout_ms;
+
/** @d3cold: Encapsulate d3cold related stuff */
struct {
/** @d3cold.capable: Indicates if root port is d3cold capable */
Re: [PATCH 3/5] drm/xe: Add a userptr repin timeout sysfs attribute
Quoted 52 lines · Matthew Auld
Quoted 42 lines · Himal prasad Ghimiray
Quoted 40 lines · Matthew Auld
From: Thomas Hellström <[email protected]>
Add a per-device sysfs attribute,
userptr_repin_timeout_ms, to be used to bound the overall time a userptr repin is retried when the CPU mappings keep changing during the repin. The default is 100000 ms and zero means retry indefinitely. The value can be changed at any time and is read each time the timeout is checked.v2 (Matt):
- Reject values aboveINT_MAX(or reachingMAX_JIFFY_OFFSET) with-EINVALinuserptr_repin_timeout_ms_store()somsecs_to_jiffies()does not treat them as an infinite timeout.Signed-off-by Thomas Hellström <[email protected]>Signed-off-by Matthew Auld <[email protected]>---
drivers/gpu/drm/xe/xe_device.c | 2 ++ drivers/gpu/drm/xe/xe_device.h | 2 ++drivers/gpu/drm/xe/xe_device_sysfs.c| 56 ++++++++++++++++++++++++++ ++++++++++drivers/gpu/drm/xe/xe_device_types.h| 8 ++++++4 files changed, 68 insertions(+)drivers/gpu/drm/xe/xe_device.c +2
-0@@ -437,6 +437,8 @@ struct xe_device *xe_device_create(struct pci_dev *pdev) if (err) return ERR_PTR(err); + xe->userptr_repin_timeout_ms = XE_USERPTR_REPIN_TIMEOUT_MS_DEFAULT; + return xe; }
ALLOW_ERROR_INJECTION(xe_device_create, ERRNO); /* Seexe_pci_probe()*/drivers/gpu/drm/xe/ xe_device.h renamed from drivers/gpu/drm/xe/xe_device.h +0
-1--- a/drivers/gpu/drm/xe/xe_device.hQuoted 8 lines
drivers/gpu/drm/xe/ xe_device.h static inline struct xe_device · line 46
Quoted 6 lines
+++
b/drivers/gpu/drm/xe/xe_device.hdrivers/gpu/drm/xe/ xe_device.h renamed from drivers/gpu/drm/xe/xe_device.h +1
-0@@ -43,6 +43,8 @@ static inline struct xe_device *ttm_to_xe_device(struct ttm_device *ttm) return container_of(ttm, struct xe_device, ttm); } +#define XE_USERPTR_REPIN_TIMEOUT_MS_DEFAULT 100000hIsn't the default too high, if device is connected to no numa node host ?
Quoted 1 line
We could lower this to 30s? That should still be more than enough, I would hope. Also, maybe we can have two different timeouts for NUMA vs non-NUMA?
I am aligned on different timeouts for NUMA vs non-NUMA.
Quoted 11 lines
So what about:
#define XE_USERPTR_REPIN_TIMEOUT_MS_DEFAULT 10000 #define XE_USERPTR_REPIN_TIMEOUT_MS_NUMA_DEFAULT 30000
And then:
xe->userptr_repin_timeout_ms=num_online_nodes()> 1 ?XE_USERPTR_REPIN_TIMEOUT_MS_NUMA_DEFAULT:
XE_USERPTR_REPIN_TIMEOUT_MS_DEFAULT;
+1
Quoted 119 lines
Quoted 118 lines
Quoted 118 lines
drivers/gpu/drm/xe/ xe_device.h renamed from drivers/gpu/drm/xe/xe_device.h +1
-0+ struct xe_device *xe_device_create(struct pci_dev *pdev); int xe_device_init_early(struct xe_device *xe); int xe_device_probe_early(struct xe_device *xe);drivers/gpu/drm/xe/xe_device_sysfs.c +5
-0@@ -4,7 +4,9 @@*/ #include <linux/device.h> +#include <linux/jiffies.h> #include <linux/kobject.h> +#include <linux/limits.h> #include <linux/pci.h> #include <linux/sysfs.h>@@ -38,6 +40,15 @@ * reclaimed by the shrinker. Higher values reduce reclaim pressure on * non-purgeable buffer objects. Valid values are 1 to 64. Defaults to * CONFIG_DRM_XE_SHRINKER_NON_PURGEABLE_SEEKS. + * + * userptr_repin_timeout_ms - Report/change the overall time, in + * milliseconds, a userptr repin is retried, with all locks droppedbetween
+ * the attempts, when the CPU mappings keep changing during the repin. The
+ * time is measured from the first repin attempt after an invalidation. When
+ * it expires the repin fails with-EBUSY. Zero means retry indefinitely.
+ * Valid values are 0 toINT_MAX(capped byMAX_JIFFY_OFFSET). The value is
+ * read each time the timeout is checked, so a change takes effect
+ * immediately. Defaults to 100000.
*/
staticssize_tdrivers/gpu/drm/xe/xe_device_sysfs.c +41
-0@@ -340,6 +351,47 @@ static const struct attribute_group shrinker_attr_group = { .attrs = shrinker_attrs, }; +static ssize_t +userptr_repin_timeout_ms_show (struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct xe_device *xe = pdev_to_xe_device(to_pci_dev(dev)); + + return sysfs_emit(buf, "%u\n", READ_ONCE(xe- >userptr_repin_timeout_ms)); +} + +static ssize_t +userptr_repin_timeout_ms_store (struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct xe_device *xe = pdev_to_xe_device(to_pci_dev(dev)); + u32 val; + int ret; + + ret = kstrtou32(buf, 0, &val); + if (ret) + return ret; + + if (val > INT_MAX || msecs_to_jiffies(val) >= MAX_JIFFY_OFFSET) + return -EINVAL; + + WRITE_ONCE(xe->userptr_repin_timeout_ms, val); + + return count; +} + +static DEVICE_ATTR_RW (userptr_repin_timeout_ms); + +static struct attribute *userptr_attrs[] = { + &dev_attr_userptr_repin_timeout_ms.attr, + NULL +}; + +static const struct attribute_group userptr_attr_group = { + .attrs = userptr_attrs, +}; + int xe_device_sysfs_init(struct xe_device *xe) {struct device *dev =
xe->drm.dev;drivers/gpu/drm/xe/xe_device_sysfs.c +4
-0@@ -349,6 +401,10 @@ int xe_device_sysfs_init(struct xe_device *xe) if (ret) return ret; + ret = devm_device_add_group(dev, &userptr_attr_group); + if (ret) + return ret; + if (xe->d3cold.capable) { ret = devm_device_add_group(dev, &vram_attr_group); if (ret)drivers/gpu/drm/xe/xe_device_types.h +2
-0@@ -437,6 +437,14 @@ struct xe_device { u16 idx[__XE_CACHE_LEVEL_COUNT]; } pat; + /** +* @userptr_repin_timeout_ms: Overall time in milliseconds a userptr
+ * repin is retried before failing with-EBUSY. Zero means retry + * indefinitely. Accessed withREAD_ONCE()/WRITE_ONCE()and tunable
+ * through sysfs.
+ */
+ u32userptr_repin_timeout_ms;
+
/** @d3cold: Encapsulate d3cold related stuff */
struct {
/** @d3cold.capable: Indicates if root port is d3cold capable */
PATCH 4/5 drm/xe/userptr: Make the repin retry loop non-fatal
In reply to Matthew AuldFrom: Thomas Hellström <[email protected]>
drm_gpusvm_get_pages() gives up with -EBUSY after a fixed one second budget if the CPU mappings keep changing during the repin. That error was treated as fatal: the rebind worker killed the VM, exec returned it to user-space and the bind ioctl converted it to -ENOMEM.
Instead, time-stamp the first repin attempt of a userptr and, as long as the overall timeout (the userptr_repin_timeout_ms sysfs attribute, read on each check) hasn't expired, translate -EBUSY into -EAGAIN. Discount idle gaps between attempts (for example if the task was stopped via SIGTSTP) so resuming does not immediately trip the timeout. Callers drop all locks and retry:
- exec and the rebind worker already retry on -EAGAIN.
- The bind and madvise ioctls restart from the top with vm->lock dropped. Since new vmas are created on each attempt, they track the overall timeout themselves.
- The pagefault handler repeats the repin.
Only when the overall timeout expires is -EBUSY returned. Drop the -EBUSY to -ENOMEM conversion in new_vma() as -EBUSY now means just that.
v2 (Matt):
- Reset num_ufence at the retry label in xe_vm_bind_ioctl() so user fences are not counted twice across repin retries.
- Handle -EAGAIN from xe_vm_alloc_madvise_vma() in xe_vm_madvise_ioctl() with vm->lock dropped and repin timeout tracking.
- Discount idle gaps longer than XE_USERPTR_REPIN_IDLE_MS between attempts and check signal_pending() / return -ERESTARTSYS in ioctl retry loops so stopping and resuming (e.g. Ctrl-Z) works without immediately timing out.
--- drivers/gpu/drm/xe/xe_exec.c | 9 +++++-- drivers/gpu/drm/xe/xe_pagefault.c | 4 +++ drivers/gpu/drm/xe/xe_userptr.c | 47 ++++++++++++++++++++++++++++----- drivers/gpu/drm/xe/xe_userptr.h | 53 ++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/xe/xe_vm.c | 43 ++++++++++++++++++++++++------- drivers/gpu/drm/xe/xe_vm_madvise.c | 23 ++++++++++++++++- 6 files changed, 159 insertions(+), 20 deletions(-)
drivers/gpu/drm/xe/xe_exec.c +7 -2
@@ -10,6 +10,7 @@#include <drm/drm_file.h> #include <uapi/drm/xe_drm.h> #include <linux/delay.h> +#include <linux/sched/signal.h> #include "xe_device.h" #include "xe_exec_queue.h"
@@ -380,8 +381,12 @@ int xe_exec_ioctl(struct drm_device *dev, void *data, struct drm_file *file)xe_validation_ctx_fini (&ctx); err_unlock_list:up_read (&vm->lock); -if (err == -EAGAIN ) - goto retry; +if (err == -EAGAIN ) { +cond_resched (); +if (!signal_pending (current)) + goto retry; + err = -ERESTARTSYS ; + } err_hw_exec_mode:if (mode ==EXEC_MODE_DMA_FENCE )xe_hw_engine_group_put (group);
drivers/gpu/drm/xe/xe_pagefault.c +4 -0
@@ -191,6 +191,10 @@ static int xe_pagefault_handle_vma(struct xe_gt *gt, struct xe_vma *vma,struct xe_userptr_vma *uvma =to_userptr_vma (vma); err =xe_vma_userptr_pin_pages (uvma); +if (err == -EAGAIN ) { +cond_resched (); +continue ; + }if (err) {xe_pagefault_set_error (pf,XE_PAGEFAULT_ERROR_VMA_USERPTR_PIN );return err;
drivers/gpu/drm/xe/xe_userptr.c +40 -7
65 lines not on this page · raw message
drivers/gpu/drm/xe/xe_userptr.h +53 -0
71 lines not on this page · raw message
drivers/gpu/drm/xe/xe_vm.c +33 -10
94 lines not on this page · raw message
drivers/gpu/drm/xe/xe_vm_madvise.c +22 -1
@@ -6,6 +6,7 @@#include "xe_vm_madvise.h" #include <linux/nospec.h> +#include <linux/sched/signal.h> #include <drm/xe_drm.h> #include "xe_bo.h"
@@ -13,6 +14,7 @@#include "xe_pt.h" #include "xe_svm.h" #include "xe_tlb_inval.h" +#include "xe_userptr.h" #include "xe_vm.h" struct xe_vmas_in_madvise_range {
@@ -592,11 +594,13 @@ int xe_vm_madvise_ioctl(struct drm_device *dev, void *data, struct drm_file *fil .addr = xe_device_uncanonicalize_addr(xe, args->start), .range = args->range, }; +struct xe_userptr_repin repin = {};struct xe_madvise_details details;u16 pat_index, coh_mode;struct xe_vm *vm;struct drm_exec exec;int err, attr_type; +bool repin_again;bool do_retained; vm =xe_vm_lookup (xef, args->vm_id);
@@ -629,6 +633,8 @@ int xe_vm_madvise_ioctl(struct drm_device *dev, void *data, struct drm_file *filxe_svm_flush (vm); +retry: + repin_again = false; err =down_write_killable (&vm->lock);if (err) goto put_vm;
@@ -642,9 +648,12 @@ int xe_vm_madvise_ioctl(struct drm_device *dev, void *data, struct drm_file *filif (err) goto unlock_vm; +xe_userptr_repin_begin (&repin); err =xe_vm_alloc_madvise_vma (vm, madvise_range.addr, args->range); -if (err) +if (err) { + repin_again = err == -EAGAIN ; goto madv_fini; + } err =get_vmas (vm, &madvise_range);if (err || !madvise_range.num_vmas)
@@ -730,6 +739,18 @@ int xe_vm_madvise_ioctl(struct drm_device *dev, void *data, struct drm_file *filxe_madvise_details_fini (&details); unlock_vm:up_write (&vm->lock); +if (repin_again) { +u32 timeout_ms =READ_ONCE (xe->userptr_repin_timeout_ms); + +if (xe_userptr_repin_should_retry (&repin, timeout_ms)) { +cond_resched (); +if (!signal_pending (current)) + goto retry; + err = -ERESTARTSYS ; + }else { + err = -EBUSY ; + } + }/* Write retained value to user after releasing all locks */ if (!err && do_retained)
Signature · 1 line
2.56.1
Thomas Hellström
maintainerRe: [PATCH 4/5] drm/xe/userptr: Make the repin retry loop non-fatal
Quoted 40 lines · Matthew Auld
From: Thomas Hellström <[email protected]>
drm_gpusvm_get_pages()gives up with-EBUSYafter a fixed one second budget if the CPU mappings keep changing during the repin. That error was treated as fatal: the rebind worker killed the VM, exec returned it
to user-space and the bind ioctl converted it to-ENOMEM.Instead, time-stamp the first repin attempt of a userptr and, as long as
the overall timeout (theuserptr_repin_timeout_mssysfs attribute, read
on each check) hasn't expired, translate-EBUSYinto-EAGAIN. Discount
idle gaps between attempts (for example if the task was stopped via SIGTSTP) so resuming does not immediately trip the timeout. Callers drop
all locks and retry:- exec and the rebind worker already retry on
-EAGAIN.
- The bind and madvise ioctls restart from the top withvm->lockdropped. Since new vmas are created on each attempt, they track the overall timeout themselves.
- The pagefault handler repeats the repin.Only when the overall timeout expires is
-EBUSYreturned. Drop the-EBUSYto-ENOMEMconversion innew_vma()as-EBUSYnow means just that.v2 (Matt):
- Resetnum_ufenceat the retry label inxe_vm_bind_ioctl()so user fences are not counted twice across repin retries.
- Handle-EAGAINfromxe_vm_alloc_madvise_vma()inxe_vm_madvise_ioctl()
withvm->lockdropped and repin timeout tracking.
- Discount idle gaps longer thanXE_USERPTR_REPIN_IDLE_MSbetween attempts and checksignal_pending()/ return-ERESTARTSYSin ioctl retry loops so stopping and resuming (e.g. Ctrl-Z) works without immediately timing out.
Quoted 2 lines
Signed-off-by Thomas Hellström <[email protected]>Signed-off-by Matthew Auld <[email protected]>
Might want to add Co-authored-by: on this and other co-authored patches, rather than just SOB?
Quoted 445 lines
---
drivers/gpu/drm/xe/xe_exec.c | 9 +++++-- drivers/gpu/drm/xe/xe_pagefault.c | 4 +++ drivers/gpu/drm/xe/xe_userptr.c | 47
++++++++++++++++++++++++++++-----
drivers/gpu/drm/xe/xe_userptr.h | 53
++++++++++++++++++++++++++++++++++++++
drivers/gpu/drm/xe/xe_vm.c | 43 ++++++++++++++++++++++++----
---
drivers/gpu/drm/xe/xe_vm_madvise.c | 23 ++++++++++++++++-6 files changed, 159 insertions(+), 20 deletions(-)drivers/gpu/drm/xe/xe_exec.c +1
-0@@ -10,6 +10,7 @@ #include <drm/drm_file.h> #include <uapi/drm/xe_drm.h> #include <linux/delay.h> +#include <linux/sched/signal.h>
#include "xe_device.h"
#include "xe_exec_queue.h"drivers/gpu/drm/xe/xe_exec.c +0
-0@@ -380,8 +381,12 @@ int xe_exec_ioctl(struct drm_device *dev, void *data, struct drm_file *file) xe_validation_ctx_fini(&ctx);err_unlock_list:
up_read(&vm->lock);drivers/gpu/drm/xe/xe_exec.c +6
-2-if (err == -EAGAIN ) - goto retry; +if (err == -EAGAIN ) { +cond_resched (); +if (!signal_pending (current)) + goto retry; + err = -ERESTARTSYS ; + }err_hw_exec_mode:
if (mode ==EXEC_MODE_DMA_FENCE)
xe_hw_engine_group_put(group);drivers/gpu/drm/xe/xe_pagefault.c +0
-0@@ -191,6 +191,10 @@ static int xe_pagefault_handle_vma(struct xe_gt *gt, struct xe_vma *vma,struct
xe_userptr_vma*uvma =to_userptr_vma(vma);
err =xe_vma_userptr_pin_pages(uvma);drivers/gpu/drm/xe/xe_pagefault.c +4
-0+if (err == -EAGAIN ) { +cond_resched (); +continue ; + }if (err) {
xe_pagefault_set_error(pf, XE_PAGEFAULT_ERROR_VMA_USERPTR_PIN);
return err;drivers/gpu/drm/xe/xe_userptr.c +0
-0@@ -74,6 +74,23 @@ static bool __xe_vma_userptr_lockdep(struct xe_userptr_vma *uvma) #define xe_vma_userptr_lockdep(uvma) #endif
+/**
+ *xe_vma_userptr_pin_pages()- Pin and map the pages of a userptr vma
+ * @uvma: The userptr vma.
+ *
+ * Pin the pages and set up the dma mappings. If the CPU mappings keep changing
+ * during the repin,drm_gpusvm_get_pages()eventually gives up with-EBUSY.
+ * That is converted to-EAGAINuntil the overall repin timeout, measured from
+ * the first attempt since the last successful repin, expires. The caller is
+ * then expected to drop all locks and retry.
+ *
+ * Context: Eithervm->lockheld in write mode, or in read mode together with
+ * the vma'sfault_lock.
+ *
+ * Return: 0 on success,-EAGAINif the caller should retry with all locks
+ * dropped,-EBUSYif the overall timeout expired, or another negative error
+ * code on failure.
+ */
intxe_vma_userptr_pin_pages(struct xe_userptr_vma *uvma){
structxe_vma*vma =&uvma->vma;drivers/gpu/drm/xe/xe_userptr.c +0
-0@@ -84,19 +101,35 @@ int xe_vma_userptr_pin_pages(struct xe_userptr_vma *uvma).device_private_page_owner =
xe_svm_private_page_owner(vm, false),
.allow_mixed = true,
};drivers/gpu/drm/xe/xe_userptr.c +1
-0+int err;
xe_vma_userptr_lockdep(uvma);
xe_assert(xe, xe_vma_is_userptr(vma));drivers/gpu/drm/xe/xe_userptr.c +2
-1-if (vma->gpuva.flags &XE_VMA_DESTROYED ) +if (vma->gpuva.flags &XE_VMA_DESTROYED ) { + uvma->userptr.repin = (struct xe_userptr_repin ){};return 0;
drivers/gpu/drm/xe/xe_userptr.c +1
-0+ }drivers/gpu/drm/xe/xe_userptr.c +0
-1- return drm_gpusvm_get_pages(&vm->svm.gpusvm, &uvma-Quoted 1 line
userptr.pages, 1,
drivers/gpu/drm/xe/xe_userptr.c +0
-4- uvma->userptr.notifier.mm, - &uvma->userptr.notifier, - xe_vma_userptr(vma), - xe_vma_userptr(vma) +
xe_vma_size(vma),drivers/gpu/drm/xe/xe_userptr.c +3
-1- &ctx); +xe_userptr_repin_begin (&uvma->userptr.repin); + + err = drm_gpusvm_get_pages(&vm->svm.gpusvm, &uvma-Quoted 1 line
userptr.pages, 1,
drivers/gpu/drm/xe/xe_userptr.c +4
-0+ uvma->userptr.notifier.mm, + &uvma->userptr.notifier, + xe_vma_userptr(vma), + xe_vma_userptr(vma) +
xe_vma_size(vma),drivers/gpu/drm/xe/xe_userptr.c +3
-0+ &ctx); +if (err == -EBUSY ) { + u32 timeout_ms = READ_ONCE(xe-Quoted 1 line
userptr_repin_timeout_ms);drivers/gpu/drm/xe/xe_userptr.c +2
-0+ + if (xe_userptr_repin_should_retry(&uvma-Quoted 1 line
userptr.repin,
drivers/gpu/drm/xe/xe_userptr.c +7
-0+ timeout_ms)) +return -EAGAIN ; + } + + uvma->userptr.repin = (struct xe_userptr_repin ){}; + +return err;}
static structmmu_interval_notifier_finish*drivers/gpu/drm/xe/xe_userptr.h +0
-0@@ -6,6 +6,8 @@ #ifndef _XE_USERPTR_H_ #define _XE_USERPTR_H_drivers/gpu/drm/xe/xe_userptr.h +2
-0+#include <linux/hmm.h> +#include <linux/jiffies.h> #include <
linux/list.h>
#include <linux/mutex.h>
#include <linux/notifier.h>drivers/gpu/drm/xe/xe_userptr.h +0
-0@@ -20,6 +22,51 @@ struct xe_vm; struct xe_vma; struct xe_userptr_vma;
+/**
+ * structxe_userptr_repin- Timeout tracking state for userptr repin retries
+ * @start: Timestamp in jiffies of the first repin attempt, adjusted for idle
+ * gaps, or zero if no repin is in progress.
+ * @last: Timestamp in jiffies when the previous attempt failed withdrivers/gpu/drm/xe/xe_userptr.h +9
-1-EBUSY, +* or zero if no retry is pending. +*/ +struct xe_userptr_repin { +unsigned long start; +unsigned long last; +}; + +/* +* If more than XE_USERPTR_REPIN_IDLE_MS elapses between attempts (for example
+ * when the task was stopped via SIGTSTP/Ctrl-Z), discount the idle gap so
+ * waking up does not immediately expire the overall repin timeout.
+ */drivers/gpu/drm/xe/xe_userptr.h +3
-0+#define XE_USERPTR_REPIN_IDLE_MS (5 * HMM_RANGE_DEFAULT_TIMEOUT) + +static inline void xe_userptr_repin_begin(struct xe_userptr_repin*repin)
drivers/gpu/drm/xe/xe_userptr.h +12
-0+{ +unsigned long now = jiffies; + +if (!repin->start) { + repin->start = now ?:1 ; +return ; + } + +if (repin->last && + time_after(now, repin->last + + msecs_to_jiffies(XE_USERPTR_REPIN_IDLE_MS))) + repin->start = (repin->start + (now - repin->last))?: 1;
drivers/gpu/drm/xe/xe_userptr.h +4
-0+ repin->last =0 ; +} + +static inline bool xe_userptr_repin_should_retry(struct
xe_userptr_repin*repin,drivers/gpu/drm/xe/xe_userptr.h +7
-0+ u32 timeout_ms) +{ +unsigned long now = jiffies; + + repin->last = now ?:1 ; +return !timeout_ms || + time_before(now, repin->start +
msecs_to_jiffies(timeout_ms));drivers/gpu/drm/xe/xe_userptr.h +2
-0+} +/** struct
xe_userptr_vm- User pointer VM level state */ structxe_userptr_vm{
/**drivers/gpu/drm/xe/xe_userptr.h +0
-0@@ -92,6 +139,12 @@ struct xe_userptr { * read: vm->svm.gpusvm.notifier_lock in write mode or vm-Quoted 1 line
resv held.
*/
boolinitial_bind;drivers/gpu/drm/xe/xe_userptr.h +2
-0+/** +* @repin: Timeout state for an in-progress repin retry sequence.
drivers/gpu/drm/xe/xe_userptr.h +1
-0+* Protected by vm->lock in write mode, or in read mode together with
drivers/gpu/drm/xe/xe_userptr.h +3
-0+* the vma's fault_lock. +*/ +struct xe_userptr_repin repin;#if
IS_ENABLED(CONFIG_DRM_XE_USERPTR_INVAL_INJECT)u32 divisor;
#endifdrivers/gpu/drm/xe/xe_vm.c +1
-0@@ -18,6 +18,7 @@ #include <linux/delay.h> #include <linux/kthread.h> #include <linux/mm.h> +#include <linux/sched/signal.h> #include <linux/swap.h>
#include <generated/xe_wa_oob.h>drivers/gpu/drm/xe/xe_vm.c +0
-0@@ -2782,14 +2783,6 @@ static struct xe_vma *new_vma(struct xe_vm *vm, struct drm_gpuva_op_map *op,
if (xe_vma_is_userptr(vma)) {
err =
xe_vma_userptr_pin_pages(to_userptr_vma(vma));drivers/gpu/drm/xe/xe_vm.c +0
-2-/* -* -EBUSY has dedicated meaning that a user fence
drivers/gpu/drm/xe/xe_vm.c +0
-2-* attached to the VMA is busy, in practice -* xe_vma_userptr_pin_pages can only fail with
-EBUSYifdrivers/gpu/drm/xe/xe_vm.c +0
-1-* we are low on memory so convert this to - ENOMEM.
drivers/gpu/drm/xe/xe_vm.c +0
-3-*/ -if (err == -EBUSY ) - err = -ENOMEM ;}
}
if (err) {drivers/gpu/drm/xe/xe_vm.c +3
-1@@ -4085,11 +4078,13 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file) struct drm_gpuva_ops **ops = NULL; struct xe_vm *vm; struct xe_exec_queue *q = NULL; -u32 num_syncs, num_ufence =0 ; +u32 num_syncs, num_ufence; struct xe_sync_entry *syncs = NULL; struct drm_xe_vm_bind_op *bind_ops = NULL; struct xe_vma_ops vops = { .flags = 0, }; +struct xe_userptr_repin repin = {}; struct dma_fence *fence; +bool repin_again; int err; int i;drivers/gpu/drm/xe/xe_vm.c +0
-0@@ -4122,6 +4117,9 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file) /* Ensure all UNMAPs visible */ xe_svm_flush(vm);drivers/gpu/drm/xe/xe_vm.c +3
-0+retry: + repin_again = false; + num_ufence =0 ;err =
down_write_killable(&vm->lock);
if (err)
gotoput_exec_queue;drivers/gpu/drm/xe/xe_vm.c +1
-0@@ -4225,6 +4223,7 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file) xe_vma_ops_init(&vops, vm, q, syncs, num_syncs); if (args->num_binds > 1) vops.flags |= XE_VMA_OPS_ARRAY_OF_BINDS; +xe_userptr_repin_begin (&repin); for (i = 0; i < args->num_binds; ++i) { u64 range = bind_ops[i].range;u64 addr = bind_ops[i].addr;
drivers/gpu/drm/xe/xe_vm.c +1
-0@@ -4240,12 +4239,15 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file) if (IS_ERR(ops[i])) { err = PTR_ERR(ops[i]); ops[i] = NULL; + repin_again = err == -EAGAIN ; goto unwind_ops; }
err =vm_bind_ioctl_ops_parse(vm, ops[i], &vops);drivers/gpu/drm/xe/xe_vm.c +2
-1-if (err) +if (err) { + repin_again = err == -EAGAIN ;goto
unwind_ops;drivers/gpu/drm/xe/xe_vm.c +1
-0+ }
#ifdefTEST_VM_OPS_ERROR
if (flags &FORCE_OP_ERROR) {drivers/gpu/drm/xe/xe_vm.c +0
-0@@ -4308,6 +4310,27 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file) up_read(&vm->lock);else
up_write(&vm->lock);drivers/gpu/drm/xe/xe_vm.c +3
-0+if (repin_again) { +/* +* A userptr repin keeps failing due to concurrent CPU mapping
drivers/gpu/drm/xe/xe_vm.c +1
-0+* changes. New vmas are created on every attempt so the overall
drivers/gpu/drm/xe/xe_vm.c +1
-0+* timeout is tracked here. Retry with all locks dropped.
drivers/gpu/drm/xe/xe_vm.c +2
-0+*/ + u32 timeout_ms = READ_ONCE(vm->xe-Quoted 1 line
userptr_repin_timeout_ms);drivers/gpu/drm/xe/xe_vm.c +2
-0+ + if (xe_userptr_repin_should_retry(&repin,
timeout_ms)) {drivers/gpu/drm/xe/xe_vm.c +12
-0+ bos =NULL ; + ops =NULL ; + syncs =NULL ; + vops.flags =0 ; +cond_resched (); +if (!signal_pending (current)) + goto retry; + err = -ERESTARTSYS ; + }else { + err = -EBUSY ; + } + }put_exec_queue:
if (q)
xe_exec_queue_put(q);drivers/gpu/drm/xe/xe_vm_madvise.c +0
-0@@ -6,6 +6,7 @@ #include "xe_vm_madvise.h"
#include <linux/nospec.h>
+#include <linux/sched/signal.h>
#include <drm/xe_drm.h>
#include "xe_bo.h"drivers/gpu/drm/xe/xe_vm_madvise.c +1
-0@@ -13,6 +14,7 @@ #include "xe_pt.h" #include "xe_svm.h" #include "xe_tlb_inval.h" +#include "xe_userptr.h" #include "xe_vm.h"
structxe_vmas_in_madvise_range{drivers/gpu/drm/xe/xe_vm_madvise.c +0
-0@@ -592,11 +594,13 @@ int xe_vm_madvise_ioctl(struct drm_device *dev,void *data, struct
drm_file*fil
.addr = xe_device_uncanonicalize_addr(xe, args-Quoted 1 line
start),
.range =
args->range,
};drivers/gpu/drm/xe/xe_vm_madvise.c +1
-0+struct xe_userptr_repin repin = {};struct
xe_madvise_detailsdetails;
u16pat_index,coh_mode;
structxe_vm*vm;
structdrm_execexec;
int err,attr_type;drivers/gpu/drm/xe/xe_vm_madvise.c +1
-0+bool repin_again;bool
do_retained;
vm =xe_vm_lookup(xef, args->vm_id);drivers/gpu/drm/xe/xe_vm_madvise.c +0
-0@@ -629,6 +633,8 @@ int xe_vm_madvise_ioctl(struct drm_device *dev,void *data, struct
drm_file*fil
xe_svm_flush(vm);drivers/gpu/drm/xe/xe_vm_madvise.c +2
-0+retry: + repin_again = false;err =
down_write_killable(&vm->lock);
if (err)
gotoput_vm;drivers/gpu/drm/xe/xe_vm_madvise.c +0
-0@@ -642,9 +648,12 @@ int xe_vm_madvise_ioctl(struct drm_device *dev,void *data, struct
drm_file*fil
if (err)
gotounlock_vm;drivers/gpu/drm/xe/xe_vm_madvise.c +1
-0+xe_userptr_repin_begin (&repin);err = xe_vm_alloc_madvise_vma(vm, madvise_range.addr, args-
Quoted 1 line
range);
drivers/gpu/drm/xe/xe_vm_madvise.c +2
-1-if (err) +if (err) { + repin_again = err == -EAGAIN ;goto
madv_fini;drivers/gpu/drm/xe/xe_vm_madvise.c +1
-0+ }
err =get_vmas(vm, &madvise_range);
if (err || !madvise_range.num_vmas)drivers/gpu/drm/xe/xe_vm_madvise.c +0
-0@@ -730,6 +739,18 @@ int xe_vm_madvise_ioctl(struct drm_device *dev,void *data, struct
drm_file*fil
xe_madvise_details_fini(&details);
unlock_vm:
up_write(&vm->lock);drivers/gpu/drm/xe/xe_vm_madvise.c +2
-0+if (repin_again) { + u32 timeout_ms = READ_ONCE(xe-Quoted 1 line
userptr_repin_timeout_ms);drivers/gpu/drm/xe/xe_vm_madvise.c +2
-0+ + if (xe_userptr_repin_should_retry(&repin,
timeout_ms)) {drivers/gpu/drm/xe/xe_vm_madvise.c +8
-0+cond_resched (); +if (!signal_pending (current)) + goto retry; + err = -ERESTARTSYS ; + }else { + err = -EBUSY ; + } + }
/* Write retained value to user after releasing all locks */ if (!err &&do_retained)
Re: [PATCH 4/5] drm/xe/userptr: Make the repin retry loop non-fatal
In reply to Matthew AuldQuoted 403 lines · Matthew Auld
From: Thomas Hellström <[email protected]>
drm_gpusvm_get_pages()gives up with-EBUSYafter a fixed one second budget if the CPU mappings keep changing during the repin. That error was treated as fatal: the rebind worker killed the VM, exec returned it to user-space and the bind ioctl converted it to-ENOMEM.Instead, time-stamp the first repin attempt of a userptr and, as long as the overall timeout (the
userptr_repin_timeout_mssysfs attribute, read on each check) hasn't expired, translate-EBUSYinto-EAGAIN. Discount idle gaps between attempts (for example if the task was stopped via SIGTSTP) so resuming does not immediately trip the timeout. Callers drop all locks and retry:- exec and the rebind worker already retry on
-EAGAIN.
- The bind and madvise ioctls restart from the top withvm->lockdropped. Since new vmas are created on each attempt, they track the overall timeout themselves.
- The pagefault handler repeats the repin.Only when the overall timeout expires is
-EBUSYreturned. Drop the-EBUSYto-ENOMEMconversion innew_vma()as-EBUSYnow means just that.v2 (Matt):
- Resetnum_ufenceat the retry label inxe_vm_bind_ioctl()so user fences are not counted twice across repin retries.
- Handle-EAGAINfromxe_vm_alloc_madvise_vma()inxe_vm_madvise_ioctl()withvm->lockdropped and repin timeout tracking.
- Discount idle gaps longer thanXE_USERPTR_REPIN_IDLE_MSbetween attempts and checksignal_pending()/ return-ERESTARTSYSin ioctl retry loops so stopping and resuming (e.g. Ctrl-Z) works without immediately timing out.Signed-off-by Thomas Hellström <[email protected]>Signed-off-by Matthew Auld <[email protected]>--- drivers/gpu/drm/xe/xe_exec.c | 9 +++++-- drivers/gpu/drm/xe/xe_pagefault.c | 4 +++ drivers/gpu/drm/xe/xe_userptr.c | 47 ++++++++++++++++++++++++++++----- drivers/gpu/drm/xe/xe_userptr.h | 53 ++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/xe/xe_vm.c | 43 ++++++++++++++++++++++++------- drivers/gpu/drm/xe/xe_vm_madvise.c | 23 ++++++++++++++++- 6 files changed, 159 insertions(+), 20 deletions(-)drivers/gpu/drm/xe/xe_exec.c +7
-2@@ -10,6 +10,7 @@#include <drm/drm_file.h> #include <uapi/drm/xe_drm.h> #include <linux/delay.h> +#include <linux/sched/signal.h> #include "xe_device.h" #include "xe_exec_queue.h" @@ -380,8 +381,12 @@ int xe_exec_ioctl(struct drm_device *dev, void *data, struct drm_file *file)xe_validation_ctx_fini (&ctx); err_unlock_list:up_read (&vm->lock); -if (err == -EAGAIN ) - goto retry; +if (err == -EAGAIN ) { +cond_resched (); +if (!signal_pending (current)) + goto retry; + err = -ERESTARTSYS ; + } err_hw_exec_mode:if (mode ==EXEC_MODE_DMA_FENCE )xe_hw_engine_group_put (group);drivers/gpu/drm/xe/xe_pagefault.c +4
-0@@ -191,6 +191,10 @@ static int xe_pagefault_handle_vma(struct xe_gt *gt, struct xe_vma *vma,struct xe_userptr_vma *uvma =to_userptr_vma (vma); err =xe_vma_userptr_pin_pages (uvma); +if (err == -EAGAIN ) { +cond_resched (); +continue ; + }if (err) {xe_pagefault_set_error (pf,XE_PAGEFAULT_ERROR_VMA_USERPTR_PIN );return err;drivers/gpu/drm/xe/xe_userptr.c +40
-7@@ -74,6 +74,23 @@ static bool __xe_vma_userptr_lockdep(struct xe_userptr_vma *uvma)#define xe_vma_userptr_lockdep (uvma)#endif +/** +* xe_vma_userptr_pin_pages() - Pin and map the pages of a userptr vma +* @uvma: The userptr vma. +* +* Pin the pages and set up the dma mappings. If the CPU mappings keep changing +* during the repin, drm_gpusvm_get_pages() eventually gives up with -EBUSY. +* That is converted to -EAGAIN until the overall repin timeout, measured from +* the first attempt since the last successful repin, expires. The caller is +* then expected to drop all locks and retry. +* +* Context: Either vm->lock held in write mode, or in read mode together with +* the vma's fault_lock. +* +* Return: 0 on success, -EAGAIN if the caller should retry with all locks +* dropped, -EBUSY if the overall timeout expired, or another negative error +* code on failure. +*/ int xe_vma_userptr_pin_pages (struct xe_userptr_vma *uvma) {struct xe_vma *vma = &uvma->vma;@@ -84,19 +101,35 @@ int xe_vma_userptr_pin_pages(struct xe_userptr_vma *uvma) .device_private_page_owner = xe_svm_private_page_owner(vm, false), .allow_mixed = true, }; +int err;xe_vma_userptr_lockdep (uvma);xe_assert (xe,xe_vma_is_userptr (vma)); -if (vma->gpuva.flags &XE_VMA_DESTROYED ) +if (vma->gpuva.flags &XE_VMA_DESTROYED ) { + uvma->userptr.repin = (struct xe_userptr_repin ){};return 0 ; + } -return drm_gpusvm_get_pages (&vm->svm.gpusvm, &uvma->userptr.pages,1 , - uvma->userptr.notifier.mm, - &uvma->userptr.notifier, -xe_vma_userptr (vma), -xe_vma_userptr (vma) +xe_vma_size (vma), - &ctx); +xe_userptr_repin_begin (&uvma->userptr.repin); + + err =drm_gpusvm_get_pages (&vm->svm.gpusvm, &uvma->userptr.pages,1 , + uvma->userptr.notifier.mm, + &uvma->userptr.notifier, +xe_vma_userptr (vma), +xe_vma_userptr (vma) +xe_vma_size (vma), + &ctx); +if (err == -EBUSY ) { +u32 timeout_ms =READ_ONCE (xe->userptr_repin_timeout_ms); + +if (xe_userptr_repin_should_retry (&uvma->userptr.repin, + timeout_ms)) +return -EAGAIN ; + } + + uvma->userptr.repin = (struct xe_userptr_repin ){}; + +return err; } static struct mmu_interval_notifier_finish *drivers/gpu/drm/xe/xe_userptr.h +53
-0@@ -6,6 +6,8 @@#ifndef _XE_USERPTR_H_#define _XE_USERPTR_H_ +#include <linux/hmm.h> +#include <linux/jiffies.h> #include <linux/list.h> #include <linux/mutex.h> #include <linux/notifier.h> @@ -20,6 +22,51 @@ struct xe_vm;struct xe_vma ;struct xe_userptr_vma ; +/** +* struct xe_userptr_repin - Timeout tracking state for userptr repin retries +* @start: Timestamp in jiffies of the first repin attempt, adjusted for idle +* gaps, or zero if no repin is in progress. +* @last: Timestamp in jiffies when the previous attempt failed with -EBUSY, +* or zero if no retry is pending. +*/ +struct xe_userptr_repin { +unsigned long start; +unsigned long last; +}; + +/* +* If more than XE_USERPTR_REPIN_IDLE_MS elapses between attempts (for example +* when the task was stopped via SIGTSTP/Ctrl-Z), discount the idle gap so +* waking up does not immediately expire the overall repin timeout. +*/ +#define XE_USERPTR_REPIN_IDLE_MS (5 * HMM_RANGE_DEFAULT_TIMEOUT) + +static inline void xe_userptr_repin_begin (struct xe_userptr_repin *repin) +{ +unsigned long now = jiffies; + +if (!repin->start) { + repin->start = now ?:1 ; +return ; + } + +if (repin->last && +time_after (now, repin->last + +msecs_to_jiffies (XE_USERPTR_REPIN_IDLE_MS ))) + repin->start = (repin->start + (now - repin->last)) ?:1 ; + repin->last =0 ; +} + +static inline bool xe_userptr_repin_should_retry (struct xe_userptr_repin *repin, +u32 timeout_ms) +{ +unsigned long now = jiffies; + + repin->last = now ?:1 ; +return !timeout_ms || +time_before (now, repin->start +msecs_to_jiffies (timeout_ms)); +} +/** struct xe_userptr_vm - User pointer VM level state */ struct xe_userptr_vm {/** @@ -92,6 +139,12 @@ struct xe_userptr {* read: vm->svm.gpusvm.notifier_lock in write mode or vm->resv held. */ bool initial_bind; +/** +* @repin: Timeout state for an in-progress repin retry sequence. +* Protected by vm->lock in write mode, or in read mode together with +* the vma's fault_lock. +*/ +struct xe_userptr_repin repin;#if IS_ENABLED (CONFIG_DRM_XE_USERPTR_INVAL_INJECT )u32 divisor;#endif drivers/gpu/drm/xe/xe_vm.c +33
-10@@ -18,6 +18,7 @@#include <linux/delay.h> #include <linux/kthread.h> #include <linux/mm.h> +#include <linux/sched/signal.h> #include <linux/swap.h> #include <generated/xe_wa_oob.h> @@ -2782,14 +2783,6 @@ static struct xe_vma *new_vma(struct xe_vm *vm, struct drm_gpuva_op_map *op,if (xe_vma_is_userptr (vma)) { err =xe_vma_userptr_pin_pages (to_userptr_vma (vma)); -/* -* -EBUSY has dedicated meaning that a user fence -* attached to the VMA is busy, in practice -* xe_vma_userptr_pin_pages can only fail with -EBUSY if -* we are low on memory so convert this to -ENOMEM. -*/ -if (err == -EBUSY ) - err = -ENOMEM ; } }if (err) {@@ -4085,11 +4078,13 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file)struct drm_gpuva_ops **ops =NULL ;struct xe_vm *vm;struct xe_exec_queue *q =NULL ; -u32 num_syncs, num_ufence =0 ; +u32 num_syncs, num_ufence;struct xe_sync_entry *syncs =NULL ;struct drm_xe_vm_bind_op *bind_ops =NULL ;struct xe_vma_ops vops = { .flags =0 , }; +struct xe_userptr_repin repin = {};struct dma_fence *fence; +bool repin_again;int err;int i;@@ -4122,6 +4117,9 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file)/* Ensure all UNMAPs visible */ xe_svm_flush (vm); +retry: + repin_again = false; + num_ufence =0 ; err =down_write_killable (&vm->lock);if (err) goto put_exec_queue;@@ -4225,6 +4223,7 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file)xe_vma_ops_init (&vops, vm, q, syncs, num_syncs);if (args->num_binds >1 ) vops.flags |=XE_VMA_OPS_ARRAY_OF_BINDS ; +xe_userptr_repin_begin (&repin);for (i =0 ; i < args->num_binds; ++i) {u64 range = bind_ops[i].range;u64 addr = bind_ops[i].addr;@@ -4240,12 +4239,15 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file)if (IS_ERR (ops[i])) { err =PTR_ERR (ops[i]); ops[i] =NULL ; + repin_again = err == -EAGAIN ; goto unwind_ops; } err =vm_bind_ioctl_ops_parse (vm, ops[i], &vops); -if (err) +if (err) { + repin_again = err == -EAGAIN ; goto unwind_ops; + }#ifdef TEST_VM_OPS_ERROR if (flags &FORCE_OP_ERROR ) {@@ -4308,6 +4310,27 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file)up_read (&vm->lock); else up_write(&vm->lock); +if (repin_again) { +/* +* A userptr repin keeps failing due to concurrent CPU mapping +* changes. New vmas are created on every attempt so the overall +* timeout is tracked here. Retry with all locks dropped. +*/ +u32 timeout_ms =READ_ONCE (vm->xe->userptr_repin_timeout_ms); + +if (xe_userptr_repin_should_retry (&repin, timeout_ms)) { + bos =NULL ; + ops =NULL ; + syncs =NULL ; + vops.flags =0 ; +cond_resched (); +if (!signal_pending (current)) + goto retry; + err = -ERESTARTSYS ; + }else { + err = -EBUSY ; + } + } put_exec_queue:if (q)xe_exec_queue_put (q);drivers/gpu/drm/xe/xe_vm_madvise.c +12
-1@@ -6,6 +6,7 @@#include "xe_vm_madvise.h" #include <linux/nospec.h> +#include <linux/sched/signal.h> #include <drm/xe_drm.h> #include "xe_bo.h" @@ -13,6 +14,7 @@#include "xe_pt.h" #include "xe_svm.h" #include "xe_tlb_inval.h" +#include "xe_userptr.h" #include "xe_vm.h" struct xe_vmas_in_madvise_range {@@ -592,11 +594,13 @@ int xe_vm_madvise_ioctl(struct drm_device *dev, void *data, struct drm_file *fil .addr = xe_device_uncanonicalize_addr(xe, args->start), .range = args->range, }; +struct xe_userptr_repin repin = {};struct xe_madvise_details details;u16 pat_index, coh_mode;struct xe_vm *vm;struct drm_exec exec;int err, attr_type; +bool repin_again;bool do_retained; vm =xe_vm_lookup (xef, args->vm_id);@@ -629,6 +633,8 @@ int xe_vm_madvise_ioctl(struct drm_device *dev, void *data, struct drm_file *filxe_svm_flush (vm); +retry: + repin_again = false; err =down_write_killable (&vm->lock);if (err) goto put_vm;@@ -642,9 +648,12 @@ int xe_vm_madvise_ioctl(struct drm_device *dev, void *data, struct drm_file *filif (err) goto unlock_vm; +xe_userptr_repin_begin (&repin); err =xe_vm_alloc_madvise_vma (vm, madvise_range.addr, args->range); -if (err) +if (err) { + repin_again = err == -EAGAIN ; goto madv_fini; + } err =get_vmas (vm, &madvise_range);if (err || !madvise_range.num_vmas)@@ -730,6 +739,18 @@ int xe_vm_madvise_ioctl(struct drm_device *dev, void *data, struct drm_file *filxe_madvise_details_fini (&details); unlock_vm:up_write (&vm->lock); +if (repin_again) { +u32 timeout_ms =READ_ONCE (xe->userptr_repin_timeout_ms);
drivers/gpu/drm/xe/xe_vm_madvise.c int xe_vm_madvise_ioctl(struct drm_device *dev, void *data, struct drm_file *fil · line 753
Quoted 10 lines
drivers/gpu/drm/xe/xe_vm_madvise.c +10
-0+ +if (xe_userptr_repin_should_retry (&repin, timeout_ms)) { +cond_resched (); +if (!signal_pending (current)) + goto retry; + err = -ERESTARTSYS ; + }else { + err = -EBUSY ; + } + }
LGTM
Quoted 4 lines
drivers/gpu/drm/xe/xe_vm_madvise.c +0
-0/* Write retained value to user after releasing all locks */ if (!err && do_retained)
PATCH 5/5 drm/xe: run compute rebind worker on device NUMA node
In reply to Matthew Auldpreempt_rebind_work_func() currently runs on xe->ordered_wq, whose unbound worker pool spans all NUMA nodes. On multi-socket systems, if the rebind worker runs on a remote socket when faulting userptr pages marked PROT_NONE by AutoNUMA, hmm_range_fault() invokes do_numa_page() using the worker's NUMA node and triggers migrate_misplaced_folio(), pulling pages away from the GPU's local node and causing self-inflicted MMU notifier invalidations.
Move vm->preempt.rebind_work onto a dedicated WQ_UNBOUND workqueue (max_active = 1) queued via queue_work_node() with dev_to_node(), leaving user-fence signalling on xe->ordered_wq. Guard preempt_rebind_work_func() with a per-device mutex so compute rebinds remain strictly 1-at-a-time even when queue_work_node() falls back across nodes (such as NUMA_NO_NODE or CPU-less nodes).
--- drivers/gpu/drm/xe/xe_device.c | 11 ++++++++++- drivers/gpu/drm/xe/xe_device_types.h | 10 +++++++++- drivers/gpu/drm/xe/xe_vm.c | 8 +++++++- drivers/gpu/drm/xe/xe_vm.h | 6 +++++- 4 files changed, 31 insertions(+), 4 deletions(-)
drivers/gpu/drm/xe/xe_device.c +10 -1
@@ -8,7 +8,9 @@#include <linux/aperture.h> #include <linux/delay.h> #include <linux/error-injection.h> +#include <linux/mutex.h> #include <linux/units.h> +#include <linux/workqueue.h> #include <drm/drm_client.h> #include <drm/drm_gem_ttm_helper.h>
@@ -396,6 +398,11 @@ static void xe_device_destroy(struct drm_device *dev, void *dummy)if (xe->destroy_wq)destroy_workqueue (xe->destroy_wq); +if (xe->rebind_wq) +destroy_workqueue (xe->rebind_wq); + +mutex_destroy (&xe->rebind_lock); +ttm_device_fini (&xe->ttm);if (atomic_dec_and_test (&xe_device_count))
@@ -472,6 +479,7 @@ int xe_device_init_early(struct xe_device *xe)return err;xe_bo_dev_init (&xe->bo_device); +mutex_init (&xe->rebind_lock);atomic_inc (&xe_device_count); err =drmm_add_action_or_reset (&xe->drm, xe_device_destroy,NULL );if (err)
@@ -518,10 +526,11 @@ int xe_device_init_early(struct xe_device *xe) xe->preempt_fence_wq =alloc_ordered_workqueue ("xe-preempt-fence-wq" ,WQ_MEM_RECLAIM ); + xe->rebind_wq =alloc_workqueue ("xe-rebind-wq" ,WQ_UNBOUND ,1 ); xe->ordered_wq =alloc_ordered_workqueue ("xe-ordered-wq" ,0 ); xe->unordered_wq =alloc_workqueue ("xe-unordered-wq" ,WQ_PERCPU ,0 ); xe->destroy_wq =alloc_workqueue ("xe-destroy-wq" ,WQ_PERCPU |WQ_MEM_RECLAIM ,0 ); -if (!xe->ordered_wq || !xe->unordered_wq || +if (!xe->ordered_wq || !xe->unordered_wq || !xe->rebind_wq || !xe->preempt_fence_wq || !xe->destroy_wq) {/* * Cleanup done in xe_device_destroy via
drivers/gpu/drm/xe/xe_device_types.h +9 -1
@@ -6,7 +6,9 @@#ifndef _XE_DEVICE_TYPES_H_#define _XE_DEVICE_TYPES_H_ +#include <linux/mutex.h> #include <linux/pci.h> +#include <linux/workqueue.h> #include <drm/drm_device.h> #include <drm/drm_file.h>
@@ -375,7 +377,13 @@ struct xe_device {/** @preempt_fence_wq: used to serialize preempt fences */ struct workqueue_struct *preempt_fence_wq; -/** @ordered_wq: used to serialize compute mode resume */ +/** @rebind_wq: used to run compute mode rebind work on device node */ +struct workqueue_struct *rebind_wq; + +/** @rebind_lock: serializes compute mode rebind workers per device */ +struct mutex rebind_lock; + +/** @ordered_wq: used to serialize ordered work */ struct workqueue_struct *ordered_wq;/** @unordered_wq: used to serialize unordered work */
drivers/gpu/drm/xe/xe_vm.c +7 -1
@@ -18,6 +18,7 @@#include <linux/delay.h> #include <linux/kthread.h> #include <linux/mm.h> +#include <linux/mutex.h> #include <linux/sched/signal.h> #include <linux/swap.h>
@@ -540,7 +541,7 @@ static bool vm_suspend_rebind_worker(struct xe_vm *vm)*/ void xe_vm_resume_rebind_worker (struct xe_vm *vm) { -queue_work (vm->xe->ordered_wq, &vm->preempt.rebind_work); +xe_vm_queue_rebind_worker (vm); }#if IS_ENABLED (CONFIG_DRM_XE_USERPTR_INVAL_INJECT )
@@ -581,16 +582,19 @@ static void preempt_rebind_work_func(struct work_struct *w)xe_assert (vm->xe,xe_vm_in_preempt_fence_mode (vm));trace_xe_vm_rebind_worker_enter (vm); +mutex_lock (&vm->xe->rebind_lock);down_write (&vm->lock);if (xe_vm_is_closed_or_banned (vm)) {up_write (&vm->lock); +mutex_unlock (&vm->xe->rebind_lock);trace_xe_vm_rebind_worker_exit (vm);return ; }if (!try_wait_for_completion (&vm->xe->pm_block) &&vm_suspend_rebind_worker (vm)) {up_write (&vm->lock); +mutex_unlock (&vm->xe->rebind_lock);/* We don't actually block but don't make progress. */ xe_pm_might_block_on_suspend ();return ;
@@ -666,6 +670,7 @@ static void preempt_rebind_work_func(struct work_struct *w)* lock make progress between attempts. */ up_write (&vm->lock); +mutex_unlock (&vm->xe->rebind_lock);free_preempt_fences (&preempt_fences);xe_vm_queue_rebind_worker (vm);trace_xe_vm_rebind_worker_exit (vm);
@@ -679,6 +684,7 @@ static void preempt_rebind_work_func(struct work_struct *w)xe_vm_kill (vm, true); }up_write (&vm->lock); +mutex_unlock (&vm->xe->rebind_lock);free_preempt_fences (&preempt_fences);
drivers/gpu/drm/xe/xe_vm.h +5 -1
@@ -6,6 +6,9 @@#ifndef _XE_VM_H_#define _XE_VM_H_ +#include <linux/device.h> +#include <linux/workqueue.h> +#include "xe_assert.h" #include "xe_bo_types.h" #include "xe_macros.h"
@@ -259,7 +262,8 @@ int xe_vm_validate_protected(struct xe_vm *vm);static inline void xe_vm_queue_rebind_worker (struct xe_vm *vm) {xe_assert (vm->xe,xe_vm_in_preempt_fence_mode (vm)); -queue_work (vm->xe->ordered_wq, &vm->preempt.rebind_work); +queue_work_node (dev_to_node (vm->xe->drm.dev), vm->xe->rebind_wq, + &vm->preempt.rebind_work); }/**
Signature · 1 line
2.56.1
Thomas Hellström
maintainerRe: [PATCH 5/5] drm/xe: run compute rebind worker on device NUMA node
Quoted 10 lines · Matthew Auld
preempt_rebind_work_func()currently runs onxe->ordered_wq, whose unbound worker pool spans all NUMA nodes. On multi-socket systems, if the rebind worker runs on a remote socket when faulting userptr pages markedPROT_NONEby AutoNUMA,hmm_range_fault()invokesdo_numa_page()
using the worker's NUMA node and triggersmigrate_misplaced_folio(), pulling pages away from the GPU's local node and causing self- inflicted
MMU notifier invalidations.
Quoted 6 lines
Move
vm->preempt.rebind_workonto a dedicatedWQ_UNBOUNDworkqueue (max_active= 1) queued viaqueue_work_node()withdev_to_node(), leaving user-fence signalling onxe->ordered_wq. Guardpreempt_rebind_work_func()with a per-device mutex so compute rebinds remain strictly 1-at-a-time even whenqueue_work_node()falls back across nodes (such asNUMA_NO_NODEor CPU-less nodes).
I don't remember fully why we have this 1-at-a-time rebind worker. I wonder whether it was because of concurrent validations causing VMs to outcompete eachother for memory. If that was the case, then we might be able to lift that restriction due to the validation guard.
Quoted 29 lines
Signed-off-by Matthew Auld <[email protected]>---
drivers/gpu/drm/xe/xe_device.c | 11 ++++++++++-drivers/gpu/drm/xe/xe_device_types.h| 10 +++++++++- drivers/gpu/drm/xe/xe_vm.c | 8 +++++++- drivers/gpu/drm/xe/xe_vm.h | 6 +++++-4 files changed, 31 insertions(+), 4 deletions(-)drivers/gpu/drm/xe/xe_device.c +2
-0@@ -8,7 +8,9 @@ #include <linux/aperture.h> #include <linux/delay.h> #include <linux/error-injection.h> +#include <linux/mutex.h> #include <linux/units.h> +#include <linux/workqueue.h>
#include <drm/drm_client.h>
#include <drm/drm_gem_ttm_helper.h>drivers/gpu/drm/xe/xe_device.c +0
-0@@ -396,6 +398,11 @@ static void xe_device_destroy(struct drm_device *dev, void *dummy) if (xe->destroy_wq) destroy_workqueue(xe->destroy_wq);
drivers/gpu/drm/xe/xe_device.c static void xe_device_destroy(struct drm_device *dev, void *dummy) · line 402
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +2
-0+if (xe->rebind_wq) +destroy_workqueue (xe->rebind_wq);
Hm. It looks safer if we destroy this wq earlier than the destroy wq? Is there a chance that we put something on the destroy wq from the rebind wq?
Quoted 145 lines
drivers/gpu/drm/xe/xe_device.c +3
-0+ +mutex_destroy (&xe->rebind_lock); +
ttm_device_fini(&xe->ttm);
if (atomic_dec_and_test(&xe_device_count))drivers/gpu/drm/xe/xe_device.c +0
-0@@ -472,6 +479,7 @@ int xe_device_init_early(struct xe_device *xe) return err;
xe_bo_dev_init(&xe->bo_device);drivers/gpu/drm/xe/xe_device.c +1
-0+mutex_init (&xe->rebind_lock);
atomic_inc(&xe_device_count);
err =drmm_add_action_or_reset(&xe->drm, xe_device_destroy, NULL);
if (err)drivers/gpu/drm/xe/xe_device.c +0
-0@@ -518,10 +526,11 @@ int xe_device_init_early(struct xe_device *xe)
xe->preempt_fence_wq= alloc_ordered_workqueue("xe-preempt- fence-wq",WQ_MEM_RECLAIM);drivers/gpu/drm/xe/xe_device.c +1
-0+ xe->rebind_wq = alloc_workqueue("xe-rebind-wq", WQ_UNBOUND,1);
xe->ordered_wq=alloc_ordered_workqueue("xe-ordered-wq", 0);
xe->unordered_wq=alloc_workqueue("xe-unordered-wq", WQ_PERCPU, 0);
xe->destroy_wq=alloc_workqueue("xe-destroy-wq", WQ_PERCPU | WQ_MEM_RECLAIM, 0);drivers/gpu/drm/xe/xe_device.c +1
-1- if (!xe->ordered_wq || !xe->unordered_wq || + if (!xe->ordered_wq || !xe->unordered_wq || !xe->rebind_wq|| !xe->preempt_fence_wq || !xe->destroy_wq) {/*
* Cleanup done inxe_device_destroyviadrivers/gpu/drm/xe/xe_device_types.h +0
-0@@ -6,7 +6,9 @@ #ifndef _XE_DEVICE_TYPES_H_ #define _XE_DEVICE_TYPES_H_
+#include <linux/mutex.h>
#include <linux/pci.h>
+#include <linux/workqueue.h>
#include <drm/drm_device.h>
#include <drm/drm_file.h>drivers/gpu/drm/xe/xe_device_types.h +0
-0@@ -375,7 +377,13 @@ struct xe_device { /** @preempt_fence_wq: used to serialize preempt fences */ struct workqueue_struct *preempt_fence_wq;drivers/gpu/drm/xe/xe_device_types.h +1
-1-/** @ordered_wq: used to serialize compute mode resume */ +/** @rebind_wq: used to run compute mode rebind work on device node */
drivers/gpu/drm/xe/xe_device_types.h +3
-0+struct workqueue_struct *rebind_wq; + +/** @rebind_lock: serializes compute mode rebind workers per device */
drivers/gpu/drm/xe/xe_device_types.h +3
-0+struct mutex rebind_lock; + +/** @ordered_wq: used to serialize ordered work */ struct
workqueue_struct*ordered_wq;
/** @unordered_wq: used to serialize unordered work */drivers/gpu/drm/xe/xe_vm.c +1
-0@@ -18,6 +18,7 @@ #include <linux/delay.h> #include <linux/kthread.h> #include <linux/mm.h> +#include <linux/mutex.h> #include <linux/sched/signal.h> #include <linux/swap.h>drivers/gpu/drm/xe/xe_vm.c +1
-1@@ -540,7 +541,7 @@ static bool vm_suspend_rebind_worker(struct xe_vm*vm) */ void xe_vm_resume_rebind_worker(struct xe_vm *vm) { -queue_work (vm->xe->ordered_wq, &vm->preempt.rebind_work); +xe_vm_queue_rebind_worker (vm); }
#ifIS_ENABLED(CONFIG_DRM_XE_USERPTR_INVAL_INJECT)drivers/gpu/drm/xe/xe_vm.c +0
-0@@ -581,16 +582,19 @@ static void preempt_rebind_work_func(struct work_struct *w) xe_assert(vm->xe, xe_vm_in_preempt_fence_mode(vm)); trace_xe_vm_rebind_worker_enter(vm);drivers/gpu/drm/xe/xe_vm.c +1
-0+mutex_lock (&vm->xe->rebind_lock);
down_write(&vm->lock);
if (xe_vm_is_closed_or_banned(vm)) {
up_write(&vm->lock);drivers/gpu/drm/xe/xe_vm.c +1
-0+mutex_unlock (&vm->xe->rebind_lock);
trace_xe_vm_rebind_worker_exit(vm); return;
}
if (!try_wait_for_completion(&vm->xe->pm_block) &&vm_suspend_rebind_worker(vm)) {up_write(&vm->lock);drivers/gpu/drm/xe/xe_vm.c +1
-0+mutex_unlock (&vm->xe->rebind_lock);/* We don't actually block but don't make progress. */
xe_pm_might_block_on_suspend();
return;drivers/gpu/drm/xe/xe_vm.c +1
-0@@ -666,6 +670,7 @@ static void preempt_rebind_work_func(structwork_struct *w) * lock make progress between attempts. */ up_write(&vm->lock); +mutex_unlock (&vm->xe->rebind_lock); free_preempt_fences(&preempt_fences); xe_vm_queue_rebind_worker(vm);
trace_xe_vm_rebind_worker_exit(vm);drivers/gpu/drm/xe/xe_vm.c +1
-0@@ -679,6 +684,7 @@ static void preempt_rebind_work_func(struct work_struct *w) xe_vm_kill(vm, true); } up_write(&vm->lock); +mutex_unlock (&vm->xe->rebind_lock);
free_preempt_fences(&preempt_fences);drivers/gpu/drm/xe/xe_vm.h +0
-0@@ -6,6 +6,9 @@ #ifndef _XE_VM_H_ #define _XE_VM_H_drivers/gpu/drm/xe/xe_vm.h +3
-0+#include <linux/device.h> +#include <linux/workqueue.h> +#include "
xe_assert.h"
#include "xe_bo_types.h"
#include "xe_macros.h"
drivers/gpu/drm/xe/xe_vm.h int xe_vm_validate_protected(struct xe_vm *vm); · line 267
Quoted 7 lines
drivers/gpu/drm/xe/xe_vm.h +2
-1@@ -259,7 +262,8 @@ int xe_vm_validate_protected(struct xe_vm *vm); static inline void xe_vm_queue_rebind_worker(struct xe_vm *vm) { xe_assert(vm->xe, xe_vm_in_preempt_fence_mode(vm)); -queue_work (vm->xe->ordered_wq, &vm->preempt.rebind_work); +queue_work_node (dev_to_node (vm->xe->drm.dev), vm->xe- >rebind_wq, + &vm->preempt.rebind_work);
Is a NUMA_NO_NODE dev_to_node() return OK here?
Thanks,
Thomas
Quoted 3 lines
drivers/gpu/drm/xe/xe_vm.h +0
-0}
/**
Re: [PATCH 5/5] drm/xe: run compute rebind worker on device NUMA node
Quoted 18 lines · Thomas Hellström
Quoted 10 lines · Matthew Auld
preempt_rebind_work_func()currently runs onxe->ordered_wq, whose unbound worker pool spans all NUMA nodes. On multi-socket systems, if the rebind worker runs on a remote socket when faulting userptr pages markedPROT_NONEby AutoNUMA,hmm_range_fault()invokesdo_numa_page()
using the worker's NUMA node and triggersmigrate_misplaced_folio(), pulling pages away from the GPU's local node and causing self- inflicted
MMU notifier invalidations.Quoted 6 lines
Move
vm->preempt.rebind_workonto a dedicatedWQ_UNBOUNDworkqueue (max_active= 1) queued viaqueue_work_node()withdev_to_node(), leaving user-fence signalling onxe->ordered_wq. Guardpreempt_rebind_work_func()with a per-device mutex so compute rebinds remain strictly 1-at-a-time even whenqueue_work_node()falls back across nodes (such asNUMA_NO_NODEor CPU-less nodes).
Quoted 4 lines
I don't remember fully why we have this 1-at-a-time rebind worker. I wonder whether it was because of concurrent validations causing VMs to outcompete eachother for memory. If that was the case, then we might be able to lift that restriction due to the validation guard.
If that is the case, then yeah that would make this a lot nicer.
Quoted 30 lines
Quoted 30 lines
Signed-off-by Matthew Auld <[email protected]>--- drivers/gpu/drm/xe/xe_device.c | 11 ++++++++++- drivers/gpu/drm/xe/xe_device_types.h | 10 +++++++++- drivers/gpu/drm/xe/xe_vm.c | 8 +++++++- drivers/gpu/drm/xe/xe_vm.h | 6 +++++- 4 files changed, 31 insertions(+), 4 deletions(-)drivers/gpu/drm/xe/xe_device.c +2
-0@@ -8,7 +8,9 @@ #include <linux/aperture.h> #include <linux/delay.h> #include <linux/error-injection.h> +#include <linux/mutex.h> #include <linux/units.h> +#include <linux/workqueue.h> #include <drm/drm_client.h> #include <drm/drm_gem_ttm_helper.h>@@ -396,6 +398,11 @@ static void xe_device_destroy(struct drm_device *dev, void *dummy) if (xe->destroy_wq) destroy_workqueue(xe->destroy_wq);
Quoted 6 lines
drivers/gpu/drm/xe/xe_device.c static void xe_device_destroy(struct drm_device *dev, void *dummy) · line 402
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +2
-0+if (xe->rebind_wq) +destroy_workqueue (xe->rebind_wq);Hm. It looks safer if we destroy this wq earlier than the destroy wq? Is there a chance that we put something on the destroy wq from the rebind wq?
Can move.
Quoted 153 lines
Quoted 153 lines
drivers/gpu/drm/xe/xe_device.c +3
-0+ +mutex_destroy (&xe->rebind_lock); + ttm_device_fini(&xe->ttm);if (
atomic_dec_and_test(&xe_device_count))drivers/gpu/drm/xe/xe_device.c +1
-0@@ -472,6 +479,7 @@ int xe_device_init_early(struct xe_device *xe) return err; xe_bo_dev_init(&xe->bo_device); +mutex_init (&xe->rebind_lock); atomic_inc(&xe_device_count); err = drmm_add_action_or_reset(&xe->drm, xe_device_destroy,NULL );if (err)
drivers/gpu/drm/xe/xe_device.c +1
-0@@ -518,10 +526,11 @@ int xe_device_init_early(struct xe_device *xe) xe->preempt_fence_wq = alloc_ordered_workqueue("xe-preempt- fence-wq",WQ_MEM_RECLAIM ); + xe->rebind_wq =alloc_workqueue ("xe-rebind-wq" ,WQ_UNBOUND ,1 ); xe->ordered_wq = alloc_ordered_workqueue("xe-ordered-wq",0 ); xe->unordered_wq = alloc_workqueue("xe-unordered-wq",WQ_PERCPU ,0 );
xe->destroy_wq= alloc_workqueue("xe-destroy-wq",WQ_PERCPU
|WQ_MEM_RECLAIM, 0);drivers/gpu/drm/xe/xe_device.c +1
-1- if (!xe->ordered_wq || !xe->unordered_wq || + if (!xe->ordered_wq || !xe->unordered_wq || !xe->rebind_wq|| !xe->preempt_fence_wq || !xe->destroy_wq) {/*
* Cleanup done inxe_device_destroyviadrivers/gpu/drm/xe/xe_device_types.h +3
-1@@ -6,7 +6,9 @@ #ifndef _XE_DEVICE_TYPES_H_ #define _XE_DEVICE_TYPES_H_ +#include <linux/mutex.h> #include <linux/pci.h> +#include <linux/workqueue.h> #include <drm/drm_device.h> #include <drm/drm_file.h>@@ -375,7 +377,13 @@ struct xe_device { /** @preempt_fence_wq: used to serialize preempt fences */ struct workqueue_struct *preempt_fence_wq; -/** @ordered_wq: used to serialize compute mode resume */ +/** @rebind_wq: used to run compute mode rebind work on device node */
drivers/gpu/drm/xe/xe_device_types.h +3
-0+struct workqueue_struct *rebind_wq; + +/** @rebind_lock: serializes compute mode rebind workers per device */
drivers/gpu/drm/xe/xe_device_types.h +3
-0+struct mutex rebind_lock; + +/** @ordered_wq: used to serialize ordered work */ struct workqueue_struct *ordered_wq; /** @unordered_wq: used to serialize unordered work */drivers/gpu/drm/xe/xe_vm.c +2
-1@@ -18,6 +18,7 @@ #include <linux/delay.h> #include <linux/kthread.h> #include <linux/mm.h> +#include <linux/mutex.h> #include <linux/sched/signal.h> #include <linux/swap.h>@@ -540,7 +541,7 @@ static bool vm_suspend_rebind_worker(struct xe_vm*vm) */ void xe_vm_resume_rebind_worker(struct xe_vm *vm) { -queue_work (vm->xe->ordered_wq, &vm->preempt.rebind_work); +xe_vm_queue_rebind_worker (vm); }#if
IS_ENABLED(CONFIG_DRM_XE_USERPTR_INVAL_INJECT)drivers/gpu/drm/xe/xe_vm.c +3
-0@@ -581,16 +582,19 @@ static void preempt_rebind_work_func(struct work_struct *w) xe_assert(vm->xe, xe_vm_in_preempt_fence_mode(vm)); trace_xe_vm_rebind_worker_enter(vm); +mutex_lock (&vm->xe->rebind_lock); down_write(&vm->lock); if (xe_vm_is_closed_or_banned(vm)) { up_write(&vm->lock); +mutex_unlock (&vm->xe->rebind_lock); trace_xe_vm_rebind_worker_exit(vm); return; } if (!try_wait_for_completion(&vm->xe->pm_block) &&vm_suspend_rebind_worker (vm)) { up_write(&vm->lock); +mutex_unlock (&vm->xe->rebind_lock); /* We don't actually block but don't make progress.*/
xe_pm_might_block_on_suspend();
return;drivers/gpu/drm/xe/xe_vm.c +1
-0@@ -666,6 +670,7 @@ static void preempt_rebind_work_func(structwork_struct *w) * lock make progress between attempts. */ up_write(&vm->lock); +mutex_unlock (&vm->xe->rebind_lock); free_preempt_fences(&preempt_fences); xe_vm_queue_rebind_worker(vm);
trace_xe_vm_rebind_worker_exit(vm);drivers/gpu/drm/xe/xe_vm.c +1
-0@@ -679,6 +684,7 @@ static void preempt_rebind_work_func(struct work_struct *w) xe_vm_kill(vm, true); } up_write(&vm->lock); +mutex_unlock (&vm->xe->rebind_lock); free_preempt_fences(&preempt_fences);drivers/gpu/drm/xe/xe_vm.h +4
-1@@ -6,6 +6,9 @@ #ifndef _XE_VM_H_ #define _XE_VM_H_ +#include <linux/device.h> +#include <linux/workqueue.h> + #include "xe_assert.h" #include "xe_bo_types.h" #include "xe_macros.h"@@ -259,7 +262,8 @@ int xe_vm_validate_protected(struct xe_vm *vm); static inline void xe_vm_queue_rebind_worker(struct xe_vm *vm) { xe_assert(vm->xe, xe_vm_in_preempt_fence_mode(vm)); -queue_work (vm->xe->ordered_wq, &vm->preempt.rebind_work); + queue_work_node(dev_to_node(vm->xe->drm.dev), vm->xe-
Quoted 4 lines
drivers/gpu/drm/xe/xe_vm.h int xe_vm_validate_protected(struct xe_vm *vm); · line 267
Quoted 2 lines
drivers/gpu/drm/xe/xe_vm.h +1
-0> rebind_wq, + &vm->preempt.rebind_work);Is a
NUMA_NO_NODEdev_to_node()return OK here?
Yeah, select_numa_node_cpu() checks this:
if (node < 0 || node >= MAX_NUMNODES || !node_online(node))
return WORK_CPU_UNBOUND;
And here NUMA_NO_NODE = -1
Quoted 9 lines
Thanks,
ThomasQuoted 3 lines
drivers/gpu/drm/xe/xe_vm.h +0
-0}/**
Patchwork
CI✓ CI.KUnit: success for Non-fatal repin retries and NUMA-local rebind worker
In reply to Matthew Auld== Series Details ==
== Series Details ==
Series: Non-fatal repin retries and NUMA-local rebind worker
URL : https://patchwork.freedesktop.org/series/179052/
State : success
== Summary ==
+ trap cleanup EXIT
+ kunitconfigs=('/kernel/drivers/gpu/tests/.kunitconfig' '/kernel/drivers/gpu/drm/xe/.kunitconfig' '/kernel/drivers/gpu/drm/tests/.kunitconfig' '/kernel/drivers/gpu/drm/ttm/tests/.kunitconfig' '/kernel/drivers/dma-buf/.kunitconfig')
+ for kcfg in "${kunitconfigs[@]}"
+ [[ ! -f /kernel/drivers/gpu/tests/.kunitconfig ]]
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/tests/.kunitconfig
[13:14:28] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig [13:14:34] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48 [13:14:54] Starting KUnit Kernel (1/1)... [13:14:54] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [13:14:54] ================= gpu_buddy (15 subtests) ================== [13:14:54] [PASSED] gpu_test_buddy_alloc_limit [13:14:54] [PASSED] gpu_test_buddy_alloc_optimistic [13:14:54] [PASSED] gpu_test_buddy_alloc_pessimistic [13:14:54] [PASSED] gpu_test_buddy_alloc_pathological [13:14:54] [PASSED] gpu_test_buddy_alloc_contiguous [13:14:54] [PASSED] gpu_test_buddy_alloc_clear [13:14:54] [PASSED] gpu_test_buddy_alloc_range [13:14:54] [PASSED] gpu_test_buddy_alloc_range_bias [13:14:55] [PASSED] gpu_test_buddy_alloc_range_clear_guard [13:14:56] [PASSED] gpu_test_buddy_fragmentation_performance [13:14:56] [PASSED] gpu_test_buddy_dirty_tracker_performance [13:14:56] [PASSED] gpu_test_buddy_alloc_exceeds_max_order [13:14:56] [PASSED] gpu_test_buddy_offset_aligned_allocation [13:14:56] [PASSED] gpu_test_buddy_subtree_offset_alignment_stress [13:14:56] [PASSED] gpu_test_buddy_addr_to_block [13:14:56] ==================== [PASSED] gpu_buddy ==================== [13:14:56] ============================================================ [13:14:56] Testing complete. Ran 15 tests: passed: 15 [13:14:56] Elapsed time: 27.992s total, 5.152s configuring, 20.822s building, 1.979s running
+ for kcfg in "${kunitconfigs[@]}"
+ [[ ! -f /kernel/drivers/gpu/drm/xe/.kunitconfig ]]
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig [13:14:57] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig [13:14:59] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48 [13:15:38] Starting KUnit Kernel (1/1)... [13:15:38] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [13:15:38] ================= xe_ggtt_iov (9 subtests) ================= [13:15:38] [PASSED] init_shared_pf [13:15:38] [PASSED] init_partial_overlap [13:15:38] [PASSED] alloc_usable_pool_low [13:15:38] [PASSED] alloc_shareable_pool_high [13:15:38] [PASSED] alloc_partial_overlap [13:15:38] [PASSED] alloc_partial_overlap_usable_full [13:15:38] [PASSED] alloc_partial_overlap_shareable_full [13:15:38] [PASSED] alloc_shareable_pool_unavailable [13:15:38] [PASSED] alloc_shareable_pool_oversized [13:15:38] =================== [PASSED] xe_ggtt_iov =================== [13:15:38] =================== xe_ggtt (3 subtests) =================== [13:15:38] [PASSED] init_native [13:15:38] [PASSED] alloc_usable_pool_native [13:15:38] [PASSED] alloc_usable_pool_oversized [13:15:38] ===================== [PASSED] xe_ggtt ===================== [13:15:38] ================== guc_buf (11 subtests) =================== [13:15:38] [PASSED] test_smallest [13:15:38] [PASSED] test_largest [13:15:38] [PASSED] test_granular [13:15:38] [PASSED] test_unique [13:15:38] [PASSED] test_overlap [13:15:38] [PASSED] test_reusable [13:15:38] [PASSED] test_too_big [13:15:38] [PASSED] test_flush [13:15:38] [PASSED] test_lookup [13:15:38] [PASSED] test_data [13:15:38] [PASSED] test_class [13:15:38] ===================== [PASSED] guc_buf ===================== [13:15:38] =================== guc_dbm (7 subtests) =================== [13:15:38] [PASSED] test_empty [13:15:38] [PASSED] test_default [13:15:38] ======================== test_size ======================== [13:15:38] [PASSED] 4 [13:15:38] [PASSED] 8 [13:15:38] [PASSED] 32 [13:15:38] [PASSED] 256 [13:15:38] ==================== [PASSED] test_size ==================== [13:15:38] ======================= test_reuse ======================== [13:15:38] [PASSED] 4 [13:15:38] [PASSED] 8 [13:15:38] [PASSED] 32 [13:15:38] [PASSED] 256 [13:15:38] =================== [PASSED] test_reuse ==================== [13:15:38] =================== test_range_overlap ==================== [13:15:38] [PASSED] 4 [13:15:38] [PASSED] 8 [13:15:38] [PASSED] 32 [13:15:38] [PASSED] 256 [13:15:38] =============== [PASSED] test_range_overlap ================ [13:15:38] =================== test_range_compact ==================== [13:15:38] [PASSED] 4 [13:15:38] [PASSED] 8 [13:15:38] [PASSED] 32 [13:15:38] [PASSED] 256 [13:15:38] =============== [PASSED] test_range_compact ================ [13:15:38] ==================== test_range_spare ===================== [13:15:38] [PASSED] 4 [13:15:38] [PASSED] 8 [13:15:38] [PASSED] 32 [13:15:38] [PASSED] 256 [13:15:38] ================ [PASSED] test_range_spare ================= [13:15:38] ===================== [PASSED] guc_dbm ===================== [13:15:38] ================== guc_idm (22 subtests) =================== [13:15:38] [PASSED] bad_init [13:15:38] [PASSED] no_init [13:15:38] [PASSED] init_fini [13:15:38] [PASSED] check_init_small [13:15:38] [PASSED] check_init_shared [13:15:38] [PASSED] check_used [13:15:38] [PASSED] check_quota [13:15:38] [PASSED] check_all [13:15:38] [PASSED] check_limits [13:15:38] [PASSED] check_overlap [13:15:38] [PASSED] check_overlap_alloc [13:15:38] [PASSED] check_overlap_release [13:15:38] [PASSED] check_overlap_partial_init [13:15:38] [PASSED] check_overlap_partial_shared_range_blocking [13:15:38] [PASSED] check_used_usable [13:15:38] [PASSED] check_used_shareable [13:15:38] [PASSED] check_used_mixed [13:15:38] [PASSED] check_release_usable_range [13:15:38] [PASSED] check_release_shareable_range [13:15:38] [PASSED] check_split_boundaries [13:15:38] [PASSED] check_shareable_spare [13:15:38] [PASSED] check_shareable_spare_fragmented_tail [13:15:38] ===================== [PASSED] guc_idm ===================== [13:15:38] ============== guc_klv_helpers (13 subtests) =============== [13:15:38] [PASSED] test_count [13:15:38] [PASSED] test_encode_u32 [13:15:38] [PASSED] test_encode_u64 [13:15:38] [PASSED] test_encode_string [13:15:38] [PASSED] test_encode_object_raw [13:15:38] [PASSED] test_encode_object_klv [13:15:38] [PASSED] test_encode_object_nested [13:15:38] [PASSED] test_encode_object_basic [13:15:38] ===================== test_decode_u16 ===================== [13:15:38] [PASSED] empty [13:15:38] [PASSED] valid [13:15:38] [PASSED] max [13:15:38] [PASSED] big [13:15:38] [PASSED] long [13:15:38] ================= [PASSED] test_decode_u16 ================= [13:15:38] ===================== test_decode_u32 ===================== [13:15:38] [PASSED] empty [13:15:38] [PASSED] valid [13:15:38] [PASSED] max [13:15:38] [PASSED] long [13:15:38] ================= [PASSED] test_decode_u32 ================= [13:15:38] ===================== test_decode_u64 ===================== [13:15:38] [PASSED] empty [13:15:38] [PASSED] short [13:15:38] [PASSED] valid [13:15:38] [PASSED] max [13:15:38] [PASSED] long [13:15:38] ================= [PASSED] test_decode_u64 ================= [13:15:38] ===================== test_decode_str ===================== [13:15:38] [PASSED] empty [13:15:38] [PASSED] one [13:15:38] [PASSED] one_trash [13:15:38] [PASSED] two [13:15:38] [PASSED] two_trash [13:15:38] [PASSED] three [13:15:38] [PASSED] dword [13:15:38] [PASSED] four [13:15:38] [PASSED] five [13:15:38] [PASSED] six [13:15:38] [PASSED] seven [13:15:38] [PASSED] qword [13:15:38] ================= [PASSED] test_decode_str ================= [13:15:38] [PASSED] test_print [13:15:38] ================= [PASSED] guc_klv_helpers ================= [13:15:38] =================== xe_log (4 subtests) ==================== [13:15:38] [PASSED] demo_cper [13:15:38] [PASSED] demo_dmesg [13:15:38] ======================= test_dmesg ======================== [13:15:38] [PASSED] test_fatal [13:15:38] [PASSED] test_fatal_tile [13:15:38] [PASSED] test_fatal_gt [13:15:38] [PASSED] test_fatal_comp [13:15:38] [PASSED] test_fatal_comp_tile [13:15:38] [PASSED] test_fatal_comp_gt [13:15:38] [PASSED] test_fatal_all [13:15:38] [PASSED] test_recoverable [13:15:38] [PASSED] test_recoverable_tile [13:15:38] [PASSED] test_recoverable_gt [13:15:38] [PASSED] test_recoverable_comp [13:15:38] [PASSED] test_recoverable_comp_tile [13:15:38] [PASSED] test_recoverable_comp_gt [13:15:38] [PASSED] test_recoverable_all [13:15:38] [PASSED] test_info [13:15:38] [PASSED] test_info_tile [13:15:38] [PASSED] test_info_gt [13:15:38] [PASSED] test_info_err [13:15:38] [PASSED] test_info_comp [13:15:38] [PASSED] test_info_comp_tile [13:15:38] [PASSED] test_info_comp_gt [13:15:38] [PASSED] test_info_all [13:15:38] [PASSED] test_hw_fatal [13:15:38] [PASSED] test_hw_recoverable [13:15:38] [PASSED] test_hw_corrected [13:15:38] [PASSED] test_hw_informational [13:15:38] =================== [PASSED] test_dmesg ==================== [13:15:38] ====================== test_invalid ======================= [13:15:38] [SKIPPED] no-component no-location no-warn (requires CONFIG_DRM_XE_DEBUG) [13:15:38] [SKIPPED] reserved location (requires CONFIG_DRM_XE_DEBUG) [13:15:38] [SKIPPED] unknown location (requires CONFIG_DRM_XE_DEBUG) [13:15:38] [SKIPPED] nonzero-device-id location (requires CONFIG_DRM_XE_DEBUG) [13:15:38] [SKIPPED] invalid-tile-id location (requires CONFIG_DRM_XE_DEBUG) [13:15:38] [SKIPPED] invalid-gt-id location (requires CONFIG_DRM_XE_DEBUG) [13:15:38] [SKIPPED] unknown component class (requires CONFIG_DRM_XE_DEBUG) [13:15:38] [SKIPPED] unknown system component (requires CONFIG_DRM_XE_DEBUG) [13:15:38] [SKIPPED] unknown hardware component (requires CONFIG_DRM_XE_DEBUG) [13:15:38] [SKIPPED] unknown component and location (requires CONFIG_DRM_XE_DEBUG) [13:15:38] ================== [SKIPPED] test_invalid ================== [13:15:38] ===================== [PASSED] xe_log ====================== [13:15:38] ================== no_relay (3 subtests) =================== [13:15:38] [PASSED] xe_drops_guc2pf_if_not_ready [13:15:38] [PASSED] xe_drops_guc2vf_if_not_ready [13:15:38] [PASSED] xe_rejects_send_if_not_ready [13:15:38] ==================== [PASSED] no_relay ===================== [13:15:38] ================== pf_relay (14 subtests) ================== [13:15:38] [PASSED] pf_rejects_guc2pf_too_short [13:15:38] [PASSED] pf_rejects_guc2pf_too_long [13:15:38] [PASSED] pf_rejects_guc2pf_no_payload [13:15:38] [PASSED] pf_fails_no_payload [13:15:38] [PASSED] pf_fails_bad_origin [13:15:38] [PASSED] pf_fails_bad_type [13:15:38] [PASSED] pf_txn_reports_error [13:15:38] [PASSED] pf_txn_sends_pf2guc [13:15:38] [PASSED] pf_sends_pf2guc [13:15:38] [SKIPPED] pf_loopback_nop (requires CONFIG_DRM_XE_DEBUG_SRIOV) [13:15:38] [SKIPPED] pf_loopback_echo (requires CONFIG_DRM_XE_DEBUG_SRIOV) [13:15:38] [SKIPPED] pf_loopback_fail (requires CONFIG_DRM_XE_DEBUG_SRIOV) [13:15:38] [SKIPPED] pf_loopback_busy (requires CONFIG_DRM_XE_DEBUG_SRIOV) [13:15:38] [SKIPPED] pf_loopback_retry (requires CONFIG_DRM_XE_DEBUG_SRIOV) [13:15:38] ==================== [PASSED] pf_relay ===================== [13:15:38] ================== vf_relay (3 subtests) =================== [13:15:38] [PASSED] vf_rejects_guc2vf_too_short [13:15:38] [PASSED] vf_rejects_guc2vf_too_long [13:15:38] [PASSED] vf_rejects_guc2vf_no_payload [13:15:38] ==================== [PASSED] vf_relay ===================== [13:15:38] ================ pf_gt_config (9 subtests) ================= [13:15:38] [PASSED] fair_contexts_1vf [13:15:38] [PASSED] fair_doorbells_1vf [13:15:38] [PASSED] fair_ggtt_1vf [13:15:38] ====================== fair_vram_1vf ====================== [13:15:38] [PASSED] 3.50 GiB [13:15:38] [PASSED] 11.5 GiB [13:15:38] [PASSED] 15.5 GiB [13:15:38] [PASSED] 31.5 GiB [13:15:38] [PASSED] 63.5 GiB [13:15:38] [PASSED] 1.91 GiB [13:15:38] ================== [PASSED] fair_vram_1vf ================== [13:15:38] ================ fair_vram_1vf_admin_only ================= [13:15:38] [PASSED] 3.50 GiB [13:15:38] [PASSED] 11.5 GiB [13:15:38] [PASSED] 15.5 GiB [13:15:38] [PASSED] 31.5 GiB [13:15:38] [PASSED] 63.5 GiB [13:15:38] [PASSED] 1.91 GiB [13:15:38] ============ [PASSED] fair_vram_1vf_admin_only ============= [13:15:38] ====================== fair_contexts ====================== [13:15:38] [PASSED] 1 VF [13:15:38] [PASSED] 2 VFs [13:15:38] [PASSED] 3 VFs [13:15:38] [PASSED] 4 VFs [13:15:38] [PASSED] 5 VFs [13:15:38] [PASSED] 6 VFs [13:15:38] [PASSED] 7 VFs [13:15:38] [PASSED] 8 VFs [13:15:38] [PASSED] 9 VFs [13:15:38] [PASSED] 10 VFs [13:15:38] [PASSED] 11 VFs [13:15:38] [PASSED] 12 VFs [13:15:38] [PASSED] 13 VFs [13:15:38] [PASSED] 14 VFs [13:15:38] [PASSED] 15 VFs [13:15:38] [PASSED] 16 VFs [13:15:38] [PASSED] 17 VFs [13:15:38] [PASSED] 18 VFs [13:15:38] [PASSED] 19 VFs [13:15:38] [PASSED] 20 VFs [13:15:38] [PASSED] 21 VFs [13:15:38] [PASSED] 22 VFs [13:15:38] [PASSED] 23 VFs [13:15:38] [PASSED] 24 VFs [13:15:38] [PASSED] 25 VFs [13:15:38] [PASSED] 26 VFs [13:15:38] [PASSED] 27 VFs [13:15:38] [PASSED] 28 VFs [13:15:38] [PASSED] 29 VFs [13:15:38] [PASSED] 30 VFs [13:15:38] [PASSED] 31 VFs [13:15:38] [PASSED] 32 VFs [13:15:38] [PASSED] 33 VFs [13:15:38] [PASSED] 34 VFs [13:15:38] [PASSED] 35 VFs [13:15:38] [PASSED] 36 VFs [13:15:38] [PASSED] 37 VFs [13:15:38] [PASSED] 38 VFs [13:15:38] [PASSED] 39 VFs [13:15:38] [PASSED] 40 VFs [13:15:38] [PASSED] 41 VFs [13:15:38] [PASSED] 42 VFs [13:15:38] [PASSED] 43 VFs [13:15:38] [PASSED] 44 VFs [13:15:38] [PASSED] 45 VFs [13:15:38] [PASSED] 46 VFs [13:15:38] [PASSED] 47 VFs [13:15:38] [PASSED] 48 VFs [13:15:38] [PASSED] 49 VFs [13:15:38] [PASSED] 50 VFs [13:15:38] [PASSED] 51 VFs [13:15:38] [PASSED] 52 VFs [13:15:38] [PASSED] 53 VFs [13:15:38] [PASSED] 54 VFs [13:15:38] [PASSED] 55 VFs [13:15:38] [PASSED] 56 VFs [13:15:38] [PASSED] 57 VFs [13:15:38] [PASSED] 58 VFs [13:15:38] [PASSED] 59 VFs [13:15:38] [PASSED] 60 VFs [13:15:38] [PASSED] 61 VFs [13:15:38] [PASSED] 62 VFs [13:15:38] [PASSED] 63 VFs [13:15:38] ================== [PASSED] fair_contexts ================== [13:15:38] ===================== fair_doorbells ====================== [13:15:38] [PASSED] 1 VF [13:15:38] [PASSED] 2 VFs [13:15:38] [PASSED] 3 VFs [13:15:38] [PASSED] 4 VFs [13:15:38] [PASSED] 5 VFs [13:15:38] [PASSED] 6 VFs [13:15:38] [PASSED] 7 VFs [13:15:38] [PASSED] 8 VFs [13:15:38] [PASSED] 9 VFs [13:15:38] [PASSED] 10 VFs [13:15:38] [PASSED] 11 VFs [13:15:38] [PASSED] 12 VFs [13:15:38] [PASSED] 13 VFs [13:15:38] [PASSED] 14 VFs [13:15:38] [PASSED] 15 VFs [13:15:38] [PASSED] 16 VFs [13:15:38] [PASSED] 17 VFs [13:15:38] [PASSED] 18 VFs [13:15:38] [PASSED] 19 VFs [13:15:38] [PASSED] 20 VFs [13:15:38] [PASSED] 21 VFs [13:15:38] [PASSED] 22 VFs [13:15:38] [PASSED] 23 VFs [13:15:38] [PASSED] 24 VFs [13:15:38] [PASSED] 25 VFs [13:15:38] [PASSED] 26 VFs [13:15:38] [PASSED] 27 VFs [13:15:38] [PASSED] 28 VFs [13:15:38] [PASSED] 29 VFs [13:15:38] [PASSED] 30 VFs [13:15:38] [PASSED] 31 VFs [13:15:38] [PASSED] 32 VFs [13:15:38] [PASSED] 33 VFs [13:15:38] [PASSED] 34 VFs [13:15:38] [PASSED] 35 VFs [13:15:38] [PASSED] 36 VFs [13:15:38] [PASSED] 37 VFs [13:15:38] [PASSED] 38 VFs [13:15:38] [PASSED] 39 VFs [13:15:38] [PASSED] 40 VFs [13:15:38] [PASSED] 41 VFs [13:15:38] [PASSED] 42 VFs [13:15:38] [PASSED] 43 VFs [13:15:38] [PASSED] 44 VFs [13:15:38] [PASSED] 45 VFs [13:15:38] [PASSED] 46 VFs [13:15:38] [PASSED] 47 VFs [13:15:38] [PASSED] 48 VFs [13:15:38] [PASSED] 49 VFs [13:15:38] [PASSED] 50 VFs [13:15:38] [PASSED] 51 VFs [13:15:38] [PASSED] 52 VFs [13:15:38] [PASSED] 53 VFs [13:15:38] [PASSED] 54 VFs [13:15:38] [PASSED] 55 VFs [13:15:38] [PASSED] 56 VFs [13:15:38] [PASSED] 57 VFs [13:15:38] [PASSED] 58 VFs [13:15:38] [PASSED] 59 VFs [13:15:38] [PASSED] 60 VFs [13:15:38] [PASSED] 61 VFs [13:15:38] [PASSED] 62 VFs [13:15:38] [PASSED] 63 VFs [13:15:38] ================= [PASSED] fair_doorbells ================== [13:15:38] ======================== fair_ggtt ======================== [13:15:38] [PASSED] 1 VF [13:15:38] [PASSED] 2 VFs [13:15:38] [PASSED] 3 VFs [13:15:38] [PASSED] 4 VFs [13:15:38] [PASSED] 5 VFs [13:15:38] [PASSED] 6 VFs [13:15:38] [PASSED] 7 VFs [13:15:38] [PASSED] 8 VFs [13:15:38] [PASSED] 9 VFs [13:15:38] [PASSED] 10 VFs [13:15:38] [PASSED] 11 VFs [13:15:38] [PASSED] 12 VFs [13:15:38] [PASSED] 13 VFs [13:15:38] [PASSED] 14 VFs [13:15:38] [PASSED] 15 VFs [13:15:38] [PASSED] 16 VFs [13:15:38] [PASSED] 17 VFs [13:15:38] [PASSED] 18 VFs [13:15:38] [PASSED] 19 VFs [13:15:38] [PASSED] 20 VFs [13:15:38] [PASSED] 21 VFs [13:15:38] [PASSED] 22 VFs [13:15:38] [PASSED] 23 VFs [13:15:38] [PASSED] 24 VFs [13:15:38] [PASSED] 25 VFs [13:15:38] [PASSED] 26 VFs [13:15:38] [PASSED] 27 VFs [13:15:38] [PASSED] 28 VFs [13:15:38] [PASSED] 29 VFs [13:15:38] [PASSED] 30 VFs [13:15:38] [PASSED] 31 VFs [13:15:38] [PASSED] 32 VFs [13:15:38] [PASSED] 33 VFs [13:15:38] [PASSED] 34 VFs [13:15:38] [PASSED] 35 VFs [13:15:38] [PASSED] 36 VFs [13:15:38] [PASSED] 37 VFs [13:15:38] [PASSED] 38 VFs [13:15:38] [PASSED] 39 VFs [13:15:38] [PASSED] 40 VFs [13:15:38] [PASSED] 41 VFs [13:15:38] [PASSED] 42 VFs [13:15:38] [PASSED] 43 VFs [13:15:38] [PASSED] 44 VFs [13:15:38] [PASSED] 45 VFs [13:15:38] [PASSED] 46 VFs [13:15:38] [PASSED] 47 VFs [13:15:38] [PASSED] 48 VFs [13:15:38] [PASSED] 49 VFs [13:15:38] [PASSED] 50 VFs [13:15:38] [PASSED] 51 VFs [13:15:38] [PASSED] 52 VFs [13:15:38] [PASSED] 53 VFs [13:15:38] [PASSED] 54 VFs [13:15:38] [PASSED] 55 VFs [13:15:38] [PASSED] 56 VFs [13:15:38] [PASSED] 57 VFs [13:15:38] [PASSED] 58 VFs [13:15:38] [PASSED] 59 VFs [13:15:38] [PASSED] 60 VFs [13:15:38] [PASSED] 61 VFs [13:15:38] [PASSED] 62 VFs [13:15:38] [PASSED] 63 VFs [13:15:38] ==================== [PASSED] fair_ggtt ==================== [13:15:38] ======================== fair_vram ======================== [13:15:38] [PASSED] 1 VF [13:15:38] [PASSED] 2 VFs [13:15:38] [PASSED] 3 VFs [13:15:38] [PASSED] 4 VFs [13:15:38] [PASSED] 5 VFs [13:15:38] [PASSED] 6 VFs [13:15:38] [PASSED] 7 VFs [13:15:38] [PASSED] 8 VFs [13:15:38] [PASSED] 9 VFs [13:15:38] [PASSED] 10 VFs [13:15:38] [PASSED] 11 VFs [13:15:38] [PASSED] 12 VFs [13:15:38] [PASSED] 13 VFs [13:15:38] [PASSED] 14 VFs [13:15:38] [PASSED] 15 VFs [13:15:38] [PASSED] 16 VFs [13:15:38] [PASSED] 17 VFs [13:15:38] [PASSED] 18 VFs [13:15:38] [PASSED] 19 VFs [13:15:38] [PASSED] 20 VFs [13:15:38] [PASSED] 21 VFs [13:15:38] [PASSED] 22 VFs [13:15:38] [PASSED] 23 VFs [13:15:38] [PASSED] 24 VFs [13:15:38] [PASSED] 25 VFs [13:15:38] [PASSED] 26 VFs [13:15:38] [PASSED] 27 VFs [13:15:38] [PASSED] 28 VFs [13:15:38] [PASSED] 29 VFs [13:15:38] [PASSED] 30 VFs [13:15:38] [PASSED] 31 VFs [13:15:38] [PASSED] 32 VFs [13:15:38] [PASSED] 33 VFs [13:15:38] [PASSED] 34 VFs [13:15:38] [PASSED] 35 VFs [13:15:38] [PASSED] 36 VFs [13:15:38] [PASSED] 37 VFs [13:15:38] [PASSED] 38 VFs [13:15:38] [PASSED] 39 VFs [13:15:38] [PASSED] 40 VFs [13:15:38] [PASSED] 41 VFs [13:15:38] [PASSED] 42 VFs [13:15:38] [PASSED] 43 VFs [13:15:38] [PASSED] 44 VFs [13:15:38] [PASSED] 45 VFs [13:15:38] [PASSED] 46 VFs [13:15:38] [PASSED] 47 VFs [13:15:38] [PASSED] 48 VFs [13:15:38] [PASSED] 49 VFs [13:15:38] [PASSED] 50 VFs [13:15:38] [PASSED] 51 VFs [13:15:38] [PASSED] 52 VFs [13:15:38] [PASSED] 53 VFs [13:15:38] [PASSED] 54 VFs [13:15:38] [PASSED] 55 VFs [13:15:38] [PASSED] 56 VFs [13:15:38] [PASSED] 57 VFs [13:15:38] [PASSED] 58 VFs [13:15:38] [PASSED] 59 VFs [13:15:38] [PASSED] 60 VFs [13:15:38] [PASSED] 61 VFs [13:15:38] [PASSED] 62 VFs [13:15:38] [PASSED] 63 VFs [13:15:38] ==================== [PASSED] fair_vram ==================== [13:15:38] ================== [PASSED] pf_gt_config =================== [13:15:38] ===================== lmtt (1 subtest) ===================== [13:15:38] ======================== test_ops ========================= [13:15:38] [PASSED] 2-level [13:15:38] [PASSED] multi-level [13:15:38] ==================== [PASSED] test_ops ===================== [13:15:38] ====================== [PASSED] lmtt ======================= [13:15:38] ================= sriov_packet (1 subtest) ================= [13:15:38] [PASSED] test_descriptor_init [13:15:38] ================== [PASSED] sriov_packet =================== [13:15:38] ================= pf_service (11 subtests) ================= [13:15:38] [PASSED] pf_negotiate_any [13:15:38] [PASSED] pf_negotiate_base_match [13:15:38] [PASSED] pf_negotiate_base_newer [13:15:38] [PASSED] pf_negotiate_base_next [13:15:38] [SKIPPED] pf_negotiate_base_older (no older minor) [13:15:38] [PASSED] pf_negotiate_base_prev [13:15:38] [PASSED] pf_negotiate_latest_match [13:15:38] [PASSED] pf_negotiate_latest_newer [13:15:38] [PASSED] pf_negotiate_latest_next [13:15:38] [SKIPPED] pf_negotiate_latest_older (no older minor) [13:15:38] [SKIPPED] pf_negotiate_latest_prev (no prev major) [13:15:38] =================== [PASSED] pf_service ==================== [13:15:38] ================= xe_guc_g2g (2 subtests) ================== [13:15:38] ============== xe_live_guc_g2g_kunit_default ============== [13:15:38] ========= [SKIPPED] xe_live_guc_g2g_kunit_default ========== [13:15:38] ============== xe_live_guc_g2g_kunit_allmem =============== [13:15:38] ========== [SKIPPED] xe_live_guc_g2g_kunit_allmem ========== [13:15:38] =================== [SKIPPED] xe_guc_g2g =================== [13:15:38] =================== xe_mocs (2 subtests) =================== [13:15:38] ================ xe_live_mocs_kernel_kunit ================ [13:15:38] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============ [13:15:38] ================ xe_live_mocs_reset_kunit ================= [13:15:38] ============ [SKIPPED] xe_live_mocs_reset_kunit ============ [13:15:38] ==================== [SKIPPED] xe_mocs ===================== [13:15:38] ================= xe_migrate (3 subtests) ================== [13:15:38] ================= xe_migrate_sanity_kunit ================= [13:15:38] ============ [SKIPPED] xe_migrate_sanity_kunit ============= [13:15:38] ================== xe_validate_ccs_kunit ================== [13:15:38] ============= [SKIPPED] xe_validate_ccs_kunit ============== [13:15:38] ============= xe_migrate_access_memory_kunit ============== [13:15:38] ========= [SKIPPED] xe_migrate_access_memory_kunit ========= [13:15:38] =================== [SKIPPED] xe_migrate =================== [13:15:38] ================== xe_dma_buf (1 subtest) ================== [13:15:38] ==================== xe_dma_buf_kunit ===================== [13:15:38] ================ [SKIPPED] xe_dma_buf_kunit ================ [13:15:38] =================== [SKIPPED] xe_dma_buf =================== [13:15:38] ================= xe_bo_shrink (1 subtest) ================= [13:15:38] =================== xe_bo_shrink_kunit ==================== [13:15:38] =============== [SKIPPED] xe_bo_shrink_kunit =============== [13:15:38] ================== [SKIPPED] xe_bo_shrink ================== [13:15:38] ==================== xe_bo (2 subtests) ==================== [13:15:38] ================== xe_ccs_migrate_kunit =================== [13:15:38] ============== [SKIPPED] xe_ccs_migrate_kunit ============== [13:15:38] ==================== xe_bo_evict_kunit ==================== [13:15:38] =============== [SKIPPED] xe_bo_evict_kunit ================ [13:15:38] ===================== [SKIPPED] xe_bo ====================== [13:15:38] =================== xe_any (9 subtests) ==================== [13:15:38] [PASSED] test_to_xe [13:15:38] [PASSED] test_to_dev [13:15:38] [PASSED] test_to_pdev [13:15:38] [PASSED] test_to_drm [13:15:38] [PASSED] test_if_pdev [13:15:38] [PASSED] test_if_xe [13:15:38] [PASSED] test_if_tile [13:15:38] [PASSED] test_if_gt [13:15:38] [PASSED] test_to_id [13:15:38] ===================== [PASSED] xe_any ====================== [13:15:38] ==================== args (13 subtests) ==================== [13:15:38] [PASSED] count_args_test [13:15:38] [PASSED] call_args_example [13:15:38] [PASSED] call_args_test [13:15:38] [PASSED] drop_first_arg_example [13:15:38] [PASSED] drop_first_arg_test [13:15:38] [PASSED] first_arg_example [13:15:38] [PASSED] first_arg_test [13:15:38] [PASSED] last_arg_example [13:15:38] [PASSED] last_arg_test [13:15:38] [PASSED] pick_arg_example [13:15:38] [PASSED] if_args_example [13:15:38] [PASSED] if_args_test [13:15:38] [PASSED] sep_comma_example [13:15:38] ====================== [PASSED] args ======================= [13:15:38] =================== xe_pci (3 subtests) ==================== [13:15:38] ==================== check_graphics_ip ==================== [13:15:38] [PASSED] 12.00 Xe_LP [13:15:38] [PASSED] 12.10 Xe_LP+ [13:15:38] [PASSED] 12.55 Xe_HPG [13:15:38] [PASSED] 12.60 Xe_HPC [13:15:38] [PASSED] 12.70 Xe_LPG [13:15:38] [PASSED] 12.71 Xe_LPG [13:15:38] [PASSED] 12.74 Xe_LPG+ [13:15:38] [PASSED] 20.01 Xe2_HPG [13:15:38] [PASSED] 20.02 Xe2_HPG [13:15:38] [PASSED] 20.04 Xe2_LPG [13:15:38] [PASSED] 30.00 Xe3_LPG [13:15:38] [PASSED] 30.01 Xe3_LPG [13:15:38] [PASSED] 30.03 Xe3_LPG [13:15:38] [PASSED] 30.04 Xe3_LPG [13:15:38] [PASSED] 30.05 Xe3_LPG [13:15:38] [PASSED] 35.10 Xe3p_LPG [13:15:38] [PASSED] 35.11 Xe3p_XPC [13:15:38] ================ [PASSED] check_graphics_ip ================ [13:15:38] ===================== check_media_ip ====================== [13:15:38] [PASSED] 12.00 Xe_M [13:15:38] [PASSED] 12.55 Xe_HPM [13:15:38] [PASSED] 13.00 Xe_LPM+ [13:15:38] [PASSED] 13.01 Xe2_HPM [13:15:38] [PASSED] 20.00 Xe2_LPM [13:15:38] [PASSED] 30.00 Xe3_LPM [13:15:38] [PASSED] 30.02 Xe3_LPM [13:15:38] [PASSED] 35.00 Xe3p_LPM [13:15:38] [PASSED] 35.03 Xe3p_HPM [13:15:38] ================= [PASSED] check_media_ip ================== [13:15:38] =================== check_platform_desc =================== [13:15:38] [PASSED] 0x9A60 (TIGERLAKE) [13:15:38] [PASSED] 0x9A68 (TIGERLAKE) [13:15:38] [PASSED] 0x9A70 (TIGERLAKE) [13:15:38] [PASSED] 0x9A40 (TIGERLAKE) [13:15:38] [PASSED] 0x9A49 (TIGERLAKE) [13:15:38] [PASSED] 0x9A59 (TIGERLAKE) [13:15:38] [PASSED] 0x9A78 (TIGERLAKE) [13:15:38] [PASSED] 0x9AC0 (TIGERLAKE) [13:15:38] [PASSED] 0x9AC9 (TIGERLAKE) [13:15:38] [PASSED] 0x9AD9 (TIGERLAKE) [13:15:38] [PASSED] 0x9AF8 (TIGERLAKE) [13:15:38] [PASSED] 0x4C80 (ROCKETLAKE) [13:15:38] [PASSED] 0x4C8A (ROCKETLAKE) [13:15:38] [PASSED] 0x4C8B (ROCKETLAKE) [13:15:38] [PASSED] 0x4C8C (ROCKETLAKE) [13:15:38] [PASSED] 0x4C90 (ROCKETLAKE) [13:15:38] [PASSED] 0x4C9A (ROCKETLAKE) [13:15:38] [PASSED] 0x4680 (ALDERLAKE_S) [13:15:38] [PASSED] 0x4682 (ALDERLAKE_S) [13:15:38] [PASSED] 0x4688 (ALDERLAKE_S) [13:15:38] [PASSED] 0x468A (ALDERLAKE_S) [13:15:38] [PASSED] 0x468B (ALDERLAKE_S) [13:15:38] [PASSED] 0x4690 (ALDERLAKE_S) [13:15:38] [PASSED] 0x4692 (ALDERLAKE_S) [13:15:38] [PASSED] 0x4693 (ALDERLAKE_S) [13:15:38] [PASSED] 0x46A0 (ALDERLAKE_P) [13:15:38] [PASSED] 0x46A1 (ALDERLAKE_P) [13:15:38] [PASSED] 0x46A2 (ALDERLAKE_P) [13:15:38] [PASSED] 0x46A3 (ALDERLAKE_P) [13:15:38] [PASSED] 0x46A6 (ALDERLAKE_P) [13:15:38] [PASSED] 0x46A8 (ALDERLAKE_P) [13:15:38] [PASSED] 0x46AA (ALDERLAKE_P) [13:15:38] [PASSED] 0x462A (ALDERLAKE_P) [13:15:38] [PASSED] 0x4626 (ALDERLAKE_P) [13:15:38] [PASSED] 0x4628 (ALDERLAKE_P) [13:15:38] [PASSED] 0x46B0 (ALDERLAKE_P) [13:15:38] [PASSED] 0x46B1 (ALDERLAKE_P) [13:15:38] [PASSED] 0x46B2 (ALDERLAKE_P) [13:15:38] [PASSED] 0x46B3 (ALDERLAKE_P) [13:15:38] [PASSED] 0x46C0 (ALDERLAKE_P) [13:15:38] [PASSED] 0x46C1 (ALDERLAKE_P) [13:15:38] [PASSED] 0x46C2 (ALDERLAKE_P) [13:15:38] [PASSED] 0x46C3 (ALDERLAKE_P) [13:15:38] [PASSED] 0x46D0 (ALDERLAKE_N) [13:15:38] [PASSED] 0x46D1 (ALDERLAKE_N) [13:15:38] [PASSED] 0x46D2 (ALDERLAKE_N) [13:15:38] [PASSED] 0x46D3 (ALDERLAKE_N) [13:15:38] [PASSED] 0x46D4 (ALDERLAKE_N) [13:15:38] [PASSED] 0xA721 (ALDERLAKE_P) [13:15:38] [PASSED] 0xA7A1 (ALDERLAKE_P) [13:15:38] [PASSED] 0xA7A9 (ALDERLAKE_P) [13:15:38] [PASSED] 0xA7AC (ALDERLAKE_P) [13:15:38] [PASSED] 0xA7AD (ALDERLAKE_P) [13:15:38] [PASSED] 0xA720 (ALDERLAKE_P) [13:15:38] [PASSED] 0xA7A0 (ALDERLAKE_P) [13:15:38] [PASSED] 0xA7A8 (ALDERLAKE_P) [13:15:38] [PASSED] 0xA7AA (ALDERLAKE_P) [13:15:38] [PASSED] 0xA7AB (ALDERLAKE_P) [13:15:38] [PASSED] 0xA780 (ALDERLAKE_S) [13:15:38] [PASSED] 0xA781 (ALDERLAKE_S) [13:15:38] [PASSED] 0xA782 (ALDERLAKE_S) [13:15:38] [PASSED] 0xA783 (ALDERLAKE_S) [13:15:38] [PASSED] 0xA788 (ALDERLAKE_S) [13:15:38] [PASSED] 0xA789 (ALDERLAKE_S) [13:15:38] [PASSED] 0xA78A (ALDERLAKE_S) [13:15:38] [PASSED] 0xA78B (ALDERLAKE_S) [13:15:38] [PASSED] 0x4905 (DG1) [13:15:38] [PASSED] 0x4906 (DG1) [13:15:38] [PASSED] 0x4907 (DG1) [13:15:38] [PASSED] 0x4908 (DG1) [13:15:38] [PASSED] 0x4909 (DG1) [13:15:38] [PASSED] 0x56C0 (DG2) [13:15:38] [PASSED] 0x56C2 (DG2) [13:15:38] [PASSED] 0x56C1 (DG2) [13:15:38] [PASSED] 0x7D51 (METEORLAKE) [13:15:38] [PASSED] 0x7DD1 (METEORLAKE) [13:15:38] [PASSED] 0x7D41 (METEORLAKE) [13:15:38] [PASSED] 0x7D67 (METEORLAKE) [13:15:38] [PASSED] 0xB640 (METEORLAKE) [13:15:38] [PASSED] 0x56A0 (DG2) [13:15:38] [PASSED] 0x56A1 (DG2) [13:15:38] [PASSED] 0x56A2 (DG2) [13:15:38] [PASSED] 0x56BE (DG2) [13:15:38] [PASSED] 0x56BF (DG2) [13:15:38] [PASSED] 0x5690 (DG2) [13:15:38] [PASSED] 0x5691 (DG2) [13:15:38] [PASSED] 0x5692 (DG2) [13:15:38] [PASSED] 0x56A5 (DG2) [13:15:38] [PASSED] 0x56A6 (DG2) [13:15:38] [PASSED] 0x56B0 (DG2) [13:15:38] [PASSED] 0x56B1 (DG2) [13:15:38] [PASSED] 0x56BA (DG2) [13:15:38] [PASSED] 0x56BB (DG2) [13:15:38] [PASSED] 0x56BC (DG2) [13:15:38] [PASSED] 0x56BD (DG2) [13:15:38] [PASSED] 0x5693 (DG2) [13:15:38] [PASSED] 0x5694 (DG2) [13:15:38] [PASSED] 0x5695 (DG2) [13:15:38] [PASSED] 0x56A3 (DG2) [13:15:38] [PASSED] 0x56A4 (DG2) [13:15:38] [PASSED] 0x56B2 (DG2) [13:15:38] [PASSED] 0x56B3 (DG2) [13:15:38] [PASSED] 0x5696 (DG2) [13:15:38] [PASSED] 0x5697 (DG2) [13:15:38] [PASSED] 0xB69 (PVC) [13:15:38] [PASSED] 0xB6E (PVC) [13:15:38] [PASSED] 0xBD4 (PVC) [13:15:38] [PASSED] 0xBD5 (PVC) [13:15:38] [PASSED] 0xBD6 (PVC) [13:15:38] [PASSED] 0xBD7 (PVC) [13:15:38] [PASSED] 0xBD8 (PVC) [13:15:38] [PASSED] 0xBD9 (PVC) [13:15:38] [PASSED] 0xBDA (PVC) [13:15:38] [PASSED] 0xBDB (PVC) [13:15:38] [PASSED] 0xBE0 (PVC) [13:15:38] [PASSED] 0xBE1 (PVC) [13:15:38] [PASSED] 0xBE5 (PVC) [13:15:38] [PASSED] 0x7D40 (METEORLAKE) [13:15:38] [PASSED] 0x7D45 (METEORLAKE) [13:15:38] [PASSED] 0x7D55 (METEORLAKE) [13:15:38] [PASSED] 0x7D60 (METEORLAKE) [13:15:38] [PASSED] 0x7DD5 (METEORLAKE) [13:15:38] [PASSED] 0x6420 (LUNARLAKE) [13:15:38] [PASSED] 0x64A0 (LUNARLAKE) [13:15:38] [PASSED] 0x64B0 (LUNARLAKE) [13:15:38] [PASSED] 0xE202 (BATTLEMAGE) [13:15:38] [PASSED] 0xE209 (BATTLEMAGE) [13:15:38] [PASSED] 0xE20B (BATTLEMAGE) [13:15:38] [PASSED] 0xE20C (BATTLEMAGE) [13:15:38] [PASSED] 0xE20D (BATTLEMAGE) [13:15:38] [PASSED] 0xE210 (BATTLEMAGE) [13:15:38] [PASSED] 0xE211 (BATTLEMAGE) [13:15:38] [PASSED] 0xE212 (BATTLEMAGE) [13:15:38] [PASSED] 0xE216 (BATTLEMAGE) [13:15:38] [PASSED] 0xE220 (BATTLEMAGE) [13:15:38] [PASSED] 0xE221 (BATTLEMAGE) [13:15:38] [PASSED] 0xE222 (BATTLEMAGE) [13:15:38] [PASSED] 0xE223 (BATTLEMAGE) [13:15:38] [PASSED] 0xB080 (PANTHERLAKE) [13:15:38] [PASSED] 0xB081 (PANTHERLAKE) [13:15:38] [PASSED] 0xB082 (PANTHERLAKE) [13:15:38] [PASSED] 0xB083 (PANTHERLAKE) [13:15:38] [PASSED] 0xB084 (PANTHERLAKE) [13:15:38] [PASSED] 0xB085 (PANTHERLAKE) [13:15:38] [PASSED] 0xB086 (PANTHERLAKE) [13:15:38] [PASSED] 0xB087 (PANTHERLAKE) [13:15:38] [PASSED] 0xB08F (PANTHERLAKE) [13:15:38] [PASSED] 0xB090 (PANTHERLAKE) [13:15:38] [PASSED] 0xB0A0 (PANTHERLAKE) [13:15:38] [PASSED] 0xB0A1 (PANTHERLAKE) [13:15:38] [PASSED] 0xB0B0 (PANTHERLAKE) [13:15:38] [PASSED] 0xFD80 (PANTHERLAKE) [13:15:38] [PASSED] 0xFD81 (PANTHERLAKE) [13:15:38] [PASSED] 0xD740 (NOVALAKE_S) [13:15:38] [PASSED] 0xD741 (NOVALAKE_S) [13:15:38] [PASSED] 0xD742 (NOVALAKE_S) [13:15:38] [PASSED] 0xD743 (NOVALAKE_S) [13:15:38] [PASSED] 0xD745 (NOVALAKE_S) [13:15:38] [PASSED] 0xD74A (NOVALAKE_S) [13:15:38] [PASSED] 0xD74B (NOVALAKE_S) [13:15:38] [PASSED] 0x674C (CRESCENTISLAND) [13:15:38] [PASSED] 0x674D (CRESCENTISLAND) [13:15:38] [PASSED] 0x674E (CRESCENTISLAND) [13:15:38] [PASSED] 0x674F (CRESCENTISLAND) [13:15:38] [PASSED] 0x6750 (CRESCENTISLAND) [13:15:38] [PASSED] 0x6751 (CRESCENTISLAND) [13:15:38] [PASSED] 0x6752 (CRESCENTISLAND) [13:15:38] [PASSED] 0x6753 (CRESCENTISLAND) [13:15:38] [PASSED] 0x6754 (CRESCENTISLAND) [13:15:38] [PASSED] 0x6755 (CRESCENTISLAND) [13:15:38] [PASSED] 0x6756 (CRESCENTISLAND) [13:15:38] [PASSED] 0xD750 (NOVALAKE_P) [13:15:38] [PASSED] 0xD751 (NOVALAKE_P) [13:15:38] [PASSED] 0xD752 (NOVALAKE_P) [13:15:38] [PASSED] 0xD753 (NOVALAKE_P) [13:15:38] [PASSED] 0xD754 (NOVALAKE_P) [13:15:38] [PASSED] 0xD755 (NOVALAKE_P) [13:15:38] [PASSED] 0xD756 (NOVALAKE_P) [13:15:38] [PASSED] 0xD757 (NOVALAKE_P) [13:15:38] [PASSED] 0xD75F (NOVALAKE_P) [13:15:38] =============== [PASSED] check_platform_desc =============== [13:15:38] ===================== [PASSED] xe_pci ====================== [13:15:38] ============= xe_rtp_tables_test (5 subtests) ============== [13:15:38] ================== xe_rtp_table_gt_test =================== [13:15:38] [PASSED] gt_was/14011060649 [13:15:38] [PASSED] gt_was/14011059788 [13:15:38] [PASSED] gt_was/14015795083 [13:15:38] [PASSED] gt_was/16021867713 [13:15:38] [PASSED] gt_was/14019449301 [13:15:38] [PASSED] gt_was/16028005424 [13:15:38] [PASSED] gt_was/14026578760 [13:15:38] [PASSED] gt_was/1409420604 [13:15:38] [PASSED] gt_was/1408615072 [13:15:38] [PASSED] gt_was/22010523718 [13:15:38] [PASSED] gt_was/14011006942 [13:15:38] [PASSED] gt_was/14014830051 [13:15:38] [PASSED] gt_was/18018781329 [13:15:38] [PASSED] gt_was/1509235366 [13:15:38] [PASSED] gt_was/18018781329 [13:15:38] [PASSED] gt_was/16016694945 [13:15:38] [PASSED] gt_was/14018575942 [13:15:38] [PASSED] gt_was/22016670082 [13:15:38] [PASSED] gt_was/22016670082 [13:15:38] [PASSED] gt_was/14017421178 [13:15:38] [PASSED] gt_was/16025250150 [13:15:38] [PASSED] gt_was/14021871409 [13:15:38] [PASSED] gt_was/16021865536 [13:15:38] [PASSED] gt_was/14021486841 [13:15:38] [PASSED] gt_was/14025160223 [13:15:38] [PASSED] gt_was/14026144927, 16029437861, 14026127056 [13:15:38] [PASSED] gt_was/14025635424 [13:15:38] [PASSED] gt_was/16028005424 [13:15:38] ============== [PASSED] xe_rtp_table_gt_test =============== [13:15:38] ================== xe_rtp_table_gt_test =================== [13:15:38] [PASSED] gt_tunings/Tuning: Blend Fill Caching Optimization Disable [13:15:38] [PASSED] gt_tunings/Tuning: 32B Access Enable [13:15:38] [PASSED] gt_tunings/Tuning: L3 cache [13:15:38] [PASSED] gt_tunings/Tuning: L3 cache - media [13:15:38] [PASSED] gt_tunings/Tuning: Compression Overfetch [13:15:38] [PASSED] gt_tunings/Tuning: Compression Overfetch - media [13:15:38] [PASSED] gt_tunings/Tuning: Enable compressible partial write overfetch in L3 [13:15:38] [PASSED] gt_tunings/Tuning: Enable compressible partial write overfetch in L3 - media [13:15:38] [PASSED] gt_tunings/Tuning: L2 Overfetch Compressible Only [13:15:38] [PASSED] gt_tunings/Tuning: L2 Overfetch Compressible Only - media [13:15:38] [PASSED] gt_tunings/Tuning: Stateless compression control [13:15:38] [PASSED] gt_tunings/Tuning: Stateless compression control - media [13:15:38] [PASSED] gt_tunings/Tuning: L3 RW flush all Cache [13:15:38] [PASSED] gt_tunings/Tuning: L3 RW flush all cache - media [13:15:38] [PASSED] gt_tunings/Tuning: Set STLB Bank Hash Mode to 4KB [13:15:38] [PASSED] gt_tunings/Tuning: Force All Non-Compressible Memory Reads to be 256B Overfetches [13:15:38] ============== [PASSED] xe_rtp_table_gt_test =============== [13:15:38] ================== xe_rtp_table_oob_test ================== [13:15:38] [PASSED] oob_was/1607983814 [13:15:38] [PASSED] oob_was/16010904313 [13:15:38] [PASSED] oob_was/18022495364 [13:15:38] [PASSED] oob_was/22012773006 [13:15:38] [PASSED] oob_was/14014475959 [13:15:38] [PASSED] oob_was/22011391025 [13:15:38] [PASSED] oob_was/22012727170 [13:15:38] [PASSED] oob_was/22012727685 [13:15:38] [PASSED] oob_was/22016596838 [13:15:38] [PASSED] oob_was/18020744125 [13:15:38] [PASSED] oob_was/1409600907 [13:15:38] [PASSED] oob_was/22014953428 [13:15:38] [PASSED] oob_was/16017236439 [13:15:38] [PASSED] oob_was/14019821291 [13:15:38] [PASSED] oob_was/14015076503 [13:15:38] [PASSED] oob_was/22016122933 [13:15:38] [PASSED] oob_was/14018913170 [13:15:38] [PASSED] oob_was/14018094691 [13:15:38] [PASSED] oob_was/18024947630 [13:15:38] [PASSED] oob_was/16022287689 [13:15:38] [PASSED] oob_was/13011645652 [13:15:38] [PASSED] oob_was/14022293748 [13:15:38] [PASSED] oob_was/22019794406 [13:15:38] [PASSED] oob_was/22019338487 [13:15:38] [PASSED] oob_was/16023588340 [13:15:38] [PASSED] oob_was/14019789679 [13:15:38] [PASSED] oob_was/14022866841 [13:15:38] [PASSED] oob_was/16021333562 [13:15:38] [PASSED] oob_was/14016712196 [13:15:38] [PASSED] oob_was/14015568240 [13:15:38] [PASSED] oob_was/18013179988 [13:15:38] [PASSED] oob_was/1508761755 [13:15:38] [PASSED] oob_was/16023105232 [13:15:38] [PASSED] oob_was/16026508708 [13:15:38] [PASSED] oob_was/14020001231 [13:15:38] [PASSED] oob_was/16023683509 [13:15:38] [PASSED] oob_was/14025515070 [13:15:38] [PASSED] oob_was/15015404425_disable [13:15:38] [PASSED] oob_was/16026007364 [13:15:38] [PASSED] oob_was/14020316580 [13:15:38] [PASSED] oob_was/14025883347 [13:15:38] [PASSED] oob_was/16029380221 [13:15:38] [PASSED] oob_was/22022079272 [13:15:38] [PASSED] oob_was/16029897822 [13:15:38] [PASSED] oob_was/14026539277 [13:15:38] [PASSED] oob_was/14027054324 [13:15:38] [PASSED] oob_was/14025941587 [13:15:38] [PASSED] oob_was/16030224309 [13:15:38] [PASSED] oob_was/14028709524 [13:15:38] [PASSED] oob_was/14028250015 [13:15:38] [PASSED] oob_was/16031259911 [13:15:38] ============== [PASSED] xe_rtp_table_oob_test ============== [13:15:38] ================ xe_rtp_table_dev_oob_test ================ [13:15:38] [PASSED] device_oob_was/22010954014 [13:15:38] [PASSED] device_oob_was/15015404425 [13:15:38] [PASSED] device_oob_was/22019338487_display [13:15:38] [PASSED] device_oob_was/14022085890 [13:15:38] [PASSED] device_oob_was/14026633728 [13:15:38] [PASSED] device_oob_was/14026746987 [13:15:38] [PASSED] device_oob_was/14026779378 [13:15:38] [PASSED] device_oob_was/14028586678 [13:15:38] [PASSED] device_oob_was/14028434957 [13:15:38] ============ [PASSED] xe_rtp_table_dev_oob_test ============ [13:15:38] ========== xe_rtp_table_missing_upper_bound_test ========== [13:15:38] [PASSED] register_whitelist/WaAllowPMDepthAndInvocationCountAccessFromUMD, 1408556865 [13:15:38] [PASSED] register_whitelist/1508744258, 14012131227, 1808121037 [13:15:38] [PASSED] register_whitelist/1806527549 [13:15:38] [PASSED] register_whitelist/allow_read_ctx_timestamp [13:15:38] [PASSED] register_whitelist/allow_read_queue_timestamp [13:15:38] [PASSED] register_whitelist/16014440446 [13:15:38] [PASSED] register_whitelist/16017236439 [13:15:38] [PASSED] register_whitelist/16020183090 [13:15:38] [PASSED] register_whitelist/14024997852 [13:15:38] [PASSED] register_whitelist/14024997852 [13:15:38] ====== [PASSED] xe_rtp_table_missing_upper_bound_test ====== [13:15:38] =============== [PASSED] xe_rtp_tables_test ================ [13:15:38] =================== xe_rtp (3 subtests) ==================== [13:15:38] =================== xe_rtp_rules_tests ==================== [13:15:38] [PASSED] no [13:15:38] [PASSED] yes [13:15:38] [PASSED] no-and-no [13:15:38] [PASSED] no-and-yes [13:15:38] [PASSED] yes-and-no [13:15:38] [PASSED] yes-and-yes [13:15:38] [PASSED] no-or-no [13:15:38] [PASSED] no-or-yes [13:15:38] [PASSED] yes-or-no [13:15:38] [PASSED] yes-or-yes [13:15:38] [PASSED] no-yes-or-yes-no [13:15:38] [PASSED] no-yes-or-yes-yes [13:15:38] [PASSED] yes-yes-or-no-yes [13:15:38] [PASSED] yes-yes-or-yes-yes [13:15:38] [PASSED] no-no-or-yes-or-no [13:15:38] [PASSED] or [13:15:38] [PASSED] or-yes [13:15:38] [PASSED] or-no [13:15:38] [PASSED] yes-or [13:15:38] [PASSED] no-or [13:15:38] [PASSED] no-or-or-yes [13:15:38] [PASSED] yes-or-or-no [13:15:38] [PASSED] no-or-or-no [13:15:38] [PASSED] missing-context-engine-class [13:15:38] [PASSED] missing-context-engine-class-or-yes [13:15:38] [PASSED] missing-context-engine-class-or-or-yes [13:15:38] =============== [PASSED] xe_rtp_rules_tests ================ [13:15:38] =============== xe_rtp_process_to_sr_tests ================ [13:15:38] [PASSED] coalesce-same-reg [13:15:38] [PASSED] coalesce-same-reg-literal-and-func [13:15:38] [PASSED] no-match-no-add [13:15:38] [PASSED] two-regs-two-entries [13:15:38] [PASSED] clr-one-set-other [13:15:38] [PASSED] set-field [13:15:38] [PASSED] conflict-duplicate [13:15:38] [PASSED] conflict-not-disjoint [13:15:38] [PASSED] conflict-not-disjoint-literal-and-func [13:15:38] [PASSED] conflict-reg-type [13:15:38] [PASSED] bad-mcr-reg-forced-to-regular [13:15:38] [PASSED] bad-regular-reg-forced-to-mcr [13:15:38] =========== [PASSED] xe_rtp_process_to_sr_tests ============ [13:15:38] ================== xe_rtp_process_tests =================== [13:15:38] [PASSED] active1 [13:15:38] [PASSED] active2 [13:15:38] [PASSED] active-inactive [13:15:38] [PASSED] inactive-active [13:15:38] [PASSED] inactive-active-inactive [13:15:38] [PASSED] inactive-inactive-inactive [13:15:38] ============== [PASSED] xe_rtp_process_tests =============== [13:15:38] ===================== [PASSED] xe_rtp ====================== [13:15:38] ==================== xe_wa (1 subtest) ===================== [13:15:38] ======================== xe_wa_gt ========================= [13:15:38] [PASSED] TIGERLAKE B0 [13:15:38] [PASSED] DG1 A0 [13:15:38] [PASSED] DG1 B0 [13:15:38] [PASSED] ALDERLAKE_S A0 [13:15:38] [PASSED] ALDERLAKE_S B0 [13:15:38] [PASSED] ALDERLAKE_S C0 [13:15:38] [PASSED] ALDERLAKE_S D0 [13:15:38] [PASSED] ALDERLAKE_P A0 [13:15:38] [PASSED] ALDERLAKE_P B0 [13:15:38] [PASSED] ALDERLAKE_P C0 [13:15:38] [PASSED] ALDERLAKE_S RPLS D0 [13:15:38] [PASSED] ALDERLAKE_P RPLU E0 [13:15:38] [PASSED] DG2 G10 C0 [13:15:38] [PASSED] DG2 G11 B1 [13:15:38] [PASSED] DG2 G12 A1 [13:15:38] [PASSED] METEORLAKE 12.70(Xe_LPG) A0 13.00(Xe_LPM+) A0 [13:15:38] [PASSED] METEORLAKE 12.71(Xe_LPG) A0 13.00(Xe_LPM+) A0 [13:15:38] [PASSED] METEORLAKE 12.74(Xe_LPG+) A0 13.00(Xe_LPM+) A0 [13:15:38] [PASSED] LUNARLAKE 20.04(Xe2_LPG) A0 20.00(Xe2_LPM) A0 [13:15:38] [PASSED] LUNARLAKE 20.04(Xe2_LPG) B0 20.00(Xe2_LPM) A0 [13:15:38] [PASSED] BATTLEMAGE 20.01(Xe2_HPG) A0 13.01(Xe2_HPM) A1 [13:15:38] [PASSED] PANTHERLAKE 30.00(Xe3_LPG) A0 30.00(Xe3_LPM) A0 [13:15:38] ==================== [PASSED] xe_wa_gt ===================== [13:15:38] ====================== [PASSED] xe_wa ====================== [13:15:38] ============================================================ [13:15:38] Testing complete. Ran 860 tests: passed: 831, skipped: 29 [13:15:39] Elapsed time: 41.976s total, 2.532s configuring, 38.678s building, 0.746s running
+ for kcfg in "${kunitconfigs[@]}"
+ [[ ! -f /kernel/drivers/gpu/drm/tests/.kunitconfig ]]
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig [13:15:39] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig [13:15:41] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48 [13:16:07] Starting KUnit Kernel (1/1)... [13:16:07] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [13:16:07] ============ drm_test_pick_cmdline (2 subtests) ============ [13:16:07] [PASSED] drm_test_pick_cmdline_res_1920_1080_60 [13:16:07] =============== drm_test_pick_cmdline_named =============== [13:16:07] [PASSED] NTSC [13:16:07] [PASSED] NTSC-J [13:16:07] [PASSED] PAL [13:16:07] [PASSED] PAL-M [13:16:07] =========== [PASSED] drm_test_pick_cmdline_named =========== [13:16:07] ============== [PASSED] drm_test_pick_cmdline ============== [13:16:07] == drm_test_atomic_get_connector_for_encoder (1 subtest) === [13:16:07] [PASSED] drm_test_drm_atomic_get_connector_for_encoder [13:16:07] ==== [PASSED] drm_test_atomic_get_connector_for_encoder ==== [13:16:07] =========== drm_validate_clone_mode (2 subtests) =========== [13:16:07] ============== drm_test_check_in_clone_mode =============== [13:16:07] [PASSED] in_clone_mode [13:16:07] [PASSED] not_in_clone_mode [13:16:07] ========== [PASSED] drm_test_check_in_clone_mode =========== [13:16:07] =============== drm_test_check_valid_clones =============== [13:16:07] [PASSED] not_in_clone_mode [13:16:07] [PASSED] valid_clone [13:16:07] [PASSED] invalid_clone [13:16:07] =========== [PASSED] drm_test_check_valid_clones =========== [13:16:07] ============= [PASSED] drm_validate_clone_mode ============= [13:16:07] ============= drm_validate_modeset (1 subtest) ============= [13:16:07] [PASSED] drm_test_check_connector_changed_modeset [13:16:07] ============== [PASSED] drm_validate_modeset =============== [13:16:07] ====== drm_test_bridge_get_current_state (1 subtest) ======= [13:16:07] [PASSED] drm_test_drm_bridge_get_current_state_atomic [13:16:07] ======== [PASSED] drm_test_bridge_get_current_state ======== [13:16:07] ====== drm_test_bridge_helper_reset_crtc (3 subtests) ====== [13:16:07] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic [13:16:07] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic_disabled [13:16:07] [PASSED] drm_test_drm_bridge_helper_hdmi_output_bus_fmts [13:16:07] ======== [PASSED] drm_test_bridge_helper_reset_crtc ======== [13:16:07] ============== drm_bridge_alloc (2 subtests) =============== [13:16:07] [PASSED] drm_test_drm_bridge_alloc_basic [13:16:07] [PASSED] drm_test_drm_bridge_alloc_get_put [13:16:07] ================ [PASSED] drm_bridge_alloc ================= [13:16:07] ============= drm_bridge_bus_fmt (5 subtests) ============== [13:16:07] [PASSED] drm_test_bridge_rgb_yuv_rgb [13:16:07] [PASSED] drm_test_bridge_must_convert_to_yuv444 [13:16:07] [PASSED] drm_test_bridge_hdmi_auto_rgb [13:16:07] [PASSED] drm_test_bridge_auto_first [13:16:07] [PASSED] drm_test_bridge_rgb_yuv_no_path [13:16:07] =============== [PASSED] drm_bridge_bus_fmt ================ [13:16:07] ============= drm_cmdline_parser (40 subtests) ============= [13:16:07] [PASSED] drm_test_cmdline_force_d_only [13:16:07] [PASSED] drm_test_cmdline_force_D_only_dvi [13:16:07] [PASSED] drm_test_cmdline_force_D_only_hdmi [13:16:07] [PASSED] drm_test_cmdline_force_D_only_not_digital [13:16:07] [PASSED] drm_test_cmdline_force_e_only [13:16:07] [PASSED] drm_test_cmdline_res [13:16:07] [PASSED] drm_test_cmdline_res_vesa [13:16:07] [PASSED] drm_test_cmdline_res_vesa_rblank [13:16:07] [PASSED] drm_test_cmdline_res_rblank [13:16:07] [PASSED] drm_test_cmdline_res_bpp [13:16:07] [PASSED] drm_test_cmdline_res_refresh [13:16:07] [PASSED] drm_test_cmdline_res_bpp_refresh [13:16:07] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced [13:16:07] [PASSED] drm_test_cmdline_res_bpp_refresh_margins [13:16:07] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off [13:16:07] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on [13:16:07] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog [13:16:07] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital [13:16:07] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on [13:16:07] [PASSED] drm_test_cmdline_res_margins_force_on [13:16:07] [PASSED] drm_test_cmdline_res_vesa_margins [13:16:07] [PASSED] drm_test_cmdline_name [13:16:07] [PASSED] drm_test_cmdline_name_bpp [13:16:07] [PASSED] drm_test_cmdline_name_option [13:16:07] [PASSED] drm_test_cmdline_name_bpp_option [13:16:07] [PASSED] drm_test_cmdline_rotate_0 [13:16:07] [PASSED] drm_test_cmdline_rotate_90 [13:16:07] [PASSED] drm_test_cmdline_rotate_180 [13:16:07] [PASSED] drm_test_cmdline_rotate_270 [13:16:07] [PASSED] drm_test_cmdline_hmirror [13:16:07] [PASSED] drm_test_cmdline_vmirror [13:16:07] [PASSED] drm_test_cmdline_margin_options [13:16:07] [PASSED] drm_test_cmdline_multiple_options [13:16:07] [PASSED] drm_test_cmdline_bpp_extra_and_option [13:16:07] [PASSED] drm_test_cmdline_extra_and_option [13:16:07] [PASSED] drm_test_cmdline_freestanding_options [13:16:07] [PASSED] drm_test_cmdline_freestanding_force_e_and_options [13:16:07] [PASSED] drm_test_cmdline_panel_orientation [13:16:07] ================ drm_test_cmdline_invalid ================= [13:16:07] [PASSED] margin_only [13:16:07] [PASSED] interlace_only [13:16:07] [PASSED] res_missing_x [13:16:07] [PASSED] res_missing_y [13:16:07] [PASSED] res_bad_y [13:16:07] [PASSED] res_missing_y_bpp [13:16:07] [PASSED] res_bad_bpp [13:16:07] [PASSED] res_bad_refresh [13:16:07] [PASSED] res_bpp_refresh_force_on_off [13:16:07] [PASSED] res_invalid_mode [13:16:07] [PASSED] res_bpp_wrong_place_mode [13:16:07] [PASSED] name_bpp_refresh [13:16:07] [PASSED] name_refresh [13:16:07] [PASSED] name_refresh_wrong_mode [13:16:07] [PASSED] name_refresh_invalid_mode [13:16:07] [PASSED] rotate_multiple [13:16:07] [PASSED] rotate_invalid_val [13:16:07] [PASSED] rotate_truncated [13:16:07] [PASSED] invalid_option [13:16:07] [PASSED] invalid_tv_option [13:16:07] [PASSED] truncated_tv_option [13:16:07] ============ [PASSED] drm_test_cmdline_invalid ============= [13:16:07] =============== drm_test_cmdline_tv_options =============== [13:16:07] [PASSED] NTSC [13:16:07] [PASSED] NTSC_443 [13:16:07] [PASSED] NTSC_J [13:16:07] [PASSED] PAL [13:16:07] [PASSED] PAL_M [13:16:07] [PASSED] PAL_N [13:16:07] [PASSED] SECAM [13:16:07] [PASSED] MONO_525 [13:16:07] [PASSED] MONO_625 [13:16:07] =========== [PASSED] drm_test_cmdline_tv_options =========== [13:16:07] =============== [PASSED] drm_cmdline_parser ================ [13:16:07] ========== drmm_connector_hdmi_init (20 subtests) ========== [13:16:07] [PASSED] drm_test_connector_hdmi_init_valid [13:16:07] [PASSED] drm_test_connector_hdmi_init_bpc_8 [13:16:07] [PASSED] drm_test_connector_hdmi_init_bpc_10 [13:16:07] [PASSED] drm_test_connector_hdmi_init_bpc_12 [13:16:07] [PASSED] drm_test_connector_hdmi_init_bpc_invalid [13:16:07] [PASSED] drm_test_connector_hdmi_init_bpc_null [13:16:07] [PASSED] drm_test_connector_hdmi_init_formats_empty [13:16:07] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb [13:16:07] === drm_test_connector_hdmi_init_formats_yuv420_allowed === [13:16:07] [PASSED] supported_formats=0x9 yuv420_allowed=1 [13:16:07] [PASSED] supported_formats=0x9 yuv420_allowed=0 [13:16:07] [PASSED] supported_formats=0x5 yuv420_allowed=1 [13:16:07] [PASSED] supported_formats=0x5 yuv420_allowed=0 [13:16:07] === [PASSED] drm_test_connector_hdmi_init_formats_yuv420_allowed === [13:16:07] [PASSED] drm_test_connector_hdmi_init_null_ddc [13:16:07] [PASSED] drm_test_connector_hdmi_init_null_product [13:16:07] [PASSED] drm_test_connector_hdmi_init_null_vendor [13:16:07] [PASSED] drm_test_connector_hdmi_init_product_length_exact [13:16:07] [PASSED] drm_test_connector_hdmi_init_product_length_too_long [13:16:07] [PASSED] drm_test_connector_hdmi_init_product_valid [13:16:07] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact [13:16:07] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long [13:16:07] [PASSED] drm_test_connector_hdmi_init_vendor_valid [13:16:07] ========= drm_test_connector_hdmi_init_type_valid ========= [13:16:07] [PASSED] HDMI-A [13:16:07] [PASSED] HDMI-B [13:16:07] ===== [PASSED] drm_test_connector_hdmi_init_type_valid ===== [13:16:07] ======== drm_test_connector_hdmi_init_type_invalid ======== [13:16:07] [PASSED] Unknown [13:16:07] [PASSED] VGA [13:16:07] [PASSED] DVI-I [13:16:07] [PASSED] DVI-D [13:16:07] [PASSED] DVI-A [13:16:07] [PASSED] Composite [13:16:07] [PASSED] SVIDEO [13:16:07] [PASSED] LVDS [13:16:07] [PASSED] Component [13:16:07] [PASSED] DIN [13:16:07] [PASSED] DP [13:16:07] [PASSED] TV [13:16:07] [PASSED] eDP [13:16:07] [PASSED] Virtual [13:16:07] [PASSED] DSI [13:16:07] [PASSED] DPI [13:16:07] [PASSED] Writeback [13:16:07] [PASSED] SPI [13:16:07] [PASSED] USB [13:16:07] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ==== [13:16:07] ============ [PASSED] drmm_connector_hdmi_init ============= [13:16:07] ============= drmm_connector_init (3 subtests) ============= [13:16:07] [PASSED] drm_test_drmm_connector_init [13:16:07] [PASSED] drm_test_drmm_connector_init_null_ddc [13:16:07] ========= drm_test_drmm_connector_init_type_valid ========= [13:16:07] [PASSED] Unknown [13:16:07] [PASSED] VGA [13:16:07] [PASSED] DVI-I [13:16:07] [PASSED] DVI-D [13:16:07] [PASSED] DVI-A [13:16:07] [PASSED] Composite [13:16:07] [PASSED] SVIDEO [13:16:07] [PASSED] LVDS [13:16:07] [PASSED] Component [13:16:07] [PASSED] DIN [13:16:07] [PASSED] DP [13:16:07] [PASSED] HDMI-A [13:16:07] [PASSED] HDMI-B [13:16:07] [PASSED] TV [13:16:07] [PASSED] eDP [13:16:07] [PASSED] Virtual [13:16:07] [PASSED] DSI [13:16:07] [PASSED] DPI [13:16:07] [PASSED] Writeback [13:16:07] [PASSED] SPI [13:16:07] [PASSED] USB [13:16:07] ===== [PASSED] drm_test_drmm_connector_init_type_valid ===== [13:16:07] =============== [PASSED] drmm_connector_init =============== [13:16:07] ========= drm_connector_dynamic_init (6 subtests) ========== [13:16:07] [PASSED] drm_test_drm_connector_dynamic_init [13:16:07] [PASSED] drm_test_drm_connector_dynamic_init_null_ddc [13:16:07] [PASSED] drm_test_drm_connector_dynamic_init_not_added [13:16:07] [PASSED] drm_test_drm_connector_dynamic_init_properties [13:16:07] ===== drm_test_drm_connector_dynamic_init_type_valid ====== [13:16:07] [PASSED] Unknown [13:16:07] [PASSED] VGA [13:16:07] [PASSED] DVI-I [13:16:07] [PASSED] DVI-D [13:16:07] [PASSED] DVI-A [13:16:07] [PASSED] Composite [13:16:07] [PASSED] SVIDEO [13:16:07] [PASSED] LVDS [13:16:07] [PASSED] Component [13:16:07] [PASSED] DIN [13:16:07] [PASSED] DP [13:16:07] [PASSED] HDMI-A [13:16:07] [PASSED] HDMI-B [13:16:07] [PASSED] TV [13:16:07] [PASSED] eDP [13:16:07] [PASSED] Virtual [13:16:07] [PASSED] DSI [13:16:07] [PASSED] DPI [13:16:07] [PASSED] Writeback [13:16:07] [PASSED] SPI [13:16:07] [PASSED] USB [13:16:07] = [PASSED] drm_test_drm_connector_dynamic_init_type_valid == [13:16:07] ======== drm_test_drm_connector_dynamic_init_name ========= [13:16:07] [PASSED] Unknown [13:16:07] [PASSED] VGA [13:16:07] [PASSED] DVI-I [13:16:07] [PASSED] DVI-D [13:16:07] [PASSED] DVI-A [13:16:07] [PASSED] Composite [13:16:07] [PASSED] SVIDEO [13:16:07] [PASSED] LVDS [13:16:07] [PASSED] Component [13:16:07] [PASSED] DIN [13:16:07] [PASSED] DP [13:16:07] [PASSED] HDMI-A [13:16:07] [PASSED] HDMI-B [13:16:07] [PASSED] TV [13:16:07] [PASSED] eDP [13:16:07] [PASSED] Virtual [13:16:07] [PASSED] DSI [13:16:07] [PASSED] DPI [13:16:07] [PASSED] Writeback [13:16:07] [PASSED] SPI [13:16:07] [PASSED] USB [13:16:07] ==== [PASSED] drm_test_drm_connector_dynamic_init_name ===== [13:16:07] =========== [PASSED] drm_connector_dynamic_init ============ [13:16:07] ==== drm_connector_dynamic_register_early (4 subtests) ===== [13:16:07] [PASSED] drm_test_drm_connector_dynamic_register_early_on_list [13:16:07] [PASSED] drm_test_drm_connector_dynamic_register_early_defer [13:16:07] [PASSED] drm_test_drm_connector_dynamic_register_early_no_init [13:16:07] [PASSED] drm_test_drm_connector_dynamic_register_early_no_mode_object [13:16:07] ====== [PASSED] drm_connector_dynamic_register_early ======= [13:16:07] ======= drm_connector_dynamic_register (7 subtests) ======== [13:16:07] [PASSED] drm_test_drm_connector_dynamic_register_on_list [13:16:07] [PASSED] drm_test_drm_connector_dynamic_register_no_defer [13:16:07] [PASSED] drm_test_drm_connector_dynamic_register_no_init [13:16:07] [PASSED] drm_test_drm_connector_dynamic_register_mode_object [13:16:07] [PASSED] drm_test_drm_connector_dynamic_register_sysfs [13:16:07] [PASSED] drm_test_drm_connector_dynamic_register_sysfs_name [13:16:07] [PASSED] drm_test_drm_connector_dynamic_register_debugfs [13:16:07] ========= [PASSED] drm_connector_dynamic_register ========== [13:16:07] = drm_connector_attach_broadcast_rgb_property (2 subtests) = [13:16:07] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property [13:16:07] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector [13:16:07] === [PASSED] drm_connector_attach_broadcast_rgb_property === [13:16:07] ========== drm_get_tv_mode_from_name (2 subtests) ========== [13:16:07] ========== drm_test_get_tv_mode_from_name_valid =========== [13:16:07] [PASSED] NTSC [13:16:07] [PASSED] NTSC-443 [13:16:07] [PASSED] NTSC-J [13:16:07] [PASSED] PAL [13:16:07] [PASSED] PAL-M [13:16:07] [PASSED] PAL-N [13:16:07] [PASSED] SECAM [13:16:07] [PASSED] Mono [13:16:07] ====== [PASSED] drm_test_get_tv_mode_from_name_valid ======= [13:16:07] [PASSED] drm_test_get_tv_mode_from_name_truncated [13:16:07] ============ [PASSED] drm_get_tv_mode_from_name ============ [13:16:07] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) = [13:16:07] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb [13:16:07] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc [13:16:07] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1 [13:16:07] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc [13:16:07] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1 [13:16:07] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double [13:16:07] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid = [13:16:07] [PASSED] VIC 96 [13:16:07] [PASSED] VIC 97 [13:16:07] [PASSED] VIC 101 [13:16:07] [PASSED] VIC 102 [13:16:07] [PASSED] VIC 106 [13:16:07] [PASSED] VIC 107 [13:16:07] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid === [13:16:07] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc [13:16:07] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc [13:16:07] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc [13:16:07] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc [13:16:07] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc [13:16:07] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ==== [13:16:07] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) == [13:16:07] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name ==== [13:16:07] [PASSED] Automatic [13:16:07] [PASSED] Full [13:16:07] [PASSED] Limited 16:235 [13:16:07] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name === [13:16:07] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid [13:16:07] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ==== [13:16:07] == drm_hdmi_connector_get_output_format_name (2 subtests) == [13:16:07] === drm_test_drm_hdmi_connector_get_output_format_name ==== [13:16:07] [PASSED] RGB [13:16:07] [PASSED] YUV 4:2:0 [13:16:07] [PASSED] YUV 4:2:2 [13:16:07] [PASSED] YUV 4:4:4 [13:16:07] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name === [13:16:07] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid [13:16:07] ==== [PASSED] drm_hdmi_connector_get_output_format_name ==== [13:16:07] ============= drm_damage_helper (21 subtests) ============== [13:16:07] [PASSED] drm_test_damage_iter_no_damage [13:16:07] [PASSED] drm_test_damage_iter_no_damage_fractional_src [13:16:07] [PASSED] drm_test_damage_iter_no_damage_src_moved [13:16:07] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved [13:16:07] [PASSED] drm_test_damage_iter_no_damage_not_visible [13:16:07] [PASSED] drm_test_damage_iter_no_damage_no_crtc [13:16:07] [PASSED] drm_test_damage_iter_no_damage_no_fb [13:16:07] [PASSED] drm_test_damage_iter_simple_damage [13:16:07] [PASSED] drm_test_damage_iter_single_damage [13:16:07] [PASSED] drm_test_damage_iter_single_damage_intersect_src [13:16:07] [PASSED] drm_test_damage_iter_single_damage_outside_src [13:16:07] [PASSED] drm_test_damage_iter_single_damage_fractional_src [13:16:07] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src [13:16:07] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src [13:16:07] [PASSED] drm_test_damage_iter_single_damage_src_moved [13:16:07] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved [13:16:07] [PASSED] drm_test_damage_iter_damage [13:16:07] [PASSED] drm_test_damage_iter_damage_one_intersect [13:16:07] [PASSED] drm_test_damage_iter_damage_one_outside [13:16:07] [PASSED] drm_test_damage_iter_damage_src_moved [13:16:07] [PASSED] drm_test_damage_iter_damage_not_visible [13:16:07] ================ [PASSED] drm_damage_helper ================ [13:16:07] ============== drm_dp_mst_helper (3 subtests) ============== [13:16:07] ============== drm_test_dp_mst_calc_pbn_mode ============== [13:16:07] [PASSED] Clock 154000 BPP 30 DSC disabled [13:16:07] [PASSED] Clock 234000 BPP 30 DSC disabled [13:16:07] [PASSED] Clock 297000 BPP 24 DSC disabled [13:16:07] [PASSED] Clock 332880 BPP 24 DSC enabled [13:16:07] [PASSED] Clock 324540 BPP 24 DSC enabled [13:16:07] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ========== [13:16:07] ============== drm_test_dp_mst_calc_pbn_div =============== [13:16:07] [PASSED] Link rate 2000000 lane count 4 [13:16:07] [PASSED] Link rate 2000000 lane count 2 [13:16:07] [PASSED] Link rate 2000000 lane count 1 [13:16:07] [PASSED] Link rate 1350000 lane count 4 [13:16:07] [PASSED] Link rate 1350000 lane count 2 [13:16:07] [PASSED] Link rate 1350000 lane count 1 [13:16:07] [PASSED] Link rate 1000000 lane count 4 [13:16:07] [PASSED] Link rate 1000000 lane count 2 [13:16:07] [PASSED] Link rate 1000000 lane count 1 [13:16:07] [PASSED] Link rate 810000 lane count 4 [13:16:07] [PASSED] Link rate 810000 lane count 2 [13:16:07] [PASSED] Link rate 810000 lane count 1 [13:16:07] [PASSED] Link rate 540000 lane count 4 [13:16:07] [PASSED] Link rate 540000 lane count 2 [13:16:07] [PASSED] Link rate 540000 lane count 1 [13:16:07] [PASSED] Link rate 270000 lane count 4 [13:16:07] [PASSED] Link rate 270000 lane count 2 [13:16:07] [PASSED] Link rate 270000 lane count 1 [13:16:07] [PASSED] Link rate 162000 lane count 4 [13:16:07] [PASSED] Link rate 162000 lane count 2 [13:16:07] [PASSED] Link rate 162000 lane count 1 [13:16:07] ========== [PASSED] drm_test_dp_mst_calc_pbn_div =========== [13:16:07] ========= drm_test_dp_mst_sideband_msg_req_decode ========= [13:16:07] [PASSED] DP_ENUM_PATH_RESOURCES with port number [13:16:07] [PASSED] DP_POWER_UP_PHY with port number [13:16:07] [PASSED] DP_POWER_DOWN_PHY with port number [13:16:07] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks [13:16:07] [PASSED] DP_ALLOCATE_PAYLOAD with port number [13:16:07] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI [13:16:07] [PASSED] DP_ALLOCATE_PAYLOAD with PBN [13:16:07] [PASSED] DP_QUERY_PAYLOAD with port number [13:16:07] [PASSED] DP_QUERY_PAYLOAD with VCPI [13:16:07] [PASSED] DP_REMOTE_DPCD_READ with port number [13:16:07] [PASSED] DP_REMOTE_DPCD_READ with DPCD address [13:16:07] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes [13:16:07] [PASSED] DP_REMOTE_DPCD_WRITE with port number [13:16:07] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address [13:16:07] [PASSED] DP_REMOTE_DPCD_WRITE with data array [13:16:07] [PASSED] DP_REMOTE_I2C_READ with port number [13:16:07] [PASSED] DP_REMOTE_I2C_READ with I2C device ID [13:16:07] [PASSED] DP_REMOTE_I2C_READ with transactions array [13:16:07] [PASSED] DP_REMOTE_I2C_WRITE with port number [13:16:07] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID [13:16:07] [PASSED] DP_REMOTE_I2C_WRITE with data array [13:16:07] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID [13:16:07] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID [13:16:07] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event [13:16:07] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event [13:16:07] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior [13:16:07] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior [13:16:07] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode ===== [13:16:07] ================ [PASSED] drm_dp_mst_helper ================ [13:16:07] ================== drm_exec (7 subtests) =================== [13:16:07] [PASSED] sanitycheck [13:16:07] [PASSED] test_lock [13:16:07] [PASSED] test_lock_unlock [13:16:07] [PASSED] test_duplicates [13:16:07] [PASSED] test_prepare [13:16:07] [PASSED] test_prepare_array [13:16:07] [PASSED] test_multiple_loops [13:16:07] ==================== [PASSED] drm_exec ===================== [13:16:07] =========== drm_format_helper_test (17 subtests) =========== [13:16:07] ============== drm_test_fb_xrgb8888_to_gray8 ============== [13:16:07] [PASSED] single_pixel_source_buffer [13:16:07] [PASSED] single_pixel_clip_rectangle [13:16:07] [PASSED] well_known_colors [13:16:07] [PASSED] destination_pitch [13:16:07] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ========== [13:16:07] ============= drm_test_fb_xrgb8888_to_rgb332 ============== [13:16:07] [PASSED] single_pixel_source_buffer [13:16:07] [PASSED] single_pixel_clip_rectangle [13:16:07] [PASSED] well_known_colors [13:16:07] [PASSED] destination_pitch [13:16:07] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ========== [13:16:07] ============= drm_test_fb_xrgb8888_to_rgb565 ============== [13:16:07] [PASSED] single_pixel_source_buffer [13:16:07] [PASSED] single_pixel_clip_rectangle [13:16:07] [PASSED] well_known_colors [13:16:07] [PASSED] destination_pitch [13:16:07] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ========== [13:16:07] ============ drm_test_fb_xrgb8888_to_xrgb1555 ============= [13:16:07] [PASSED] single_pixel_source_buffer [13:16:07] [PASSED] single_pixel_clip_rectangle [13:16:07] [PASSED] well_known_colors [13:16:07] [PASSED] destination_pitch [13:16:07] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 ========= [13:16:07] ============ drm_test_fb_xrgb8888_to_argb1555 ============= [13:16:07] [PASSED] single_pixel_source_buffer [13:16:07] [PASSED] single_pixel_clip_rectangle [13:16:07] [PASSED] well_known_colors [13:16:07] [PASSED] destination_pitch [13:16:07] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 ========= [13:16:07] ============ drm_test_fb_xrgb8888_to_rgba5551 ============= [13:16:07] [PASSED] single_pixel_source_buffer [13:16:07] [PASSED] single_pixel_clip_rectangle [13:16:07] [PASSED] well_known_colors [13:16:07] [PASSED] destination_pitch [13:16:07] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 ========= [13:16:07] ============= drm_test_fb_xrgb8888_to_rgb888 ============== [13:16:07] [PASSED] single_pixel_source_buffer [13:16:07] [PASSED] single_pixel_clip_rectangle [13:16:07] [PASSED] well_known_colors [13:16:07] [PASSED] destination_pitch [13:16:07] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ========== [13:16:07] ============= drm_test_fb_xrgb8888_to_bgr888 ============== [13:16:07] [PASSED] single_pixel_source_buffer [13:16:07] [PASSED] single_pixel_clip_rectangle [13:16:07] [PASSED] well_known_colors [13:16:07] [PASSED] destination_pitch [13:16:07] ========= [PASSED] drm_test_fb_xrgb8888_to_bgr888 ========== [13:16:07] ============ drm_test_fb_xrgb8888_to_argb8888 ============= [13:16:07] [PASSED] single_pixel_source_buffer [13:16:07] [PASSED] single_pixel_clip_rectangle [13:16:07] [PASSED] well_known_colors [13:16:07] [PASSED] destination_pitch [13:16:07] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 ========= [13:16:07] =========== drm_test_fb_xrgb8888_to_xrgb2101010 =========== [13:16:07] [PASSED] single_pixel_source_buffer [13:16:07] [PASSED] single_pixel_clip_rectangle [13:16:07] [PASSED] well_known_colors [13:16:07] [PASSED] destination_pitch [13:16:07] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 ======= [13:16:07] =========== drm_test_fb_xrgb8888_to_argb2101010 =========== [13:16:07] [PASSED] single_pixel_source_buffer [13:16:07] [PASSED] single_pixel_clip_rectangle [13:16:07] [PASSED] well_known_colors [13:16:07] [PASSED] destination_pitch [13:16:07] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 ======= [13:16:07] ============== drm_test_fb_xrgb8888_to_mono =============== [13:16:07] [PASSED] single_pixel_source_buffer [13:16:07] [PASSED] single_pixel_clip_rectangle [13:16:07] [PASSED] well_known_colors [13:16:07] [PASSED] destination_pitch [13:16:07] ========== [PASSED] drm_test_fb_xrgb8888_to_mono =========== [13:16:07] ==================== drm_test_fb_swab ===================== [13:16:07] [PASSED] single_pixel_source_buffer [13:16:07] [PASSED] single_pixel_clip_rectangle [13:16:07] [PASSED] well_known_colors [13:16:07] [PASSED] destination_pitch [13:16:07] ================ [PASSED] drm_test_fb_swab ================= [13:16:07] ============ drm_test_fb_xrgb8888_to_xbgr8888 ============= [13:16:07] [PASSED] single_pixel_source_buffer [13:16:07] [PASSED] single_pixel_clip_rectangle [13:16:07] [PASSED] well_known_colors [13:16:07] [PASSED] destination_pitch [13:16:07] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 ========= [13:16:07] ============ drm_test_fb_xrgb8888_to_abgr8888 ============= [13:16:07] [PASSED] single_pixel_source_buffer [13:16:07] [PASSED] single_pixel_clip_rectangle [13:16:07] [PASSED] well_known_colors [13:16:07] [PASSED] destination_pitch [13:16:07] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 ========= [13:16:07] ================= drm_test_fb_clip_offset ================= [13:16:07] [PASSED] pass through [13:16:07] [PASSED] horizontal offset [13:16:07] [PASSED] vertical offset [13:16:07] [PASSED] horizontal and vertical offset [13:16:07] [PASSED] horizontal offset (custom pitch) [13:16:07] [PASSED] vertical offset (custom pitch) [13:16:07] [PASSED] horizontal and vertical offset (custom pitch) [13:16:07] ============= [PASSED] drm_test_fb_clip_offset ============= [13:16:07] =================== drm_test_fb_memcpy ==================== [13:16:07] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258) [13:16:07] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258) [13:16:07] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559) [13:16:07] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258) [13:16:07] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258) [13:16:07] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559) [13:16:07] [PASSED] well_known_colors: XB24 little-endian (0x34324258) [13:16:07] [PASSED] well_known_colors: XRA8 little-endian (0x38415258) [13:16:07] [PASSED] well_known_colors: YU24 little-endian (0x34325559) [13:16:07] [PASSED] destination_pitch: XB24 little-endian (0x34324258) [13:16:07] [PASSED] destination_pitch: XRA8 little-endian (0x38415258) [13:16:07] [PASSED] destination_pitch: YU24 little-endian (0x34325559) [13:16:07] =============== [PASSED] drm_test_fb_memcpy ================ [13:16:07] ============= [PASSED] drm_format_helper_test ============== [13:16:07] ================= drm_format (18 subtests) ================= [13:16:07] [PASSED] drm_test_format_block_width_invalid [13:16:07] [PASSED] drm_test_format_block_width_one_plane [13:16:07] [PASSED] drm_test_format_block_width_two_plane [13:16:07] [PASSED] drm_test_format_block_width_three_plane [13:16:07] [PASSED] drm_test_format_block_width_tiled [13:16:07] [PASSED] drm_test_format_block_height_invalid [13:16:07] [PASSED] drm_test_format_block_height_one_plane [13:16:07] [PASSED] drm_test_format_block_height_two_plane [13:16:07] [PASSED] drm_test_format_block_height_three_plane [13:16:07] [PASSED] drm_test_format_block_height_tiled [13:16:07] [PASSED] drm_test_format_min_pitch_invalid [13:16:07] [PASSED] drm_test_format_min_pitch_one_plane_8bpp [13:16:07] [PASSED] drm_test_format_min_pitch_one_plane_16bpp [13:16:07] [PASSED] drm_test_format_min_pitch_one_plane_24bpp [13:16:07] [PASSED] drm_test_format_min_pitch_one_plane_32bpp [13:16:07] [PASSED] drm_test_format_min_pitch_two_plane [13:16:07] [PASSED] drm_test_format_min_pitch_three_plane_8bpp [13:16:07] [PASSED] drm_test_format_min_pitch_tiled [13:16:07] =================== [PASSED] drm_format ==================== [13:16:07] ============== drm_framebuffer (10 subtests) =============== [13:16:07] ========== drm_test_framebuffer_check_src_coords ========== [13:16:07] [PASSED] Success: source fits into fb [13:16:07] [PASSED] Fail: overflowing fb with x-axis coordinate [13:16:07] [PASSED] Fail: overflowing fb with y-axis coordinate [13:16:07] [PASSED] Fail: overflowing fb with source width [13:16:07] [PASSED] Fail: overflowing fb with source height [13:16:07] ====== [PASSED] drm_test_framebuffer_check_src_coords ====== [13:16:07] [PASSED] drm_test_framebuffer_cleanup [13:16:07] =============== drm_test_framebuffer_create =============== [13:16:07] [PASSED] ABGR8888 normal sizes [13:16:07] [PASSED] ABGR8888 max sizes [13:16:07] [PASSED] ABGR8888 pitch greater than min required [13:16:07] [PASSED] ABGR8888 pitch less than min required [13:16:07] [PASSED] ABGR8888 Invalid width [13:16:07] [PASSED] ABGR8888 Invalid buffer handle [13:16:07] [PASSED] No pixel format [13:16:07] [PASSED] ABGR8888 Width 0 [13:16:07] [PASSED] ABGR8888 Height 0 [13:16:07] [PASSED] ABGR8888 Out of bound height * pitch combination [13:16:07] [PASSED] ABGR8888 Large buffer offset [13:16:07] [PASSED] ABGR8888 Buffer offset for inexistent plane [13:16:07] [PASSED] ABGR8888 Invalid flag [13:16:07] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers [13:16:07] [PASSED] ABGR8888 Valid buffer modifier [13:16:07] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE) [13:16:07] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS [13:16:07] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS [13:16:07] [PASSED] NV12 Normal sizes [13:16:07] [PASSED] NV12 Max sizes [13:16:07] [PASSED] NV12 Invalid pitch [13:16:07] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag [13:16:07] [PASSED] NV12 different modifier per-plane [13:16:07] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE [13:16:07] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS [13:16:07] [PASSED] NV12 Modifier for inexistent plane [13:16:07] [PASSED] NV12 Handle for inexistent plane [13:16:07] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS [13:16:07] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier [13:16:07] [PASSED] YVU420 Normal sizes [13:16:07] [PASSED] YVU420 Max sizes [13:16:07] [PASSED] YVU420 Invalid pitch [13:16:07] [PASSED] YVU420 Different pitches [13:16:07] [PASSED] YVU420 Different buffer offsets/pitches [13:16:07] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS [13:16:07] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS [13:16:07] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS [13:16:07] [PASSED] YVU420 Valid modifier [13:16:07] [PASSED] YVU420 Different modifiers per plane [13:16:07] [PASSED] YVU420 Modifier for inexistent plane [13:16:07] [PASSED] YUV420_10BIT Invalid modifier(DRM_FORMAT_MOD_LINEAR) [13:16:07] [PASSED] X0L2 Normal sizes [13:16:07] [PASSED] X0L2 Max sizes [13:16:07] [PASSED] X0L2 Invalid pitch [13:16:07] [PASSED] X0L2 Pitch greater than minimum required [13:16:07] [PASSED] X0L2 Handle for inexistent plane [13:16:07] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set [13:16:07] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set [13:16:07] [PASSED] X0L2 Valid modifier [13:16:07] [PASSED] X0L2 Modifier for inexistent plane [13:16:07] =========== [PASSED] drm_test_framebuffer_create =========== [13:16:07] [PASSED] drm_test_framebuffer_free [13:16:07] [PASSED] drm_test_framebuffer_init [13:16:07] [PASSED] drm_test_framebuffer_init_bad_format [13:16:07] [PASSED] drm_test_framebuffer_init_dev_mismatch [13:16:07] [PASSED] drm_test_framebuffer_lookup [13:16:07] [PASSED] drm_test_framebuffer_lookup_inexistent [13:16:07] [PASSED] drm_test_framebuffer_modifiers_not_supported [13:16:07] ================= [PASSED] drm_framebuffer ================= [13:16:07] ================ drm_gem_shmem (8 subtests) ================ [13:16:07] [PASSED] drm_gem_shmem_test_obj_create [13:16:07] [PASSED] drm_gem_shmem_test_obj_create_private [13:16:07] [PASSED] drm_gem_shmem_test_pin_pages [13:16:07] [PASSED] drm_gem_shmem_test_vmap [13:16:07] [PASSED] drm_gem_shmem_test_get_sg_table [13:16:07] [PASSED] drm_gem_shmem_test_get_pages_sgt [13:16:07] [PASSED] drm_gem_shmem_test_madvise [13:16:07] [PASSED] drm_gem_shmem_test_purge [13:16:07] ================== [PASSED] drm_gem_shmem ================== [13:16:07] === drm_atomic_helper_connector_hdmi_check (29 subtests) === [13:16:07] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode [13:16:07] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1 [13:16:07] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode [13:16:07] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1 [13:16:07] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode [13:16:07] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1 [13:16:07] ====== drm_test_check_broadcast_rgb_cea_mode_yuv420 ======= [13:16:07] [PASSED] Automatic [13:16:07] [PASSED] Full [13:16:07] [PASSED] Limited 16:235 [13:16:07] == [PASSED] drm_test_check_broadcast_rgb_cea_mode_yuv420 === [13:16:07] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed [13:16:07] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed [13:16:07] [PASSED] drm_test_check_disable_connector [13:16:07] [PASSED] drm_test_check_hdmi_funcs_reject_rate [13:16:07] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_rgb [13:16:07] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_yuv420 [13:16:07] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv422 [13:16:07] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv420 [13:16:07] [PASSED] drm_test_check_driver_unsupported_fallback_yuv420 [13:16:07] [PASSED] drm_test_check_output_bpc_crtc_mode_changed [13:16:07] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed [13:16:07] [PASSED] drm_test_check_output_bpc_dvi [13:16:07] [PASSED] drm_test_check_output_bpc_format_vic_1 [13:16:07] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only [13:16:07] [PASSED] drm_test_check_output_bpc_format_display_rgb_only [13:16:07] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only [13:16:07] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only [13:16:07] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc [13:16:07] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc [13:16:07] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc [13:16:07] ============ drm_test_check_hdmi_color_format ============= [13:16:07] [PASSED] AUTO -> RGB [13:16:07] [PASSED] YCBCR422 -> YUV422 [13:16:07] [PASSED] YCBCR420 -> YUV420 [13:16:07] [PASSED] YCBCR444 -> YUV444 [13:16:07] [PASSED] RGB -> RGB [13:16:07] ======== [PASSED] drm_test_check_hdmi_color_format ========= [13:16:07] ======== drm_test_check_hdmi_color_format_420_only ======== [13:16:07] [PASSED] RGB should fail [13:16:07] [PASSED] YUV444 should fail [13:16:07] [PASSED] YUV422 should fail [13:16:07] [PASSED] YUV420 should work [13:16:07] ==== [PASSED] drm_test_check_hdmi_color_format_420_only ==== [13:16:07] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ====== [13:16:07] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ==== [13:16:07] [PASSED] drm_test_check_broadcast_rgb_value [13:16:07] [PASSED] drm_test_check_bpc_8_value [13:16:07] [PASSED] drm_test_check_bpc_10_value [13:16:07] [PASSED] drm_test_check_bpc_12_value [13:16:07] [PASSED] drm_test_check_format_value [13:16:07] [PASSED] drm_test_check_tmds_char_value [13:16:07] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ====== [13:16:07] = drm_atomic_helper_connector_hdmi_mode_valid (7 subtests) = [13:16:07] [PASSED] drm_test_check_mode_valid [13:16:07] [PASSED] drm_test_check_mode_valid_reject [13:16:07] [PASSED] drm_test_check_mode_valid_reject_rate [13:16:07] [PASSED] drm_test_check_mode_valid_reject_max_clock [13:16:07] [PASSED] drm_test_check_mode_valid_yuv420_only_max_clock [13:16:07] [PASSED] drm_test_check_mode_valid_reject_yuv420_only_connector [13:16:07] [PASSED] drm_test_check_mode_valid_accept_yuv420_also_connector_rgb [13:16:07] === [PASSED] drm_atomic_helper_connector_hdmi_mode_valid === [13:16:07] = drm_atomic_helper_connector_hdmi_infoframes (5 subtests) = [13:16:07] [PASSED] drm_test_check_infoframes [13:16:07] [PASSED] drm_test_check_reject_avi_infoframe [13:16:07] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_8 [13:16:07] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_10 [13:16:07] [PASSED] drm_test_check_reject_audio_infoframe [13:16:07] === [PASSED] drm_atomic_helper_connector_hdmi_infoframes === [13:16:07] ================= drm_managed (2 subtests) ================= [13:16:07] [PASSED] drm_test_managed_release_action [13:16:07] [PASSED] drm_test_managed_run_action [13:16:07] =================== [PASSED] drm_managed =================== [13:16:07] =================== drm_mm (6 subtests) ==================== [13:16:07] [PASSED] drm_test_mm_init [13:16:07] [PASSED] drm_test_mm_debug [13:16:07] [PASSED] drm_test_mm_align32 [13:16:07] [PASSED] drm_test_mm_align64 [13:16:07] [PASSED] drm_test_mm_lowest [13:16:07] [PASSED] drm_test_mm_highest [13:16:07] ===================== [PASSED] drm_mm ====================== [13:16:07] ============= drm_modes_analog_tv (5 subtests) ============= [13:16:07] [PASSED] drm_test_modes_analog_tv_mono_576i [13:16:07] [PASSED] drm_test_modes_analog_tv_ntsc_480i [13:16:07] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined [13:16:07] [PASSED] drm_test_modes_analog_tv_pal_576i [13:16:07] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined [13:16:07] =============== [PASSED] drm_modes_analog_tv =============== [13:16:07] ============== drm_panic_helper (3 subtests) =============== [13:16:07] ============= drm_test_panic_screen_user_map ============== [13:16:07] [PASSED] Panic screen user, mode: 1024 x 768 XR24 little-endian (0x34325258) [13:16:07] [PASSED] Panic screen user, mode: 494 x 494 XR24 little-endian (0x34325258) [13:16:07] [PASSED] Panic screen user, mode: 1920 x 1080 XR24 little-endian (0x34325258) [13:16:07] [PASSED] Panic screen user, mode: 1024 x 768 RG16 little-endian (0x36314752) [13:16:07] [PASSED] Panic screen user, mode: 1024 x 768 RG24 little-endian (0x34324752) [13:16:07] [PASSED] Panic screen kmsg, mode: 1024 x 768 XR24 little-endian (0x34325258) [13:16:07] [PASSED] Panic screen kmsg, mode: 494 x 494 XR24 little-endian (0x34325258) [13:16:07] [PASSED] Panic screen kmsg, mode: 1920 x 1080 XR24 little-endian (0x34325258) [13:16:07] [PASSED] Panic screen kmsg, mode: 1024 x 768 RG16 little-endian (0x36314752) [13:16:07] [PASSED] Panic screen kmsg, mode: 1024 x 768 RG24 little-endian (0x34324752) [13:16:07] ========= [PASSED] drm_test_panic_screen_user_map ========== [13:16:07] ============= drm_test_panic_screen_user_page ============= [13:16:07] [PASSED] Panic screen user, mode: 1024 x 768 XR24 little-endian (0x34325258) [13:16:07] [PASSED] Panic screen user, mode: 494 x 494 XR24 little-endian (0x34325258) [13:16:07] [PASSED] Panic screen user, mode: 1920 x 1080 XR24 little-endian (0x34325258) [13:16:07] [PASSED] Panic screen user, mode: 1024 x 768 RG16 little-endian (0x36314752) [13:16:07] [PASSED] Panic screen user, mode: 1024 x 768 RG24 little-endian (0x34324752) [13:16:07] [PASSED] Panic screen kmsg, mode: 1024 x 768 XR24 little-endian (0x34325258) [13:16:07] [PASSED] Panic screen kmsg, mode: 494 x 494 XR24 little-endian (0x34325258) [13:16:07] [PASSED] Panic screen kmsg, mode: 1920 x 1080 XR24 little-endian (0x34325258) [13:16:07] [PASSED] Panic screen kmsg, mode: 1024 x 768 RG16 little-endian (0x36314752) [13:16:07] [PASSED] Panic screen kmsg, mode: 1024 x 768 RG24 little-endian (0x34324752) [13:16:07] ========= [PASSED] drm_test_panic_screen_user_page ========= [13:16:07] ========== drm_test_panic_screen_user_set_pixel =========== [13:16:07] [PASSED] Panic screen user, mode: 1024 x 768 XR24 little-endian (0x34325258) [13:16:07] [PASSED] Panic screen user, mode: 494 x 494 XR24 little-endian (0x34325258) [13:16:07] [PASSED] Panic screen user, mode: 1920 x 1080 XR24 little-endian (0x34325258) [13:16:07] [PASSED] Panic screen user, mode: 1024 x 768 RG16 little-endian (0x36314752) [13:16:07] [PASSED] Panic screen user, mode: 1024 x 768 RG24 little-endian (0x34324752) [13:16:07] [PASSED] Panic screen kmsg, mode: 1024 x 768 XR24 little-endian (0x34325258) [13:16:07] [PASSED] Panic screen kmsg, mode: 494 x 494 XR24 little-endian (0x34325258) [13:16:07] [PASSED] Panic screen kmsg, mode: 1920 x 1080 XR24 little-endian (0x34325258) [13:16:07] [PASSED] Panic screen kmsg, mode: 1024 x 768 RG16 little-endian (0x36314752) [13:16:07] [PASSED] Panic screen kmsg, mode: 1024 x 768 RG24 little-endian (0x34324752) [13:16:07] ====== [PASSED] drm_test_panic_screen_user_set_pixel ======= [13:16:07] ================ [PASSED] drm_panic_helper ================= [13:16:07] ============== drm_plane_helper (2 subtests) =============== [13:16:07] =============== drm_test_check_plane_state ================ [13:16:07] [PASSED] clipping_simple [13:16:07] [PASSED] clipping_rotate_reflect [13:16:07] [PASSED] positioning_simple [13:16:07] [PASSED] upscaling [13:16:07] [PASSED] downscaling [13:16:07] [PASSED] rounding1 [13:16:07] [PASSED] rounding2 [13:16:07] [PASSED] rounding3 [13:16:07] [PASSED] rounding4 [13:16:07] =========== [PASSED] drm_test_check_plane_state ============ [13:16:07] =========== drm_test_check_invalid_plane_state ============ [13:16:07] [PASSED] positioning_invalid [13:16:07] [PASSED] upscaling_invalid [13:16:07] [PASSED] downscaling_invalid [13:16:07] ======= [PASSED] drm_test_check_invalid_plane_state ======== [13:16:07] ================ [PASSED] drm_plane_helper ================= [13:16:07] ====== drm_connector_helper_tv_get_modes (1 subtest) ======= [13:16:07] ====== drm_test_connector_helper_tv_get_modes_check ======= [13:16:07] [PASSED] None [13:16:07] [PASSED] PAL [13:16:07] [PASSED] NTSC [13:16:07] [PASSED] Both, NTSC Default [13:16:07] [PASSED] Both, PAL Default [13:16:07] [PASSED] Both, NTSC Default, with PAL on command-line [13:16:07] [PASSED] Both, PAL Default, with NTSC on command-line [13:16:07] == [PASSED] drm_test_connector_helper_tv_get_modes_check === [13:16:07] ======== [PASSED] drm_connector_helper_tv_get_modes ======== [13:16:07] ================== drm_rect (9 subtests) =================== [13:16:07] [PASSED] drm_test_rect_clip_scaled_div_by_zero [13:16:07] [PASSED] drm_test_rect_clip_scaled_not_clipped [13:16:07] [PASSED] drm_test_rect_clip_scaled_clipped [13:16:07] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned [13:16:07] ================= drm_test_rect_intersect ================= [13:16:07] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0 [13:16:07] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1 [13:16:07] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0 [13:16:07] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1 [13:16:07] [PASSED] right x left: 2x1+0+0 x 3x1+1+0 [13:16:07] [PASSED] left x right: 3x1+1+0 x 2x1+0+0 [13:16:07] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1 [13:16:07] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0 [13:16:07] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1 [13:16:07] [PASSED] touching side: 1x1+0+0 x 1x1+1+0 [13:16:07] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0 [13:16:07] [PASSED] inside another: 2x2+0+0 x 1x1+1+1 [13:16:07] [PASSED] far away: 1x1+0+0 x 1x1+3+6 [13:16:07] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10 [13:16:07] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10 [13:16:07] ============= [PASSED] drm_test_rect_intersect ============= [13:16:07] ================ drm_test_rect_calc_hscale ================ [13:16:07] [PASSED] normal use [13:16:07] [PASSED] out of max range [13:16:07] [PASSED] out of min range [13:16:07] [PASSED] zero dst [13:16:07] [PASSED] negative src [13:16:07] [PASSED] negative dst [13:16:07] ============ [PASSED] drm_test_rect_calc_hscale ============ [13:16:07] ================ drm_test_rect_calc_vscale ================ [13:16:07] [PASSED] normal use [13:16:07] [PASSED] out of max range [13:16:07] [PASSED] out of min range [13:16:07] [PASSED] zero dst [13:16:07] [PASSED] negative src [13:16:07] [PASSED] negative dst [13:16:07] ============ [PASSED] drm_test_rect_calc_vscale ============ [13:16:07] ================== drm_test_rect_rotate =================== [13:16:07] [PASSED] reflect-x [13:16:07] [PASSED] reflect-y [13:16:07] [PASSED] rotate-0 [13:16:07] [PASSED] rotate-90 [13:16:07] [PASSED] rotate-180 [13:16:07] [PASSED] rotate-270 [13:16:07] ============== [PASSED] drm_test_rect_rotate =============== [13:16:07] ================ drm_test_rect_rotate_inv ================= [13:16:07] [PASSED] reflect-x [13:16:07] [PASSED] reflect-y [13:16:07] [PASSED] rotate-0 [13:16:07] [PASSED] rotate-90 [13:16:07] [PASSED] rotate-180 [13:16:07] [PASSED] rotate-270 [13:16:07] ============ [PASSED] drm_test_rect_rotate_inv ============= [13:16:07] ==================== [PASSED] drm_rect ===================== [13:16:07] ============ drm_sysfb_modeset_test (1 subtest) ============ [13:16:07] ============ drm_test_sysfb_build_fourcc_list ============= [13:16:07] [PASSED] no native formats [13:16:07] [PASSED] XRGB8888 as native format [13:16:07] [PASSED] remove duplicates [13:16:07] [PASSED] convert alpha formats [13:16:07] [PASSED] random formats [13:16:07] ======== [PASSED] drm_test_sysfb_build_fourcc_list ========= [13:16:07] ============= [PASSED] drm_sysfb_modeset_test ============== [13:16:07] ================== drm_fixp (2 subtests) =================== [13:16:07] [PASSED] drm_test_int2fixp [13:16:07] [PASSED] drm_test_sm2fixp [13:16:07] ==================== [PASSED] drm_fixp ===================== [13:16:07] ============================================================ [13:16:07] Testing complete. Ran 667 tests: passed: 667 [13:16:07] Elapsed time: 28.774s total, 2.497s configuring, 25.858s building, 0.409s running
+ for kcfg in "${kunitconfigs[@]}"
+ [[ ! -f /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig ]]
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig [13:16:08] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig [13:16:10] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48 [13:16:21] Starting KUnit Kernel (1/1)... [13:16:21] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [13:16:21] ================= ttm_device (5 subtests) ================== [13:16:21] [PASSED] ttm_device_init_basic [13:16:21] [PASSED] ttm_device_init_multiple [13:16:21] [PASSED] ttm_device_fini_basic [13:16:21] [PASSED] ttm_device_init_no_vma_man [13:16:21] ================== ttm_device_init_pools ================== [13:16:21] [PASSED] No DMA allocations, no DMA32 required [13:16:21] [PASSED] DMA allocations, DMA32 required [13:16:21] [PASSED] No DMA allocations, DMA32 required [13:16:21] [PASSED] DMA allocations, no DMA32 required [13:16:21] ============== [PASSED] ttm_device_init_pools ============== [13:16:21] =================== [PASSED] ttm_device ==================== [13:16:21] ================== ttm_pool (8 subtests) =================== [13:16:21] ================== ttm_pool_alloc_basic =================== [13:16:21] [PASSED] One page [13:16:21] [PASSED] More than one page [13:16:21] [PASSED] Above the allocation limit [13:16:21] [PASSED] One page, with coherent DMA mappings enabled [13:16:21] [PASSED] Above the allocation limit, with coherent DMA mappings enabled [13:16:21] ============== [PASSED] ttm_pool_alloc_basic =============== [13:16:21] ============== ttm_pool_alloc_basic_dma_addr ============== [13:16:21] [PASSED] One page [13:16:21] [PASSED] More than one page [13:16:21] [PASSED] Above the allocation limit [13:16:21] [PASSED] One page, with coherent DMA mappings enabled [13:16:21] [PASSED] Above the allocation limit, with coherent DMA mappings enabled [13:16:21] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ========== [13:16:21] [PASSED] ttm_pool_alloc_order_caching_match [13:16:21] [PASSED] ttm_pool_alloc_caching_mismatch [13:16:21] [PASSED] ttm_pool_alloc_order_mismatch [13:16:21] [PASSED] ttm_pool_free_dma_alloc [13:16:21] [PASSED] ttm_pool_free_no_dma_alloc [13:16:21] [PASSED] ttm_pool_fini_basic [13:16:21] ==================== [PASSED] ttm_pool ===================== [13:16:21] ================ ttm_resource (8 subtests) ================= [13:16:21] ================= ttm_resource_init_basic ================= [13:16:21] [PASSED] Init resource in TTM_PL_SYSTEM [13:16:21] [PASSED] Init resource in TTM_PL_VRAM [13:16:21] [PASSED] Init resource in a private placement [13:16:21] [PASSED] Init resource in TTM_PL_SYSTEM, set placement flags [13:16:21] ============= [PASSED] ttm_resource_init_basic ============= [13:16:21] [PASSED] ttm_resource_init_pinned [13:16:21] [PASSED] ttm_resource_fini_basic [13:16:21] [PASSED] ttm_resource_manager_init_basic [13:16:21] [PASSED] ttm_resource_manager_usage_basic [13:16:21] [PASSED] ttm_resource_manager_set_used_basic [13:16:21] [PASSED] ttm_sys_man_alloc_basic [13:16:21] [PASSED] ttm_sys_man_free_basic [13:16:21] ================== [PASSED] ttm_resource =================== [13:16:21] =================== ttm_tt (15 subtests) =================== [13:16:21] ==================== ttm_tt_init_basic ==================== [13:16:21] [PASSED] Page-aligned size [13:16:21] [PASSED] Extra pages requested [13:16:21] ================ [PASSED] ttm_tt_init_basic ================ [13:16:21] [PASSED] ttm_tt_init_misaligned [13:16:21] [PASSED] ttm_tt_fini_basic [13:16:21] [PASSED] ttm_tt_fini_sg [13:16:21] [PASSED] ttm_tt_fini_shmem [13:16:21] [PASSED] ttm_tt_create_basic [13:16:21] [PASSED] ttm_tt_create_invalid_bo_type [13:16:21] [PASSED] ttm_tt_create_ttm_exists [13:16:21] [PASSED] ttm_tt_create_failed [13:16:21] [PASSED] ttm_tt_destroy_basic [13:16:21] [PASSED] ttm_tt_populate_null_ttm [13:16:21] [PASSED] ttm_tt_populate_populated_ttm [13:16:21] [PASSED] ttm_tt_unpopulate_basic [13:16:21] [PASSED] ttm_tt_unpopulate_empty_ttm [13:16:21] [PASSED] ttm_tt_swapin_basic [13:16:21] ===================== [PASSED] ttm_tt ====================== [13:16:21] =================== ttm_bo (14 subtests) =================== [13:16:21] =========== ttm_bo_reserve_optimistic_no_ticket =========== [13:16:21] [PASSED] Cannot be interrupted and sleeps [13:16:21] [PASSED] Cannot be interrupted, locks straight away [13:16:21] [PASSED] Can be interrupted, sleeps [13:16:21] ======= [PASSED] ttm_bo_reserve_optimistic_no_ticket ======= [13:16:21] [PASSED] ttm_bo_reserve_locked_no_sleep [13:16:21] [PASSED] ttm_bo_reserve_no_wait_ticket [13:16:21] [PASSED] ttm_bo_reserve_double_resv [13:16:21] [PASSED] ttm_bo_reserve_interrupted [13:16:21] [PASSED] ttm_bo_reserve_deadlock [13:16:21] [PASSED] ttm_bo_unreserve_basic [13:16:21] [PASSED] ttm_bo_unreserve_pinned [13:16:21] [PASSED] ttm_bo_unreserve_bulk [13:16:21] [PASSED] ttm_bo_fini_basic [13:16:21] [PASSED] ttm_bo_fini_shared_resv [13:16:21] [PASSED] ttm_bo_pin_basic [13:16:21] [PASSED] ttm_bo_pin_unpin_resource [13:16:21] [PASSED] ttm_bo_multiple_pin_one_unpin [13:16:21] ===================== [PASSED] ttm_bo ====================== [13:16:21] ============== ttm_bo_validate (22 subtests) =============== [13:16:21] ============== ttm_bo_init_reserved_sys_man =============== [13:16:21] [PASSED] Buffer object for userspace [13:16:21] [PASSED] Kernel buffer object [13:16:21] [PASSED] Shared buffer object [13:16:21] ========== [PASSED] ttm_bo_init_reserved_sys_man =========== [13:16:21] ============== ttm_bo_init_reserved_mock_man ============== [13:16:21] [PASSED] Buffer object for userspace [13:16:21] [PASSED] Kernel buffer object [13:16:21] [PASSED] Shared buffer object [13:16:21] ========== [PASSED] ttm_bo_init_reserved_mock_man ========== [13:16:21] [PASSED] ttm_bo_init_reserved_resv [13:16:21] ================== ttm_bo_validate_basic ================== [13:16:21] [PASSED] Buffer object for userspace [13:16:21] [PASSED] Kernel buffer object [13:16:21] [PASSED] Shared buffer object [13:16:21] ============== [PASSED] ttm_bo_validate_basic ============== [13:16:21] [PASSED] ttm_bo_validate_invalid_placement [13:16:21] ============= ttm_bo_validate_same_placement ============== [13:16:21] [PASSED] System manager [13:16:21] [PASSED] VRAM manager [13:16:21] ========= [PASSED] ttm_bo_validate_same_placement ========== [13:16:21] [PASSED] ttm_bo_validate_failed_alloc [13:16:21] [PASSED] ttm_bo_validate_pinned [13:16:21] [PASSED] ttm_bo_validate_busy_placement [13:16:21] ================ ttm_bo_validate_multihop ================= [13:16:21] [PASSED] Buffer object for userspace [13:16:21] [PASSED] Kernel buffer object [13:16:21] [PASSED] Shared buffer object [13:16:21] ============ [PASSED] ttm_bo_validate_multihop ============= [13:16:21] ========== ttm_bo_validate_no_placement_signaled ========== [13:16:21] [PASSED] Buffer object in system domain, no page vector [13:16:21] [PASSED] Buffer object in system domain with an existing page vector [13:16:21] ====== [PASSED] ttm_bo_validate_no_placement_signaled ====== [13:16:21] ======== ttm_bo_validate_no_placement_not_signaled ======== [13:16:21] [PASSED] Buffer object for userspace [13:16:21] [PASSED] Kernel buffer object [13:16:21] [PASSED] Shared buffer object [13:16:21] ==== [PASSED] ttm_bo_validate_no_placement_not_signaled ==== [13:16:21] [PASSED] ttm_bo_validate_move_fence_signaled [13:16:21] ========= ttm_bo_validate_move_fence_not_signaled ========= [13:16:21] [PASSED] Waits for GPU [13:16:21] [PASSED] Tries to lock straight away [13:16:21] ===== [PASSED] ttm_bo_validate_move_fence_not_signaled ===== [13:16:21] [PASSED] ttm_bo_validate_swapout [13:16:21] [PASSED] ttm_bo_validate_happy_evict [13:16:21] [PASSED] ttm_bo_validate_all_pinned_evict [13:16:21] [PASSED] ttm_bo_validate_allowed_only_evict [13:16:21] [PASSED] ttm_bo_validate_deleted_evict [13:16:21] [PASSED] ttm_bo_validate_busy_domain_evict [13:16:21] [PASSED] ttm_bo_validate_evict_gutting [13:16:21] [PASSED] ttm_bo_validate_recrusive_evict [13:16:21] ================= [PASSED] ttm_bo_validate ================= [13:16:21] ============================================================ [13:16:21] Testing complete. Ran 102 tests: passed: 102 [13:16:21] Elapsed time: 13.417s total, 2.392s configuring, 10.810s building, 0.185s running
+ for kcfg in "${kunitconfigs[@]}"
+ [[ ! -f /kernel/drivers/dma-buf/.kunitconfig ]]
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/dma-buf/.kunitconfig [13:16:21] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig [13:16:24] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48 [13:16:33] Starting KUnit Kernel (1/1)... [13:16:33] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [13:16:33] =============== dma-buf-fence (12 subtests) ================ [13:16:33] [PASSED] test_sanitycheck [13:16:33] [PASSED] test_signaling [13:16:33] [PASSED] test_add_callback [13:16:33] [PASSED] test_late_add_callback [13:16:33] [PASSED] test_rm_callback [13:16:33] [PASSED] test_late_rm_callback [13:16:33] [PASSED] test_status [13:16:33] [PASSED] test_error [13:16:33] [PASSED] test_wait [13:16:33] [PASSED] test_wait_timeout [13:16:33] [PASSED] test_stub [13:16:33] [SKIPPED] test_race_signal_callback (requires at least 2 CPUs) [13:16:33] ================== [PASSED] dma-buf-fence ================== [13:16:33] ============ dma-buf-fence-chain (11 subtests) ============= [13:16:33] [PASSED] test_sanitycheck [13:16:33] [PASSED] test_find_seqno [13:16:33] [PASSED] test_find_signaled [13:16:33] [PASSED] test_find_out_of_order [13:16:38] [PASSED] test_find_gap [13:16:38] [PASSED] test_find_race [13:16:38] [PASSED] test_signal_forward [13:16:38] [PASSED] test_signal_backward [13:16:38] [PASSED] test_wait_forward [13:16:38] [PASSED] test_wait_backward [13:16:38] [PASSED] test_wait_random [13:16:38] =============== [PASSED] dma-buf-fence-chain =============== [13:16:38] ============ dma-buf-fence-unwrap (11 subtests) ============ [13:16:38] [PASSED] test_sanitycheck [13:16:38] [PASSED] test_unwrap_array [13:16:38] [PASSED] test_unwrap_chain [13:16:38] [PASSED] test_unwrap_chain_array [13:16:38] [PASSED] test_unwrap_merge [13:16:38] [PASSED] test_unwrap_merge_duplicate [13:16:38] [PASSED] test_unwrap_merge_seqno [13:16:38] [PASSED] test_unwrap_merge_order [13:16:38] [PASSED] test_unwrap_merge_complex [13:16:38] [PASSED] test_unwrap_merge_complex_seqno [13:16:38] [PASSED] test_dedup_empty [13:16:38] ============== [PASSED] dma-buf-fence-unwrap =============== [13:16:38] ================ dma-buf-resv (5 subtests) ================= [13:16:38] [PASSED] test_sanitycheck [13:16:38] ===================== test_signaling ====================== [13:16:38] [PASSED] kernel [13:16:38] [PASSED] write [13:16:38] [PASSED] read [13:16:38] [PASSED] bookkeep [13:16:38] ================= [PASSED] test_signaling ================== [13:16:38] ====================== test_for_each ====================== [13:16:38] [PASSED] kernel [13:16:38] [PASSED] write [13:16:38] [PASSED] read [13:16:38] [PASSED] bookkeep [13:16:38] ================== [PASSED] test_for_each ================== [13:16:38] ================= test_for_each_unlocked ================== [13:16:38] [PASSED] kernel [13:16:38] [PASSED] write [13:16:38] [PASSED] read [13:16:38] [PASSED] bookkeep [13:16:38] ============= [PASSED] test_for_each_unlocked ============== [13:16:38] ===================== test_get_fences ===================== [13:16:38] [PASSED] kernel [13:16:38] [PASSED] write [13:16:38] [PASSED] read [13:16:38] [PASSED] bookkeep [13:16:38] ================= [PASSED] test_get_fences ================= [13:16:38] ================== [PASSED] dma-buf-resv =================== [13:16:38] ============================================================ [13:16:38] Testing complete. Ran 51 tests: passed: 50, skipped: 1 [13:16:38] Elapsed time: 17.323s total, 2.534s configuring, 9.466s building, 5.282s running
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
Patchwork
CI✓ Xe.CI.BAT: success for Non-fatal repin retries and NUMA-local rebind worker
In reply to Matthew Auld== Series Details ==
== Series Details ==
Series: Non-fatal repin retries and NUMA-local rebind worker
URL : https://patchwork.freedesktop.org/series/179052/
State : success
== Summary ==
CI Bug Log - changes from xe-6186-84508686117ca3be5756049acdf15e3e47fd2683_BAT -> xe-pw-179052v1_BAT
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (15 -> 15)
------------------------------
No changes in participating hosts
Changes
-------
No changes found
Build changes
-------------
* Linux: xe-6186-84508686117ca3be5756049acdf15e3e47fd2683 -> xe-pw-179052v1
IGT_9198: 9198
xe-6186-84508686117ca3be5756049acdf15e3e47fd2683: 84508686117ca3be5756049acdf15e3e47fd2683
xe-pw-179052v1: 179052v1
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-179052v1/index.html