Skip to contentSkip to conversation

Add a minimum age gate to the shrinker + LRU fixes

PATCH Superseded Matthew Brost 6 participants 18 messages Oct 27 – Nov 2

Subsystems (4)

v6 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

Matthew Brost

author maintainer
#0 lore raw

v6 cover Add a minimum age gate to the shrinker + LRU fixes

Fix misuse of the TTM LRU in Xe + add a minimum age gate to the shrinker which is hidden behind a Kconfig for shrinker tuning.

Matt

Matthew Brost (3):
drm/xe: Bump the LRU on a successful page fault drm/ttm: Allow skipping to the next priority in the bo LRU cursor drm/xe: Add a minimum age gate to the shrinker

 drivers/gpu/drm/ttm/ttm_bo_util.c    |   3 +
 drivers/gpu/drm/ttm/ttm_resource.c   |  35 +++++-
 drivers/gpu/drm/xe/Kconfig.profile   |  15 +++
 drivers/gpu/drm/xe/xe_bo.c           |  83 ++++++++++++++
 drivers/gpu/drm/xe/xe_bo.h           |   5 +
 drivers/gpu/drm/xe/xe_bo_types.h     |   8 ++
 drivers/gpu/drm/xe/xe_device_sysfs.c |  35 ++++++
 drivers/gpu/drm/xe/xe_pagefault.c    |   7 ++
 drivers/gpu/drm/xe/xe_shrinker.c     | 164 +++++++++++++++++++++++++--
 drivers/gpu/drm/xe/xe_shrinker.h     |   3 +
 drivers/gpu/drm/xe/xe_vm.c           |   4 +-
 drivers/gpu/drm/xe/xe_vm_types.h     |   8 ++
 include/drm/ttm/ttm_bo.h             |  19 ++++
 include/drm/ttm/ttm_resource.h       |   2 +
 14 files changed, 377 insertions(+), 14 deletions(-)
Signature · 1 line
2.34.1
author maintainer
#1 lore raw

PATCH v6 1/3 drm/xe: Bump the LRU on a successful page fault

Servicing a page fault validates the VMA's backing store and binds it, making the BO part of the VM's active working set, but unlike exec it never moves anything on the TTM LRU. In fault mode, where a VM may run for a long time without a single exec, the BOs the GPU actually touches therefore drift towards the LRU head and are picked by eviction and by the shrinker ahead of genuinely cold BOs.

Bump the BO's LRU on a successful page fault.

Fixes dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
---
 drivers/gpu/drm/xe/xe_pagefault.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/xe/xe_pagefault.c +7 -0
index 5247321c805e..6828f81df50e 100644
@@ -201,6 +201,8 @@ static int xe_pagefault_handle_vma(struct xe_gt *gt, struct xe_vma *vma,
 		xe_validation_ctx_init(&ctx, &vm->xe->val, &exec,
 				       (struct xe_val_flags) {});
 		drm_exec_until_all_locked(&exec) {
+			struct xe_bo *bo = xe_vma_bo(vma);
+
 			err = xe_pagefault_begin(&exec, vma, tile->mem.vram,
 						 needs_vram == 1);
 			drm_exec_retry_on_contention(&exec);
@@ -221,6 +223,11 @@ static int xe_pagefault_handle_vma(struct xe_gt *gt, struct xe_vma *vma,
 				xe_pagefault_set_error(pf, XE_PAGEFAULT_ERROR_VMA_REBIND);
 				break;
 			}
+
+			if (bo) {
+				scoped_guard(spinlock, &vm->xe->ttm.lru_lock)
+					ttm_bo_move_to_lru_tail(&bo->ttm);
+			}
 		}
 		xe_validation_ctx_fini(&ctx);
 	} while (err == -EAGAIN);
Signature · 1 line
2.34.1
author maintainer
#5 lore raw

PATCH v6 2/3 drm/ttm: Allow skipping to the next priority in the bo LRU cursor

In reply to Matthew Brost

Drivers walking a manager's LRU with ttm_bo_lru_for_each_reserved_guarded() may decide that the rest of the current priority isn't worth walking, for example when the priority is roughly age ordered and the walk hit a BO that is still too hot to evict. Today the only option is to stop the walk altogether, which also gives up on the remaining priorities.

Add ttm_resource_manager_next_priority() to move a resource cursor to the start of the next priority, and ttm_bo_lru_cursor_skip_priority() to make the next ttm_bo_lru_cursor_next() use it.

While at it, stop incrementing the cursor priority past the last valid priority once the iteration is done.

Assisted-by LLM
---
 drivers/gpu/drm/ttm/ttm_bo_util.c  |  3 +++
 drivers/gpu/drm/ttm/ttm_resource.c | 35 ++++++++++++++++++++++++++----
 include/drm/ttm/ttm_bo.h           | 19 ++++++++++++++++
 include/drm/ttm/ttm_resource.h     |  2 ++
 4 files changed, 55 insertions(+), 4 deletions(-)
drivers/gpu/drm/ttm/ttm_bo_util.c +3 -0
index f9458a4d5a09..d626f014e61f 100644
@@ -997,6 +997,9 @@ __ttm_bo_lru_cursor_next(struct ttm_bo_lru_cursor *curs)
 		if (first) {
 			res = ttm_resource_manager_first(&curs->res_curs);
 			first = false;
+		} else if (curs->skip_priority) {
+			res = ttm_resource_manager_next_priority(&curs->res_curs);
+			curs->skip_priority = false;
 		} else {
 			res = ttm_resource_manager_next(&curs->res_curs);
 		}
drivers/gpu/drm/ttm/ttm_resource.c +31 -4
index 4e6d3d658d85..e631507d7aa1 100644
@@ -674,6 +674,17 @@ ttm_resource_cursor_check_bulk(struct ttm_resource_cursor *cursor,
 	}
 }
 
+static bool ttm_resource_cursor_next_priority(struct ttm_resource_cursor *cursor)
+{
+	if (cursor->priority + 1 >= TTM_MAX_BO_PRIORITY)
+		return false;
+
+	list_move(&cursor->hitch.link, &cursor->man->lru[++cursor->priority]);
+	ttm_resource_cursor_clear_bulk(cursor);
+
+	return true;
+}
+
 /**
  * ttm_resource_manager_first() - Start iterating over the resources
  * of a resource manager
@@ -723,16 +734,32 @@ ttm_resource_manager_next(struct ttm_resource_cursor *cursor)
 			}
 		}
 
-		if (++cursor->priority >= TTM_MAX_BO_PRIORITY)
+		if (!ttm_resource_cursor_next_priority(cursor))
 			break;
-
-		list_move(&cursor->hitch.link, &man->lru[cursor->priority]);
-		ttm_resource_cursor_clear_bulk(cursor);
 	}
 
 	return NULL;
 }
 
+/**
+ * ttm_resource_manager_next_priority() - Skip the rest of the current
+ * priority and continue iterating at the next one
+ * @cursor: cursor to record the position
+ *
+ * Return: the first resource of the next non-empty priority, or NULL if
+ * there is none.
+ */
+struct ttm_resource *
+ttm_resource_manager_next_priority(struct ttm_resource_cursor *cursor)
+{
+	lockdep_assert_held(&cursor->man->bdev->lru_lock);
+
+	if (!ttm_resource_cursor_next_priority(cursor))
+		return NULL;
+
+	return ttm_resource_manager_next(cursor);
+}
+
 /**
  * ttm_lru_first_res_or_null() - Return the first resource on an lru list
  * @head: The list head of the lru list.
include/drm/ttm/ttm_bo.h +19 -0
index 32791c4db2a9..2fc517dbf03d 100644
@@ -507,10 +507,29 @@ struct ttm_bo_lru_cursor {
 	 * unlock before the next iteration or after loop exit.
 	 */
 	bool needs_unlock;
+	/**
+	 * @skip_priority: Continue at the next LRU priority on the next
+	 * iteration. See ttm_bo_lru_cursor_skip_priority().
+	 */
+	bool skip_priority;
 	/** @arg: Pointer to common BO LRU walk arguments. */
 	struct ttm_lru_walk_arg *arg;
 };
 
+/**
+ * ttm_bo_lru_cursor_skip_priority() - Skip the rest of the current priority
+ * @curs: The cursor.
+ *
+ * Make the next ttm_bo_lru_cursor_next() skip the remaining buffer objects
+ * of the current LRU priority and continue at the next priority, for
+ * example when the caller decides the rest of the priority isn't worth
+ * walking.
+ */
+static inline void ttm_bo_lru_cursor_skip_priority(struct ttm_bo_lru_cursor *curs)
+{
+	curs->skip_priority = true;
+}
+
 void ttm_bo_lru_cursor_fini(struct ttm_bo_lru_cursor *curs);
 
 struct ttm_bo_lru_cursor *
include/drm/ttm/ttm_resource.h +2 -0
index 714c533622c2..8cd70d1e5481 100644
@@ -499,6 +499,8 @@ struct ttm_resource *
 ttm_resource_manager_first(struct ttm_resource_cursor *cursor);
 struct ttm_resource *
 ttm_resource_manager_next(struct ttm_resource_cursor *cursor);
+struct ttm_resource *
+ttm_resource_manager_next_priority(struct ttm_resource_cursor *cursor);
 
 struct ttm_resource *
 ttm_lru_first_res_or_null(struct list_head *head);
Signature · 1 line
2.34.1
author maintainer
#9 lore raw

PATCH v6 3/3 drm/xe: Add a minimum age gate to the shrinker

In reply to Matthew Brost

Backing up a BO costs a GPU blit plus a page copy, and if the BO is part of an active working set it is faulted straight back in on the next exec. Evicting a BO that was used moments ago is therefore almost always a loss, yet the shrinker has no notion of recency beyond LRU order.

Timestamp BOs wherever their LRU position is updated, and read the stamp back from whatever owns that position. A BO in a VM's bulk move is anchored inside its range, so it is aged by the VM-wide stamp taken in xe_vm_bump_lru() alongside the bulk move itself. Any other BO carries its own, stamped there too and on a successful move into TT in xe_bo_move(), where ttm_resource_alloc() has already placed the new resource at the LRU tail.

Add a per-device shrinker_min_age_ms sysfs attribute, defaulting to CONFIG_DRM_XE_SHRINKER_MIN_AGE_MS (0, disabled). While set, the shrinker won't back up BOs younger than the delay. Each LRU priority is roughly age ordered, so the gate is applied per priority: xe_shrinker_count() snoops the first shrinkable BO of each priority and reports nothing only if all of them are young, and the backup walk skips to the next priority at the first young BO, both as a backstop for the count sample and so a hot priority doesn't shield colder BOs in another one.

Only BOs this shrinker would actually back up have a say. BOs in XE_PL_SYSTEM, which are not GPU mapped and hence not part of a working set, and BOs xe_bo_shrink() rejects outright are never young. Purgeable BOs and those advised DONTNEED are neither: they are dropped rather than backed up and accounted to the purgeable shrinker, so they are never young and the count snoop skips their XE_BO_PRIORITY_LOW band entirely.

The gate is hard and applies at every reclaim priority, so a working set kept younger than the delay is never backed up and can lead to OOM. This is deliberate, and why it is off by default.

Assisted-by LLM
---
 drivers/gpu/drm/xe/Kconfig.profile   |  15 +++
 drivers/gpu/drm/xe/xe_bo.c           |  83 ++++++++++++++
 drivers/gpu/drm/xe/xe_bo.h           |   5 +
 drivers/gpu/drm/xe/xe_bo_types.h     |   8 ++
 drivers/gpu/drm/xe/xe_device_sysfs.c |  35 ++++++
 drivers/gpu/drm/xe/xe_pagefault.c    |   2 +-
 drivers/gpu/drm/xe/xe_shrinker.c     | 164 +++++++++++++++++++++++++--
 drivers/gpu/drm/xe/xe_shrinker.h     |   3 +
 drivers/gpu/drm/xe/xe_vm.c           |   4 +-
 drivers/gpu/drm/xe/xe_vm_types.h     |   8 ++
 10 files changed, 316 insertions(+), 11 deletions(-)
drivers/gpu/drm/xe/Kconfig.profile +15 -0
index 23045ed2aa94..dd3985e502b8 100644
@@ -74,6 +74,7 @@ config DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT
 	  to apply to applicable user. For elevated user, all above MIN
 	  and MAX values will apply when this configuration is enable to
 	  apply limitation. By default limitation is applied.
+
 config DRM_XE_SHRINKER_NON_PURGEABLE_SEEKS
 	int "Default seeks value of the non-purgeable bo shrinker"
 	default 8
@@ -86,3 +87,17 @@ config DRM_XE_SHRINKER_NON_PURGEABLE_SEEKS
 	  reclaim pressure on non-purgeable buffer objects, which need
 	  GPU idling and writeback to be reclaimed, in favour of purgeable
 	  ones and other kernel caches.
+
+config DRM_XE_SHRINKER_MIN_AGE_MS
+	int "Default minimum BO age before shrinker backup (ms)"
+	default 0
+	range 0 1000000
+	help
+	  Default for the per-device shrinker_min_age_ms sysfs attribute. The
+	  shrinker won't back up a BO that was moved into TT, or bumped on the
+	  LRU by an exec, less than this many milliseconds ago. BOs already
+	  evicted to system memory are not part of a working set and are
+	  never protected. This applies at every reclaim priority: a working
+	  set kept younger than this is never backed up and can cause OOM.
+	  Only set if that risk is preferred over thrashing a hot working
+	  set. 0 disables.
drivers/gpu/drm/xe/xe_bo.c +83 -0

92 lines not on this page · raw message

drivers/gpu/drm/xe/xe_bo.h +5 -0
index 77b3a02e9b8e..65d4c638e8d8 100644
@@ -623,6 +623,11 @@ struct xe_bo_shrink_flags {
 	u32 writeback : 1;
 };
 
+void xe_bo_bump_lru_locked(struct xe_bo *bo);
+
+bool xe_bo_shrink_backup_candidate(struct ttm_buffer_object *bo);
+bool xe_bo_shrink_too_young(struct ttm_buffer_object *bo, unsigned long min_age);
+
 long xe_bo_shrink(struct ttm_operation_ctx *ctx, struct ttm_buffer_object *bo,
 		  const struct xe_bo_shrink_flags flags,
 		  unsigned long *scanned);
drivers/gpu/drm/xe/xe_bo_types.h +8 -0
index 0265fb314c77..f63b668c7134 100644
@@ -49,6 +49,14 @@ struct xe_bo {
 	u32 flags;
 	/** @vm: VM this BO is attached to, for extobj this will be NULL */
 	struct xe_vm *vm;
+	/**
+	 * @lru_stamp: jiffies at the last LRU bump, done on a move into TT
+	 * and at exec time. Only describes the LRU position of a BO outside
+	 * a bulk move; BOs in one are aged by &xe_vm.lru_stamp instead.
+	 * Consulted by the shrinker's minimum age gate. Accessed with
+	 * READ_ONCE()/WRITE_ONCE().
+	 */
+	unsigned long lru_stamp;
 	/**
 	 * @q: Queue this BO is attached to, mostly for LRC BO, NULL otherwise.
 	 * Protected by the BO dma_resv: readers must hold it across both the
drivers/gpu/drm/xe/xe_device_sysfs.c +35 -0
index ff5d25dd867c..26b1f71ed522 100644
@@ -38,6 +38,12 @@
  * 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.
+ *
+ * shrinker_min_age_ms - Report/change the minimum time, in ms, since a BO was
+ * last moved to TT or bumped on the LRU by an exec before the shrinker may
+ * back it up. BOs evicted to system memory are never protected. Defaults to
+ * CONFIG_DRM_XE_SHRINKER_MIN_AGE_MS, 0 disables. This applies at every
+ * reclaim priority, so a non-zero value can lead to OOM.
  */
 
 static ssize_t
@@ -331,8 +337,37 @@ shrinker_non_purgeable_seeks_store(struct device *dev,
 
 static DEVICE_ATTR_RW(shrinker_non_purgeable_seeks);
 
+static ssize_t
+shrinker_min_age_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", xe_shrinker_min_age_ms(xe->mem.shrinker));
+}
+
+static ssize_t
+shrinker_min_age_ms_store(struct device *dev, struct device_attribute *attr,
+			  const char *buff, size_t count)
+{
+	struct xe_device *xe = pdev_to_xe_device(to_pci_dev(dev));
+	unsigned int ms;
+	int ret;
+
+	ret = kstrtouint(buff, 0, &ms);
+	if (ret)
+		return ret;
+
+	xe_shrinker_set_min_age_ms(xe->mem.shrinker, ms);
+
+	return count;
+}
+
+static DEVICE_ATTR_RW(shrinker_min_age_ms);
+
 static struct attribute *shrinker_attrs[] = {
 	&dev_attr_shrinker_non_purgeable_seeks.attr,
+	&dev_attr_shrinker_min_age_ms.attr,
 	NULL
 };
 
drivers/gpu/drm/xe/xe_pagefault.c +1 -1
index 6828f81df50e..895866d639f8 100644
@@ -226,7 +226,7 @@ static int xe_pagefault_handle_vma(struct xe_gt *gt, struct xe_vma *vma,
 
 			if (bo) {
 				scoped_guard(spinlock, &vm->xe->ttm.lru_lock)
-					ttm_bo_move_to_lru_tail(&bo->ttm);
+					xe_bo_bump_lru_locked(bo);
 			}
 		}
 		xe_validation_ctx_fini(&ctx);
drivers/gpu/drm/xe/xe_shrinker.c +155 -9

250 lines not on this page · raw message

drivers/gpu/drm/xe/xe_shrinker.h +3 -0
index 4b3c73689619..586d7772bd58 100644
@@ -18,4 +18,7 @@ int xe_shrinker_non_purgeable_seeks(struct xe_shrinker *shrinker);
 int xe_shrinker_set_non_purgeable_seeks(struct xe_shrinker *shrinker,
 					unsigned int seeks);
 
+unsigned int xe_shrinker_min_age_ms(struct xe_shrinker *shrinker);
+void xe_shrinker_set_min_age_ms(struct xe_shrinker *shrinker, unsigned int ms);
+
 #endif
drivers/gpu/drm/xe/xe_vm.c +3 -1
index 86c3b4fd232f..583c55b7f97d 100644
@@ -463,13 +463,15 @@ void xe_vm_bump_lru(struct xe_vm *vm, struct drm_exec *exec)
 	spinlock_t *lru_lock = &vm->xe->ttm.lru_lock;
 	struct drm_gem_object *obj;
 
+	WRITE_ONCE(vm->lru_stamp, jiffies);
+
 	spin_lock(lru_lock);
 	ttm_lru_bulk_move_tail(&vm->lru_bulk_move);
 	drm_exec_for_each_locked_object(exec, obj) {
 		if (!drm_gpuvm_is_extobj(&vm->gpuvm, obj))
 			continue;
 
-		ttm_bo_move_to_lru_tail(&gem_to_xe_bo(obj)->ttm);
+		xe_bo_bump_lru_locked(gem_to_xe_bo(obj));
 		cond_resched_lock(lru_lock);
 	}
 	spin_unlock(lru_lock);
drivers/gpu/drm/xe/xe_vm_types.h +8 -0
index fb9305124679..046505a285e9 100644
@@ -267,6 +267,14 @@ struct xe_vm {
 	/** @lru_bulk_move: Bulk LRU move list for this VM's BOs */
 	struct ttm_lru_bulk_move lru_bulk_move;
 
+	/**
+	 * @lru_stamp: jiffies at the last xe_vm_bump_lru(), which is where
+	 * @lru_bulk_move is moved to the LRU tail. Ages every BO in that
+	 * bulk move for the shrinker's minimum age gate. Accessed with
+	 * READ_ONCE()/WRITE_ONCE().
+	 */
+	unsigned long lru_stamp;
+
 	u64 size;
 
 	struct xe_pt *pt_root[XE_MAX_TILES_PER_DEVICE];
Signature · 1 line
2.34.1
#10 lore raw

Re: [PATCH v6 3/3] drm/xe: Add a minimum age gate to the shrinker

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] drm/xe: xe_bo_shrink_too_young() misses age updates for bulk-moved VM BOs --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] drm/xe: xe_bo_shrink_too_young() misses age updates for bulk-moved VM BOs --

commit e6e467b2b2dcc54cbb4e9022c6f181631ac6573a
Author: Matthew Brost <[email protected]>

drm/xe: Add a minimum age gate to the shrinker

This commit adds a minimum age gate to the xe shrinker so recently used buffer objects in TT are not backed up before a configurable delay (shrinker_min_age_ms). It timestamps BOs on move into TT and at LRU bump time, using either the VM bulk-move timestamp or the BO's own timestamp.

Quoted 17 lines
drivers/gpu/drm/xe/xe_bo.c +7 -0
index 42a6aa1a2e4a0..a4c0c6284a24d 100644
@@ -1357,9 +1357,92 @@ static int xe_bo_move(struct ttm_buffer_object *ttm_bo, bool evict,
 		xe_tt_unmap_sg(xe, ttm_bo->ttm);
 	}
 
+	/*
+	 * ttm_resource_alloc() already placed the new resource at the tail of
+	 * its LRU, or of @bo's bulk move, so only record when that happened.
+	 */
+	if (!ret && ttm_bo->resource && ttm_bo->resource->mem_type == XE_PL_TT)
+		WRITE_ONCE(bo->lru_stamp, jiffies);
+
 	return ret;
 }

[ ... ]

Quoted 7 lines
drivers/gpu/drm/xe/xe_bo.c +7 -0
+bool xe_bo_shrink_too_young(struct ttm_buffer_object *bo, unsigned long min_age)
+{
+	struct xe_bo *xe_bo;
+	unsigned long stamp;
+
+	if (!min_age || bo->resource->mem_type == XE_PL_SYSTEM ||
+	    !xe_bo_shrink_backup_candidate(bo))

drivers/gpu/drm/xe/xe_bo.c static int xe_bo_move(struct ttm_buffer_object *ttm_bo, bool evict, · line 1444

Quoted 10 lines
drivers/gpu/drm/xe/xe_bo.c +10 -0
+		return false;
+
+	xe_bo = ttm_to_xe_bo(bo);
+	if (bo->bulk_move && xe_bo->vm)
+		stamp = READ_ONCE(xe_bo->vm->lru_stamp);
+	else
+		stamp = READ_ONCE(xe_bo->lru_stamp);
+
+	return stamp && time_before(jiffies, stamp + min_age);
+}

[Severity: Medium]
Can xe_bo_shrink_too_young() miss age updates for bulk-moved VM BOs when reading only xe_bo->vm->lru_stamp?

In __xe_bo_create_locked(), every private user BO on a non-fault-mode VM is attached to vm->lru_bulk_move:

drivers/gpu/drm/xe/xe_bo.c:__xe_bo_create_locked() {
	...
	bo = xe_bo_init_locked(xe, bo, tile, vm ? xe_vm_resv(vm) : NULL,
			       vm && !xe_vm_in_fault_mode(vm) &&
			       flags & XE_BO_FLAG_USER ?
			       &vm->lru_bulk_move : NULL, size,
			       cpu_caching, type, flags, NULL, exec);
	...
}

Because bo->bulk_move && xe_bo->vm is true for these BOs, xe_bo_shrink_too_young() ignores xe_bo->lru_stamp (even though xe_bo_move() updates bo->lru_stamp on move into XE_PL_TT) and only consults xe_bo->vm->lru_stamp.

However, vm->lru_stamp is only updated in xe_vm_bump_lru(), which is skipped in xe_exec_ioctl() for all LR-mode VMs:

drivers/gpu/drm/xe/xe_exec.c:xe_exec_ioctl() {
	...
	if (!err && !xe_vm_in_lr_mode(vm))
		xe_vm_bump_lru(vm, exec);
	...
}

For a preempt-fence LR VM (XE_VM_FLAG_LR_MODE without XE_VM_FLAG_FAULT_MODE), private user BOs have bo->bulk_move set to &vm->lru_bulk_move, but xe_exec_ioctl() never calls xe_vm_bump_lru(), and preempt_rebind_work_func() only calls xe_vm_bump_lru() after an eviction or invalidation triggers rebind work. As a result, vm->lru_stamp stays 0 until a rebind occurs and remains frozen at the last rebind timestamp afterward.

In addition, on any non-fault-mode VM, when a private user BO is moved into XE_PL_TT in xe_bo_move() while the VM's (XE_PL_TT, bo->priority) bulk-move range is empty (such as before the first exec, or after prior TT BOs at that priority were evicted or moved to VRAM), ttm_resource_init() and ttm_lru_bulk_move_add() place the resource at the tail of man->lru[bo->priority] without updating vm->lru_stamp.

When that happens, won't xe_bo_shrink_too_young() see a 0 or stale vm->lru_stamp and treat a newly moved or active TT BO at the LRU tail as old, both allowing it to be backed up immediately and failing to trigger ttm_bo_lru_cursor_skip_priority() in xe_shrinker_lru_young() and __xe_shrinker_walk()?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
#15 lore raw

✓ CI.KUnit: success for Add a minimum age gate to the shrinker + LRU fixes (rev3)

In reply to Matthew Brost
== Series Details ==

== Series Details ==

Series: Add a minimum age gate to the shrinker + LRU fixes (rev3)
URL : https://patchwork.freedesktop.org/series/176975/
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
[23:39:39] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[23:39:43] 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
[23:40:04] Starting KUnit Kernel (1/1)...
[23:40:04] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[23:40:04] ================= gpu_buddy (14 subtests) ==================
[23:40:04] [PASSED] gpu_test_buddy_alloc_limit
[23:40:04] [PASSED] gpu_test_buddy_alloc_optimistic
[23:40:04] [PASSED] gpu_test_buddy_alloc_pessimistic
[23:40:04] [PASSED] gpu_test_buddy_alloc_pathological
[23:40:04] [PASSED] gpu_test_buddy_alloc_contiguous
[23:40:04] [PASSED] gpu_test_buddy_alloc_clear
[23:40:04] [PASSED] gpu_test_buddy_alloc_range
[23:40:04] [PASSED] gpu_test_buddy_alloc_range_bias
[23:40:05] [PASSED] gpu_test_buddy_fragmentation_performance
[23:40:05] [PASSED] gpu_test_buddy_dirty_tracker_performance
[23:40:05] [PASSED] gpu_test_buddy_alloc_exceeds_max_order
[23:40:05] [PASSED] gpu_test_buddy_offset_aligned_allocation
[23:40:05] [PASSED] gpu_test_buddy_subtree_offset_alignment_stress
[23:40:05] [PASSED] gpu_test_buddy_addr_to_block
[23:40:05] ==================== [PASSED] gpu_buddy ====================
[23:40:05] ============================================================
[23:40:05] Testing complete. Ran 14 tests: passed: 14
[23:40:06] Elapsed time: 26.637s total, 4.461s configuring, 20.259s building, 1.863s 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 [23:40:06] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[23:40:08] 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
[23:40:46] Starting KUnit Kernel (1/1)...
[23:40:46] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[23:40:46] ================== guc_buf (11 subtests) ===================
[23:40:46] [PASSED] test_smallest
[23:40:46] [PASSED] test_largest
[23:40:46] [PASSED] test_granular
[23:40:46] [PASSED] test_unique
[23:40:46] [PASSED] test_overlap
[23:40:46] [PASSED] test_reusable
[23:40:46] [PASSED] test_too_big
[23:40:46] [PASSED] test_flush
[23:40:46] [PASSED] test_lookup
[23:40:46] [PASSED] test_data
[23:40:46] [PASSED] test_class
[23:40:46] ===================== [PASSED] guc_buf =====================
[23:40:46] =================== guc_dbm (7 subtests) ===================
[23:40:46] [PASSED] test_empty
[23:40:46] [PASSED] test_default
[23:40:46] ======================== test_size  ========================
[23:40:46] [PASSED] 4
[23:40:46] [PASSED] 8
[23:40:46] [PASSED] 32
[23:40:46] [PASSED] 256
[23:40:46] ==================== [PASSED] test_size ====================
[23:40:46] ======================= test_reuse  ========================
[23:40:46] [PASSED] 4
[23:40:46] [PASSED] 8
[23:40:46] [PASSED] 32
[23:40:46] [PASSED] 256
[23:40:46] =================== [PASSED] test_reuse ====================
[23:40:46] =================== test_range_overlap  ====================
[23:40:46] [PASSED] 4
[23:40:46] [PASSED] 8
[23:40:46] [PASSED] 32
[23:40:46] [PASSED] 256
[23:40:46] =============== [PASSED] test_range_overlap ================
[23:40:46] =================== test_range_compact  ====================
[23:40:46] [PASSED] 4
[23:40:46] [PASSED] 8
[23:40:46] [PASSED] 32
[23:40:46] [PASSED] 256
[23:40:46] =============== [PASSED] test_range_compact ================
[23:40:46] ==================== test_range_spare  =====================
[23:40:46] [PASSED] 4
[23:40:46] [PASSED] 8
[23:40:46] [PASSED] 32
[23:40:46] [PASSED] 256
[23:40:46] ================ [PASSED] test_range_spare =================
[23:40:46] ===================== [PASSED] guc_dbm =====================
[23:40:46] ================== guc_idm (22 subtests) ===================
[23:40:46] [PASSED] bad_init
[23:40:46] [PASSED] no_init
[23:40:46] [PASSED] init_fini
[23:40:46] [PASSED] check_init_small
[23:40:46] [PASSED] check_init_shared
[23:40:46] [PASSED] check_used
[23:40:46] [PASSED] check_quota
[23:40:46] [PASSED] check_all
[23:40:46] [PASSED] check_limits
[23:40:46] [PASSED] check_overlap
[23:40:46] [PASSED] check_overlap_alloc
[23:40:46] [PASSED] check_overlap_release
[23:40:46] [PASSED] check_overlap_partial_init
[23:40:46] [PASSED] check_overlap_partial_shared_range_blocking
[23:40:46] [PASSED] check_used_usable
[23:40:46] [PASSED] check_used_shareable
[23:40:46] [PASSED] check_used_mixed
[23:40:46] [PASSED] check_release_usable_range
[23:40:46] [PASSED] check_release_shareable_range
[23:40:46] [PASSED] check_split_boundaries
[23:40:46] [PASSED] check_shareable_spare
[23:40:46] [PASSED] check_shareable_spare_fragmented_tail
[23:40:46] ===================== [PASSED] guc_idm =====================
[23:40:46] ============== guc_klv_helpers (13 subtests) ===============
[23:40:46] [PASSED] test_count
[23:40:46] [PASSED] test_encode_u32
[23:40:46] [PASSED] test_encode_u64
[23:40:46] [PASSED] test_encode_string
[23:40:46] [PASSED] test_encode_object_raw
[23:40:46] [PASSED] test_encode_object_klv
[23:40:46] [PASSED] test_encode_object_nested
[23:40:46] [PASSED] test_encode_object_basic
[23:40:46] ===================== test_decode_u16  =====================
[23:40:46] [PASSED] empty
[23:40:46] [PASSED] valid
[23:40:46] [PASSED] max
[23:40:46] [PASSED] big
[23:40:46] [PASSED] long
[23:40:46] ================= [PASSED] test_decode_u16 =================
[23:40:46] ===================== test_decode_u32  =====================
[23:40:46] [PASSED] empty
[23:40:46] [PASSED] valid
[23:40:46] [PASSED] max
[23:40:46] [PASSED] long
[23:40:46] ================= [PASSED] test_decode_u32 =================
[23:40:46] ===================== test_decode_u64  =====================
[23:40:46] [PASSED] empty
[23:40:46] [PASSED] short
[23:40:46] [PASSED] valid
[23:40:46] [PASSED] max
[23:40:46] [PASSED] long
[23:40:46] ================= [PASSED] test_decode_u64 =================
[23:40:46] ===================== test_decode_str  =====================
[23:40:46] [PASSED] empty
[23:40:46] [PASSED] one
[23:40:46] [PASSED] one_trash
[23:40:46] [PASSED] two
[23:40:46] [PASSED] two_trash
[23:40:46] [PASSED] three
[23:40:46] [PASSED] dword
[23:40:46] [PASSED] four
[23:40:46] [PASSED] five
[23:40:46] [PASSED] six
[23:40:46] [PASSED] seven
[23:40:46] [PASSED] qword
[23:40:46] ================= [PASSED] test_decode_str =================
[23:40:46] [PASSED] test_print
[23:40:46] ================= [PASSED] guc_klv_helpers =================
[23:40:46] =================== xe_log (4 subtests) ====================
[23:40:46] [PASSED] demo_cper
[23:40:46] [PASSED] demo_dmesg
[23:40:46] ======================= test_dmesg  ========================
[23:40:46] [PASSED] test_fatal
[23:40:46] [PASSED] test_fatal_tile
[23:40:46] [PASSED] test_fatal_gt
[23:40:46] [PASSED] test_fatal_comp
[23:40:46] [PASSED] test_fatal_comp_tile
[23:40:46] [PASSED] test_fatal_comp_gt
[23:40:46] [PASSED] test_fatal_all
[23:40:46] [PASSED] test_recoverable
[23:40:46] [PASSED] test_recoverable_tile
[23:40:46] [PASSED] test_recoverable_gt
[23:40:46] [PASSED] test_recoverable_comp
[23:40:46] [PASSED] test_recoverable_comp_tile
[23:40:46] [PASSED] test_recoverable_comp_gt
[23:40:46] [PASSED] test_recoverable_all
[23:40:46] [PASSED] test_info
[23:40:46] [PASSED] test_info_tile
[23:40:46] [PASSED] test_info_gt
[23:40:46] [PASSED] test_info_err
[23:40:46] [PASSED] test_info_comp
[23:40:46] [PASSED] test_info_comp_tile
[23:40:46] [PASSED] test_info_comp_gt
[23:40:46] [PASSED] test_info_all
[23:40:46] [PASSED] test_hw_fatal
[23:40:46] [PASSED] test_hw_recoverable
[23:40:46] [PASSED] test_hw_corrected
[23:40:46] [PASSED] test_hw_informational
[23:40:46] =================== [PASSED] test_dmesg ====================
[23:40:47] ====================== test_invalid  =======================
[23:40:47] [SKIPPED] no-component no-location no-warn (requires CONFIG_DRM_XE_DEBUG)
[23:40:47] [SKIPPED] reserved location (requires CONFIG_DRM_XE_DEBUG)
[23:40:47] [SKIPPED] unknown location (requires CONFIG_DRM_XE_DEBUG)
[23:40:47] [SKIPPED] nonzero-device-id location (requires CONFIG_DRM_XE_DEBUG)
[23:40:47] [SKIPPED] invalid-tile-id location (requires CONFIG_DRM_XE_DEBUG)
[23:40:47] [SKIPPED] invalid-gt-id location (requires CONFIG_DRM_XE_DEBUG)
[23:40:47] [SKIPPED] unknown component class (requires CONFIG_DRM_XE_DEBUG)
[23:40:47] [SKIPPED] unknown system component (requires CONFIG_DRM_XE_DEBUG)
[23:40:47] [SKIPPED] unknown hardware component (requires CONFIG_DRM_XE_DEBUG)
[23:40:47] [SKIPPED] unknown component and location (requires CONFIG_DRM_XE_DEBUG)
[23:40:47] ================== [SKIPPED] test_invalid ==================
[23:40:47] ===================== [PASSED] xe_log ======================
[23:40:47] ================== no_relay (3 subtests) ===================
[23:40:47] [PASSED] xe_drops_guc2pf_if_not_ready
[23:40:47] [PASSED] xe_drops_guc2vf_if_not_ready
[23:40:47] [PASSED] xe_rejects_send_if_not_ready
[23:40:47] ==================== [PASSED] no_relay =====================
[23:40:47] ================== pf_relay (14 subtests) ==================
[23:40:47] [PASSED] pf_rejects_guc2pf_too_short
[23:40:47] [PASSED] pf_rejects_guc2pf_too_long
[23:40:47] [PASSED] pf_rejects_guc2pf_no_payload
[23:40:47] [PASSED] pf_fails_no_payload
[23:40:47] [PASSED] pf_fails_bad_origin
[23:40:47] [PASSED] pf_fails_bad_type
[23:40:47] [PASSED] pf_txn_reports_error
[23:40:47] [PASSED] pf_txn_sends_pf2guc
[23:40:47] [PASSED] pf_sends_pf2guc
[23:40:47] [SKIPPED] pf_loopback_nop (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[23:40:47] [SKIPPED] pf_loopback_echo (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[23:40:47] [SKIPPED] pf_loopback_fail (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[23:40:47] [SKIPPED] pf_loopback_busy (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[23:40:47] [SKIPPED] pf_loopback_retry (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[23:40:47] ==================== [PASSED] pf_relay =====================
[23:40:47] ================== vf_relay (3 subtests) ===================
[23:40:47] [PASSED] vf_rejects_guc2vf_too_short
[23:40:47] [PASSED] vf_rejects_guc2vf_too_long
[23:40:47] [PASSED] vf_rejects_guc2vf_no_payload
[23:40:47] ==================== [PASSED] vf_relay =====================
[23:40:47] ================ pf_gt_config (9 subtests) =================
[23:40:47] [PASSED] fair_contexts_1vf
[23:40:47] [PASSED] fair_doorbells_1vf
[23:40:47] [PASSED] fair_ggtt_1vf
[23:40:47] ====================== fair_vram_1vf  ======================
[23:40:47] [PASSED] 3.50 GiB
[23:40:47] [PASSED] 11.5 GiB
[23:40:47] [PASSED] 15.5 GiB
[23:40:47] [PASSED] 31.5 GiB
[23:40:47] [PASSED] 63.5 GiB
[23:40:47] [PASSED] 1.91 GiB
[23:40:47] ================== [PASSED] fair_vram_1vf ==================
[23:40:47] ================ fair_vram_1vf_admin_only  =================
[23:40:47] [PASSED] 3.50 GiB
[23:40:47] [PASSED] 11.5 GiB
[23:40:47] [PASSED] 15.5 GiB
[23:40:47] [PASSED] 31.5 GiB
[23:40:47] [PASSED] 63.5 GiB
[23:40:47] [PASSED] 1.91 GiB
[23:40:47] ============ [PASSED] fair_vram_1vf_admin_only =============
[23:40:47] ====================== fair_contexts  ======================
[23:40:47] [PASSED] 1 VF
[23:40:47] [PASSED] 2 VFs
[23:40:47] [PASSED] 3 VFs
[23:40:47] [PASSED] 4 VFs
[23:40:47] [PASSED] 5 VFs
[23:40:47] [PASSED] 6 VFs
[23:40:47] [PASSED] 7 VFs
[23:40:47] [PASSED] 8 VFs
[23:40:47] [PASSED] 9 VFs
[23:40:47] [PASSED] 10 VFs
[23:40:47] [PASSED] 11 VFs
[23:40:47] [PASSED] 12 VFs
[23:40:47] [PASSED] 13 VFs
[23:40:47] [PASSED] 14 VFs
[23:40:47] [PASSED] 15 VFs
[23:40:47] [PASSED] 16 VFs
[23:40:47] [PASSED] 17 VFs
[23:40:47] [PASSED] 18 VFs
[23:40:47] [PASSED] 19 VFs
[23:40:47] [PASSED] 20 VFs
[23:40:47] [PASSED] 21 VFs
[23:40:47] [PASSED] 22 VFs
[23:40:47] [PASSED] 23 VFs
[23:40:47] [PASSED] 24 VFs
[23:40:47] [PASSED] 25 VFs
[23:40:47] [PASSED] 26 VFs
[23:40:47] [PASSED] 27 VFs
[23:40:47] [PASSED] 28 VFs
[23:40:47] [PASSED] 29 VFs
[23:40:47] [PASSED] 30 VFs
[23:40:47] [PASSED] 31 VFs
[23:40:47] [PASSED] 32 VFs
[23:40:47] [PASSED] 33 VFs
[23:40:47] [PASSED] 34 VFs
[23:40:47] [PASSED] 35 VFs
[23:40:47] [PASSED] 36 VFs
[23:40:47] [PASSED] 37 VFs
[23:40:47] [PASSED] 38 VFs
[23:40:47] [PASSED] 39 VFs
[23:40:47] [PASSED] 40 VFs
[23:40:47] [PASSED] 41 VFs
[23:40:47] [PASSED] 42 VFs
[23:40:47] [PASSED] 43 VFs
[23:40:47] [PASSED] 44 VFs
[23:40:47] [PASSED] 45 VFs
[23:40:47] [PASSED] 46 VFs
[23:40:47] [PASSED] 47 VFs
[23:40:47] [PASSED] 48 VFs
[23:40:47] [PASSED] 49 VFs
[23:40:47] [PASSED] 50 VFs
[23:40:47] [PASSED] 51 VFs
[23:40:47] [PASSED] 52 VFs
[23:40:47] [PASSED] 53 VFs
[23:40:47] [PASSED] 54 VFs
[23:40:47] [PASSED] 55 VFs
[23:40:47] [PASSED] 56 VFs
[23:40:47] [PASSED] 57 VFs
[23:40:47] [PASSED] 58 VFs
[23:40:47] [PASSED] 59 VFs
[23:40:47] [PASSED] 60 VFs
[23:40:47] [PASSED] 61 VFs
[23:40:47] [PASSED] 62 VFs
[23:40:47] [PASSED] 63 VFs
[23:40:47] ================== [PASSED] fair_contexts ==================
[23:40:47] ===================== fair_doorbells  ======================
[23:40:47] [PASSED] 1 VF
[23:40:47] [PASSED] 2 VFs
[23:40:47] [PASSED] 3 VFs
[23:40:47] [PASSED] 4 VFs
[23:40:47] [PASSED] 5 VFs
[23:40:47] [PASSED] 6 VFs
[23:40:47] [PASSED] 7 VFs
[23:40:47] [PASSED] 8 VFs
[23:40:47] [PASSED] 9 VFs
[23:40:47] [PASSED] 10 VFs
[23:40:47] [PASSED] 11 VFs
[23:40:47] [PASSED] 12 VFs
[23:40:47] [PASSED] 13 VFs
[23:40:47] [PASSED] 14 VFs
[23:40:47] [PASSED] 15 VFs
[23:40:47] [PASSED] 16 VFs
[23:40:47] [PASSED] 17 VFs
[23:40:47] [PASSED] 18 VFs
[23:40:47] [PASSED] 19 VFs
[23:40:47] [PASSED] 20 VFs
[23:40:47] [PASSED] 21 VFs
[23:40:47] [PASSED] 22 VFs
[23:40:47] [PASSED] 23 VFs
[23:40:47] [PASSED] 24 VFs
[23:40:47] [PASSED] 25 VFs
[23:40:47] [PASSED] 26 VFs
[23:40:47] [PASSED] 27 VFs
[23:40:47] [PASSED] 28 VFs
[23:40:47] [PASSED] 29 VFs
[23:40:47] [PASSED] 30 VFs
[23:40:47] [PASSED] 31 VFs
[23:40:47] [PASSED] 32 VFs
[23:40:47] [PASSED] 33 VFs
[23:40:47] [PASSED] 34 VFs
[23:40:47] [PASSED] 35 VFs
[23:40:47] [PASSED] 36 VFs
[23:40:47] [PASSED] 37 VFs
[23:40:47] [PASSED] 38 VFs
[23:40:47] [PASSED] 39 VFs
[23:40:47] [PASSED] 40 VFs
[23:40:47] [PASSED] 41 VFs
[23:40:47] [PASSED] 42 VFs
[23:40:47] [PASSED] 43 VFs
[23:40:47] [PASSED] 44 VFs
[23:40:47] [PASSED] 45 VFs
[23:40:47] [PASSED] 46 VFs
[23:40:47] [PASSED] 47 VFs
[23:40:47] [PASSED] 48 VFs
[23:40:47] [PASSED] 49 VFs
[23:40:47] [PASSED] 50 VFs
[23:40:47] [PASSED] 51 VFs
[23:40:47] [PASSED] 52 VFs
[23:40:47] [PASSED] 53 VFs
[23:40:47] [PASSED] 54 VFs
[23:40:47] [PASSED] 55 VFs
[23:40:47] [PASSED] 56 VFs
[23:40:47] [PASSED] 57 VFs
[23:40:47] [PASSED] 58 VFs
[23:40:47] [PASSED] 59 VFs
[23:40:47] [PASSED] 60 VFs
[23:40:47] [PASSED] 61 VFs
[23:40:47] [PASSED] 62 VFs
[23:40:47] [PASSED] 63 VFs
[23:40:47] ================= [PASSED] fair_doorbells ==================
[23:40:47] ======================== fair_ggtt  ========================
[23:40:47] [PASSED] 1 VF
[23:40:47] [PASSED] 2 VFs
[23:40:47] [PASSED] 3 VFs
[23:40:47] [PASSED] 4 VFs
[23:40:47] [PASSED] 5 VFs
[23:40:47] [PASSED] 6 VFs
[23:40:47] [PASSED] 7 VFs
[23:40:47] [PASSED] 8 VFs
[23:40:47] [PASSED] 9 VFs
[23:40:47] [PASSED] 10 VFs
[23:40:47] [PASSED] 11 VFs
[23:40:47] [PASSED] 12 VFs
[23:40:47] [PASSED] 13 VFs
[23:40:47] [PASSED] 14 VFs
[23:40:47] [PASSED] 15 VFs
[23:40:47] [PASSED] 16 VFs
[23:40:47] [PASSED] 17 VFs
[23:40:47] [PASSED] 18 VFs
[23:40:47] [PASSED] 19 VFs
[23:40:47] [PASSED] 20 VFs
[23:40:47] [PASSED] 21 VFs
[23:40:47] [PASSED] 22 VFs
[23:40:47] [PASSED] 23 VFs
[23:40:47] [PASSED] 24 VFs
[23:40:47] [PASSED] 25 VFs
[23:40:47] [PASSED] 26 VFs
[23:40:47] [PASSED] 27 VFs
[23:40:47] [PASSED] 28 VFs
[23:40:47] [PASSED] 29 VFs
[23:40:47] [PASSED] 30 VFs
[23:40:47] [PASSED] 31 VFs
[23:40:47] [PASSED] 32 VFs
[23:40:47] [PASSED] 33 VFs
[23:40:47] [PASSED] 34 VFs
[23:40:47] [PASSED] 35 VFs
[23:40:47] [PASSED] 36 VFs
[23:40:47] [PASSED] 37 VFs
[23:40:47] [PASSED] 38 VFs
[23:40:47] [PASSED] 39 VFs
[23:40:47] [PASSED] 40 VFs
[23:40:47] [PASSED] 41 VFs
[23:40:47] [PASSED] 42 VFs
[23:40:47] [PASSED] 43 VFs
[23:40:47] [PASSED] 44 VFs
[23:40:47] [PASSED] 45 VFs
[23:40:47] [PASSED] 46 VFs
[23:40:47] [PASSED] 47 VFs
[23:40:47] [PASSED] 48 VFs
[23:40:47] [PASSED] 49 VFs
[23:40:47] [PASSED] 50 VFs
[23:40:47] [PASSED] 51 VFs
[23:40:47] [PASSED] 52 VFs
[23:40:47] [PASSED] 53 VFs
[23:40:47] [PASSED] 54 VFs
[23:40:47] [PASSED] 55 VFs
[23:40:47] [PASSED] 56 VFs
[23:40:47] [PASSED] 57 VFs
[23:40:47] [PASSED] 58 VFs
[23:40:47] [PASSED] 59 VFs
[23:40:47] [PASSED] 60 VFs
[23:40:47] [PASSED] 61 VFs
[23:40:47] [PASSED] 62 VFs
[23:40:47] [PASSED] 63 VFs
[23:40:47] ==================== [PASSED] fair_ggtt ====================
[23:40:47] ======================== fair_vram  ========================
[23:40:47] [PASSED] 1 VF
[23:40:47] [PASSED] 2 VFs
[23:40:47] [PASSED] 3 VFs
[23:40:47] [PASSED] 4 VFs
[23:40:47] [PASSED] 5 VFs
[23:40:47] [PASSED] 6 VFs
[23:40:47] [PASSED] 7 VFs
[23:40:47] [PASSED] 8 VFs
[23:40:47] [PASSED] 9 VFs
[23:40:47] [PASSED] 10 VFs
[23:40:47] [PASSED] 11 VFs
[23:40:47] [PASSED] 12 VFs
[23:40:47] [PASSED] 13 VFs
[23:40:47] [PASSED] 14 VFs
[23:40:47] [PASSED] 15 VFs
[23:40:47] [PASSED] 16 VFs
[23:40:47] [PASSED] 17 VFs
[23:40:47] [PASSED] 18 VFs
[23:40:47] [PASSED] 19 VFs
[23:40:47] [PASSED] 20 VFs
[23:40:47] [PASSED] 21 VFs
[23:40:47] [PASSED] 22 VFs
[23:40:47] [PASSED] 23 VFs
[23:40:47] [PASSED] 24 VFs
[23:40:47] [PASSED] 25 VFs
[23:40:47] [PASSED] 26 VFs
[23:40:47] [PASSED] 27 VFs
[23:40:47] [PASSED] 28 VFs
[23:40:47] [PASSED] 29 VFs
[23:40:47] [PASSED] 30 VFs
[23:40:47] [PASSED] 31 VFs
[23:40:47] [PASSED] 32 VFs
[23:40:47] [PASSED] 33 VFs
[23:40:47] [PASSED] 34 VFs
[23:40:47] [PASSED] 35 VFs
[23:40:47] [PASSED] 36 VFs
[23:40:47] [PASSED] 37 VFs
[23:40:47] [PASSED] 38 VFs
[23:40:47] [PASSED] 39 VFs
[23:40:47] [PASSED] 40 VFs
[23:40:47] [PASSED] 41 VFs
[23:40:47] [PASSED] 42 VFs
[23:40:47] [PASSED] 43 VFs
[23:40:47] [PASSED] 44 VFs
[23:40:47] [PASSED] 45 VFs
[23:40:47] [PASSED] 46 VFs
[23:40:47] [PASSED] 47 VFs
[23:40:47] [PASSED] 48 VFs
[23:40:47] [PASSED] 49 VFs
[23:40:47] [PASSED] 50 VFs
[23:40:47] [PASSED] 51 VFs
[23:40:47] [PASSED] 52 VFs
[23:40:47] [PASSED] 53 VFs
[23:40:47] [PASSED] 54 VFs
[23:40:47] [PASSED] 55 VFs
[23:40:47] [PASSED] 56 VFs
[23:40:47] [PASSED] 57 VFs
[23:40:47] [PASSED] 58 VFs
[23:40:47] [PASSED] 59 VFs
[23:40:47] [PASSED] 60 VFs
[23:40:47] [PASSED] 61 VFs
[23:40:47] [PASSED] 62 VFs
[23:40:47] [PASSED] 63 VFs
[23:40:47] ==================== [PASSED] fair_vram ====================
[23:40:47] ================== [PASSED] pf_gt_config ===================
[23:40:47] ===================== lmtt (1 subtest) =====================
[23:40:47] ======================== test_ops  =========================
[23:40:47] [PASSED] 2-level
[23:40:47] [PASSED] multi-level
[23:40:47] ==================== [PASSED] test_ops =====================
[23:40:47] ====================== [PASSED] lmtt =======================
[23:40:47] ================= sriov_packet (1 subtest) =================
[23:40:47] [PASSED] test_descriptor_init
[23:40:47] ================== [PASSED] sriov_packet ===================
[23:40:47] ================= pf_service (11 subtests) =================
[23:40:47] [PASSED] pf_negotiate_any
[23:40:47] [PASSED] pf_negotiate_base_match
[23:40:47] [PASSED] pf_negotiate_base_newer
[23:40:47] [PASSED] pf_negotiate_base_next
[23:40:47] [SKIPPED] pf_negotiate_base_older (no older minor)
[23:40:47] [PASSED] pf_negotiate_base_prev
[23:40:47] [PASSED] pf_negotiate_latest_match
[23:40:47] [PASSED] pf_negotiate_latest_newer
[23:40:47] [PASSED] pf_negotiate_latest_next
[23:40:47] [SKIPPED] pf_negotiate_latest_older (no older minor)
[23:40:47] [SKIPPED] pf_negotiate_latest_prev (no prev major)
[23:40:47] =================== [PASSED] pf_service ====================
[23:40:47] ================= xe_guc_g2g (2 subtests) ==================
[23:40:47] ============== xe_live_guc_g2g_kunit_default  ==============
[23:40:47] ========= [SKIPPED] xe_live_guc_g2g_kunit_default ==========
[23:40:47] ============== xe_live_guc_g2g_kunit_allmem  ===============
[23:40:47] ========== [SKIPPED] xe_live_guc_g2g_kunit_allmem ==========
[23:40:47] =================== [SKIPPED] xe_guc_g2g ===================
[23:40:47] =================== xe_mocs (2 subtests) ===================
[23:40:47] ================ xe_live_mocs_kernel_kunit  ================
[23:40:47] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============
[23:40:47] ================ xe_live_mocs_reset_kunit  =================
[23:40:47] ============ [SKIPPED] xe_live_mocs_reset_kunit ============
[23:40:47] ==================== [SKIPPED] xe_mocs =====================
[23:40:47] ================= xe_migrate (3 subtests) ==================
[23:40:47] ================= xe_migrate_sanity_kunit  =================
[23:40:47] ============ [SKIPPED] xe_migrate_sanity_kunit =============
[23:40:47] ================== xe_validate_ccs_kunit  ==================
[23:40:47] ============= [SKIPPED] xe_validate_ccs_kunit ==============
[23:40:47] ============= xe_migrate_access_memory_kunit  ==============
[23:40:47] ========= [SKIPPED] xe_migrate_access_memory_kunit =========
[23:40:47] =================== [SKIPPED] xe_migrate ===================
[23:40:47] ================== xe_dma_buf (1 subtest) ==================
[23:40:47] ==================== xe_dma_buf_kunit  =====================
[23:40:47] ================ [SKIPPED] xe_dma_buf_kunit ================
[23:40:47] =================== [SKIPPED] xe_dma_buf ===================
[23:40:47] ================= xe_bo_shrink (1 subtest) =================
[23:40:47] =================== xe_bo_shrink_kunit  ====================
[23:40:47] =============== [SKIPPED] xe_bo_shrink_kunit ===============
[23:40:47] ================== [SKIPPED] xe_bo_shrink ==================
[23:40:47] ==================== xe_bo (2 subtests) ====================
[23:40:47] ================== xe_ccs_migrate_kunit  ===================
[23:40:47] ============== [SKIPPED] xe_ccs_migrate_kunit ==============
[23:40:47] ==================== xe_bo_evict_kunit  ====================
[23:40:47] =============== [SKIPPED] xe_bo_evict_kunit ================
[23:40:47] ===================== [SKIPPED] xe_bo ======================
[23:40:47] =================== xe_any (9 subtests) ====================
[23:40:47] [PASSED] test_to_xe
[23:40:47] [PASSED] test_to_dev
[23:40:47] [PASSED] test_to_pdev
[23:40:47] [PASSED] test_to_drm
[23:40:47] [PASSED] test_if_pdev
[23:40:47] [PASSED] test_if_xe
[23:40:47] [PASSED] test_if_tile
[23:40:47] [PASSED] test_if_gt
[23:40:47] [PASSED] test_to_id
[23:40:47] ===================== [PASSED] xe_any ======================
[23:40:47] ==================== args (13 subtests) ====================
[23:40:47] [PASSED] count_args_test
[23:40:47] [PASSED] call_args_example
[23:40:47] [PASSED] call_args_test
[23:40:47] [PASSED] drop_first_arg_example
[23:40:47] [PASSED] drop_first_arg_test
[23:40:47] [PASSED] first_arg_example
[23:40:47] [PASSED] first_arg_test
[23:40:47] [PASSED] last_arg_example
[23:40:47] [PASSED] last_arg_test
[23:40:47] [PASSED] pick_arg_example
[23:40:47] [PASSED] if_args_example
[23:40:47] [PASSED] if_args_test
[23:40:47] [PASSED] sep_comma_example
[23:40:47] ====================== [PASSED] args =======================
[23:40:47] =================== xe_pci (3 subtests) ====================
[23:40:47] ==================== check_graphics_ip  ====================
[23:40:47] [PASSED] 12.00 Xe_LP
[23:40:47] [PASSED] 12.10 Xe_LP+
[23:40:47] [PASSED] 12.55 Xe_HPG
[23:40:47] [PASSED] 12.60 Xe_HPC
[23:40:47] [PASSED] 12.70 Xe_LPG
[23:40:47] [PASSED] 12.71 Xe_LPG
[23:40:47] [PASSED] 12.74 Xe_LPG+
[23:40:47] [PASSED] 20.01 Xe2_HPG
[23:40:47] [PASSED] 20.02 Xe2_HPG
[23:40:47] [PASSED] 20.04 Xe2_LPG
[23:40:47] [PASSED] 30.00 Xe3_LPG
[23:40:47] [PASSED] 30.01 Xe3_LPG
[23:40:47] [PASSED] 30.03 Xe3_LPG
[23:40:47] [PASSED] 30.04 Xe3_LPG
[23:40:47] [PASSED] 30.05 Xe3_LPG
[23:40:47] [PASSED] 35.10 Xe3p_LPG
[23:40:47] [PASSED] 35.11 Xe3p_XPC
[23:40:47] ================ [PASSED] check_graphics_ip ================
[23:40:47] ===================== check_media_ip  ======================
[23:40:47] [PASSED] 12.00 Xe_M
[23:40:47] [PASSED] 12.55 Xe_HPM
[23:40:47] [PASSED] 13.00 Xe_LPM+
[23:40:47] [PASSED] 13.01 Xe2_HPM
[23:40:47] [PASSED] 20.00 Xe2_LPM
[23:40:47] [PASSED] 30.00 Xe3_LPM
[23:40:47] [PASSED] 30.02 Xe3_LPM
[23:40:47] [PASSED] 35.00 Xe3p_LPM
[23:40:47] [PASSED] 35.03 Xe3p_HPM
[23:40:47] ================= [PASSED] check_media_ip ==================
[23:40:47] =================== check_platform_desc  ===================
[23:40:47] [PASSED] 0x9A60 (TIGERLAKE)
[23:40:47] [PASSED] 0x9A68 (TIGERLAKE)
[23:40:47] [PASSED] 0x9A70 (TIGERLAKE)
[23:40:47] [PASSED] 0x9A40 (TIGERLAKE)
[23:40:47] [PASSED] 0x9A49 (TIGERLAKE)
[23:40:47] [PASSED] 0x9A59 (TIGERLAKE)
[23:40:47] [PASSED] 0x9A78 (TIGERLAKE)
[23:40:47] [PASSED] 0x9AC0 (TIGERLAKE)
[23:40:47] [PASSED] 0x9AC9 (TIGERLAKE)
[23:40:47] [PASSED] 0x9AD9 (TIGERLAKE)
[23:40:47] [PASSED] 0x9AF8 (TIGERLAKE)
[23:40:47] [PASSED] 0x4C80 (ROCKETLAKE)
[23:40:47] [PASSED] 0x4C8A (ROCKETLAKE)
[23:40:47] [PASSED] 0x4C8B (ROCKETLAKE)
[23:40:47] [PASSED] 0x4C8C (ROCKETLAKE)
[23:40:47] [PASSED] 0x4C90 (ROCKETLAKE)
[23:40:47] [PASSED] 0x4C9A (ROCKETLAKE)
[23:40:47] [PASSED] 0x4680 (ALDERLAKE_S)
[23:40:47] [PASSED] 0x4682 (ALDERLAKE_S)
[23:40:47] [PASSED] 0x4688 (ALDERLAKE_S)
[23:40:47] [PASSED] 0x468A (ALDERLAKE_S)
[23:40:47] [PASSED] 0x468B (ALDERLAKE_S)
[23:40:47] [PASSED] 0x4690 (ALDERLAKE_S)
[23:40:47] [PASSED] 0x4692 (ALDERLAKE_S)
[23:40:47] [PASSED] 0x4693 (ALDERLAKE_S)
[23:40:47] [PASSED] 0x46A0 (ALDERLAKE_P)
[23:40:47] [PASSED] 0x46A1 (ALDERLAKE_P)
[23:40:47] [PASSED] 0x46A2 (ALDERLAKE_P)
[23:40:47] [PASSED] 0x46A3 (ALDERLAKE_P)
[23:40:47] [PASSED] 0x46A6 (ALDERLAKE_P)
[23:40:47] [PASSED] 0x46A8 (ALDERLAKE_P)
[23:40:47] [PASSED] 0x46AA (ALDERLAKE_P)
[23:40:47] [PASSED] 0x462A (ALDERLAKE_P)
[23:40:47] [PASSED] 0x4626 (ALDERLAKE_P)
[23:40:47] [PASSED] 0x4628 (ALDERLAKE_P)
[23:40:47] [PASSED] 0x46B0 (ALDERLAKE_P)
[23:40:47] [PASSED] 0x46B1 (ALDERLAKE_P)
[23:40:47] [PASSED] 0x46B2 (ALDERLAKE_P)
[23:40:47] [PASSED] 0x46B3 (ALDERLAKE_P)
[23:40:47] [PASSED] 0x46C0 (ALDERLAKE_P)
[23:40:47] [PASSED] 0x46C1 (ALDERLAKE_P)
[23:40:47] [PASSED] 0x46C2 (ALDERLAKE_P)
[23:40:47] [PASSED] 0x46C3 (ALDERLAKE_P)
[23:40:47] [PASSED] 0x46D0 (ALDERLAKE_N)
[23:40:47] [PASSED] 0x46D1 (ALDERLAKE_N)
[23:40:47] [PASSED] 0x46D2 (ALDERLAKE_N)
[23:40:47] [PASSED] 0x46D3 (ALDERLAKE_N)
[23:40:47] [PASSED] 0x46D4 (ALDERLAKE_N)
[23:40:47] [PASSED] 0xA721 (ALDERLAKE_P)
[23:40:47] [PASSED] 0xA7A1 (ALDERLAKE_P)
[23:40:47] [PASSED] 0xA7A9 (ALDERLAKE_P)
[23:40:47] [PASSED] 0xA7AC (ALDERLAKE_P)
[23:40:47] [PASSED] 0xA7AD (ALDERLAKE_P)
[23:40:47] [PASSED] 0xA720 (ALDERLAKE_P)
[23:40:47] [PASSED] 0xA7A0 (ALDERLAKE_P)
[23:40:47] [PASSED] 0xA7A8 (ALDERLAKE_P)
[23:40:47] [PASSED] 0xA7AA (ALDERLAKE_P)
[23:40:47] [PASSED] 0xA7AB (ALDERLAKE_P)
[23:40:47] [PASSED] 0xA780 (ALDERLAKE_S)
[23:40:47] [PASSED] 0xA781 (ALDERLAKE_S)
[23:40:47] [PASSED] 0xA782 (ALDERLAKE_S)
[23:40:47] [PASSED] 0xA783 (ALDERLAKE_S)
[23:40:47] [PASSED] 0xA788 (ALDERLAKE_S)
[23:40:47] [PASSED] 0xA789 (ALDERLAKE_S)
[23:40:47] [PASSED] 0xA78A (ALDERLAKE_S)
[23:40:47] [PASSED] 0xA78B (ALDERLAKE_S)
[23:40:47] [PASSED] 0x4905 (DG1)
[23:40:47] [PASSED] 0x4906 (DG1)
[23:40:47] [PASSED] 0x4907 (DG1)
[23:40:47] [PASSED] 0x4908 (DG1)
[23:40:47] [PASSED] 0x4909 (DG1)
[23:40:47] [PASSED] 0x56C0 (DG2)
[23:40:47] [PASSED] 0x56C2 (DG2)
[23:40:47] [PASSED] 0x56C1 (DG2)
[23:40:47] [PASSED] 0x7D51 (METEORLAKE)
[23:40:47] [PASSED] 0x7DD1 (METEORLAKE)
[23:40:47] [PASSED] 0x7D41 (METEORLAKE)
[23:40:47] [PASSED] 0x7D67 (METEORLAKE)
[23:40:47] [PASSED] 0xB640 (METEORLAKE)
[23:40:47] [PASSED] 0x56A0 (DG2)
[23:40:47] [PASSED] 0x56A1 (DG2)
[23:40:47] [PASSED] 0x56A2 (DG2)
[23:40:47] [PASSED] 0x56BE (DG2)
[23:40:47] [PASSED] 0x56BF (DG2)
[23:40:47] [PASSED] 0x5690 (DG2)
[23:40:47] [PASSED] 0x5691 (DG2)
[23:40:47] [PASSED] 0x5692 (DG2)
[23:40:47] [PASSED] 0x56A5 (DG2)
[23:40:47] [PASSED] 0x56A6 (DG2)
[23:40:47] [PASSED] 0x56B0 (DG2)
[23:40:47] [PASSED] 0x56B1 (DG2)
[23:40:47] [PASSED] 0x56BA (DG2)
[23:40:47] [PASSED] 0x56BB (DG2)
[23:40:47] [PASSED] 0x56BC (DG2)
[23:40:47] [PASSED] 0x56BD (DG2)
[23:40:47] [PASSED] 0x5693 (DG2)
[23:40:47] [PASSED] 0x5694 (DG2)
[23:40:47] [PASSED] 0x5695 (DG2)
[23:40:47] [PASSED] 0x56A3 (DG2)
[23:40:47] [PASSED] 0x56A4 (DG2)
[23:40:47] [PASSED] 0x56B2 (DG2)
[23:40:47] [PASSED] 0x56B3 (DG2)
[23:40:47] [PASSED] 0x5696 (DG2)
[23:40:47] [PASSED] 0x5697 (DG2)
[23:40:47] [PASSED] 0xB69 (PVC)
[23:40:47] [PASSED] 0xB6E (PVC)
[23:40:47] [PASSED] 0xBD4 (PVC)
[23:40:47] [PASSED] 0xBD5 (PVC)
[23:40:47] [PASSED] 0xBD6 (PVC)
[23:40:47] [PASSED] 0xBD7 (PVC)
[23:40:47] [PASSED] 0xBD8 (PVC)
[23:40:47] [PASSED] 0xBD9 (PVC)
[23:40:47] [PASSED] 0xBDA (PVC)
[23:40:47] [PASSED] 0xBDB (PVC)
[23:40:47] [PASSED] 0xBE0 (PVC)
[23:40:47] [PASSED] 0xBE1 (PVC)
[23:40:47] [PASSED] 0xBE5 (PVC)
[23:40:47] [PASSED] 0x7D40 (METEORLAKE)
[23:40:47] [PASSED] 0x7D45 (METEORLAKE)
[23:40:47] [PASSED] 0x7D55 (METEORLAKE)
[23:40:47] [PASSED] 0x7D60 (METEORLAKE)
[23:40:47] [PASSED] 0x7DD5 (METEORLAKE)
[23:40:47] [PASSED] 0x6420 (LUNARLAKE)
[23:40:47] [PASSED] 0x64A0 (LUNARLAKE)
[23:40:47] [PASSED] 0x64B0 (LUNARLAKE)
[23:40:47] [PASSED] 0xE202 (BATTLEMAGE)
[23:40:47] [PASSED] 0xE209 (BATTLEMAGE)
[23:40:47] [PASSED] 0xE20B (BATTLEMAGE)
[23:40:47] [PASSED] 0xE20C (BATTLEMAGE)
[23:40:47] [PASSED] 0xE20D (BATTLEMAGE)
[23:40:47] [PASSED] 0xE210 (BATTLEMAGE)
[23:40:47] [PASSED] 0xE211 (BATTLEMAGE)
[23:40:47] [PASSED] 0xE212 (BATTLEMAGE)
[23:40:47] [PASSED] 0xE216 (BATTLEMAGE)
[23:40:47] [PASSED] 0xE220 (BATTLEMAGE)
[23:40:47] [PASSED] 0xE221 (BATTLEMAGE)
[23:40:47] [PASSED] 0xE222 (BATTLEMAGE)
[23:40:47] [PASSED] 0xE223 (BATTLEMAGE)
[23:40:47] [PASSED] 0xB080 (PANTHERLAKE)
[23:40:47] [PASSED] 0xB081 (PANTHERLAKE)
[23:40:47] [PASSED] 0xB082 (PANTHERLAKE)
[23:40:47] [PASSED] 0xB083 (PANTHERLAKE)
[23:40:47] [PASSED] 0xB084 (PANTHERLAKE)
[23:40:47] [PASSED] 0xB085 (PANTHERLAKE)
[23:40:47] [PASSED] 0xB086 (PANTHERLAKE)
[23:40:47] [PASSED] 0xB087 (PANTHERLAKE)
[23:40:47] [PASSED] 0xB08F (PANTHERLAKE)
[23:40:47] [PASSED] 0xB090 (PANTHERLAKE)
[23:40:47] [PASSED] 0xB0A0 (PANTHERLAKE)
[23:40:47] [PASSED] 0xB0A1 (PANTHERLAKE)
[23:40:47] [PASSED] 0xB0B0 (PANTHERLAKE)
[23:40:47] [PASSED] 0xFD80 (PANTHERLAKE)
[23:40:47] [PASSED] 0xFD81 (PANTHERLAKE)
[23:40:47] [PASSED] 0xD740 (NOVALAKE_S)
[23:40:47] [PASSED] 0xD741 (NOVALAKE_S)
[23:40:47] [PASSED] 0xD742 (NOVALAKE_S)
[23:40:47] [PASSED] 0xD743 (NOVALAKE_S)
[23:40:47] [PASSED] 0xD745 (NOVALAKE_S)
[23:40:47] [PASSED] 0xD74A (NOVALAKE_S)
[23:40:47] [PASSED] 0xD74B (NOVALAKE_S)
[23:40:47] [PASSED] 0x674C (CRESCENTISLAND)
[23:40:47] [PASSED] 0x674D (CRESCENTISLAND)
[23:40:47] [PASSED] 0x674E (CRESCENTISLAND)
[23:40:47] [PASSED] 0x674F (CRESCENTISLAND)
[23:40:47] [PASSED] 0x6750 (CRESCENTISLAND)
[23:40:47] [PASSED] 0x6751 (CRESCENTISLAND)
[23:40:47] [PASSED] 0xD750 (NOVALAKE_P)
[23:40:47] [PASSED] 0xD751 (NOVALAKE_P)
[23:40:47] [PASSED] 0xD752 (NOVALAKE_P)
[23:40:47] [PASSED] 0xD753 (NOVALAKE_P)
[23:40:47] [PASSED] 0xD754 (NOVALAKE_P)
[23:40:47] [PASSED] 0xD755 (NOVALAKE_P)
[23:40:47] [PASSED] 0xD756 (NOVALAKE_P)
[23:40:47] [PASSED] 0xD757 (NOVALAKE_P)
[23:40:47] [PASSED] 0xD75F (NOVALAKE_P)
[23:40:47] =============== [PASSED] check_platform_desc ===============
[23:40:47] ===================== [PASSED] xe_pci ======================
[23:40:47] ============= xe_rtp_tables_test (5 subtests) ==============
[23:40:47] ================== xe_rtp_table_gt_test  ===================
[23:40:47] [PASSED] gt_was/14011060649
[23:40:47] [PASSED] gt_was/14011059788
[23:40:47] [PASSED] gt_was/14015795083
[23:40:47] [PASSED] gt_was/16021867713
[23:40:47] [PASSED] gt_was/14019449301
[23:40:47] [PASSED] gt_was/16028005424
[23:40:47] [PASSED] gt_was/14026578760
[23:40:47] [PASSED] gt_was/1409420604
[23:40:47] [PASSED] gt_was/1408615072
[23:40:47] [PASSED] gt_was/22010523718
[23:40:47] [PASSED] gt_was/14011006942
[23:40:47] [PASSED] gt_was/14014830051
[23:40:47] [PASSED] gt_was/18018781329
[23:40:47] [PASSED] gt_was/1509235366
[23:40:47] [PASSED] gt_was/18018781329
[23:40:47] [PASSED] gt_was/16016694945
[23:40:47] [PASSED] gt_was/14018575942
[23:40:47] [PASSED] gt_was/22016670082
[23:40:47] [PASSED] gt_was/22016670082
[23:40:47] [PASSED] gt_was/14017421178
[23:40:47] [PASSED] gt_was/16025250150
[23:40:47] [PASSED] gt_was/14021871409
[23:40:47] [PASSED] gt_was/16021865536
[23:40:47] [PASSED] gt_was/14021486841
[23:40:47] [PASSED] gt_was/14025160223
[23:40:47] [PASSED] gt_was/14026144927, 16029437861, 14026127056
[23:40:47] [PASSED] gt_was/14025635424
[23:40:47] [PASSED] gt_was/16028005424
[23:40:47] ============== [PASSED] xe_rtp_table_gt_test ===============
[23:40:47] ================== xe_rtp_table_gt_test  ===================
[23:40:47] [PASSED] gt_tunings/Tuning: Blend Fill Caching Optimization Disable
[23:40:47] [PASSED] gt_tunings/Tuning: 32B Access Enable
[23:40:47] [PASSED] gt_tunings/Tuning: L3 cache
[23:40:47] [PASSED] gt_tunings/Tuning: L3 cache - media
[23:40:47] [PASSED] gt_tunings/Tuning: Compression Overfetch
[23:40:47] [PASSED] gt_tunings/Tuning: Compression Overfetch - media
[23:40:47] [PASSED] gt_tunings/Tuning: Enable compressible partial write overfetch in L3
[23:40:47] [PASSED] gt_tunings/Tuning: Enable compressible partial write overfetch in L3 - media
[23:40:47] [PASSED] gt_tunings/Tuning: L2 Overfetch Compressible Only
[23:40:47] [PASSED] gt_tunings/Tuning: L2 Overfetch Compressible Only - media
[23:40:47] [PASSED] gt_tunings/Tuning: Stateless compression control
[23:40:47] [PASSED] gt_tunings/Tuning: Stateless compression control - media
[23:40:47] [PASSED] gt_tunings/Tuning: L3 RW flush all Cache
[23:40:47] [PASSED] gt_tunings/Tuning: L3 RW flush all cache - media
[23:40:47] [PASSED] gt_tunings/Tuning: Set STLB Bank Hash Mode to 4KB
[23:40:47] [PASSED] gt_tunings/Tuning: Force All Non-Compressible Memory Reads to be 256B Overfetches
[23:40:47] ============== [PASSED] xe_rtp_table_gt_test ===============
[23:40:47] ================== xe_rtp_table_oob_test  ==================
[23:40:47] [PASSED] oob_was/1607983814
[23:40:47] [PASSED] oob_was/16010904313
[23:40:47] [PASSED] oob_was/18022495364
[23:40:47] [PASSED] oob_was/22012773006
[23:40:47] [PASSED] oob_was/14014475959
[23:40:47] [PASSED] oob_was/22011391025
[23:40:47] [PASSED] oob_was/22012727170
[23:40:47] [PASSED] oob_was/22012727685
[23:40:47] [PASSED] oob_was/22016596838
[23:40:47] [PASSED] oob_was/18020744125
[23:40:47] [PASSED] oob_was/1409600907
[23:40:47] [PASSED] oob_was/22014953428
[23:40:47] [PASSED] oob_was/16017236439
[23:40:47] [PASSED] oob_was/14019821291
[23:40:47] [PASSED] oob_was/14015076503
[23:40:47] [PASSED] oob_was/22016122933
[23:40:47] [PASSED] oob_was/14018913170
[23:40:47] [PASSED] oob_was/14018094691
[23:40:47] [PASSED] oob_was/18024947630
[23:40:47] [PASSED] oob_was/16022287689
[23:40:47] [PASSED] oob_was/13011645652
[23:40:47] [PASSED] oob_was/14022293748
[23:40:47] [PASSED] oob_was/22019794406
[23:40:47] [PASSED] oob_was/22019338487
[23:40:47] [PASSED] oob_was/16023588340
[23:40:47] [PASSED] oob_was/14019789679
[23:40:47] [PASSED] oob_was/14022866841
[23:40:47] [PASSED] oob_was/16021333562
[23:40:47] [PASSED] oob_was/14016712196
[23:40:47] [PASSED] oob_was/14015568240
[23:40:47] [PASSED] oob_was/18013179988
[23:40:47] [PASSED] oob_was/1508761755
[23:40:47] [PASSED] oob_was/16023105232
[23:40:47] [PASSED] oob_was/16026508708
[23:40:47] [PASSED] oob_was/14020001231
[23:40:47] [PASSED] oob_was/16023683509
[23:40:47] [PASSED] oob_was/14025515070
[23:40:47] [PASSED] oob_was/15015404425_disable
[23:40:47] [PASSED] oob_was/16026007364
[23:40:47] [PASSED] oob_was/14020316580
[23:40:47] [PASSED] oob_was/14025883347
[23:40:47] [PASSED] oob_was/16029380221
[23:40:47] [PASSED] oob_was/22022079272
[23:40:47] [PASSED] oob_was/16029897822
[23:40:47] [PASSED] oob_was/14026539277
[23:40:47] [PASSED] oob_was/14027054324
[23:40:47] [PASSED] oob_was/14025941587
[23:40:47] [PASSED] oob_was/16030224309
[23:40:47] ============== [PASSED] xe_rtp_table_oob_test ==============
[23:40:47] ================ xe_rtp_table_dev_oob_test  ================
[23:40:47] [PASSED] device_oob_was/22010954014
[23:40:47] [PASSED] device_oob_was/15015404425
[23:40:47] [PASSED] device_oob_was/22019338487_display
[23:40:47] [PASSED] device_oob_was/14022085890
[23:40:47] [PASSED] device_oob_was/14026633728
[23:40:47] [PASSED] device_oob_was/14026746987
[23:40:47] [PASSED] device_oob_was/14026779378
[23:40:47] ============ [PASSED] xe_rtp_table_dev_oob_test ============
[23:40:47] ========== xe_rtp_table_missing_upper_bound_test  ==========
[23:40:47] [PASSED] register_whitelist/WaAllowPMDepthAndInvocationCountAccessFromUMD, 1408556865
[23:40:47] [PASSED] register_whitelist/1508744258, 14012131227, 1808121037
[23:40:47] [PASSED] register_whitelist/1806527549
[23:40:47] [PASSED] register_whitelist/allow_read_ctx_timestamp
[23:40:47] [PASSED] register_whitelist/allow_read_queue_timestamp
[23:40:47] [PASSED] register_whitelist/16014440446
[23:40:47] [PASSED] register_whitelist/16017236439
[23:40:47] [PASSED] register_whitelist/16020183090
[23:40:47] [PASSED] register_whitelist/14024997852
[23:40:47] [PASSED] register_whitelist/14024997852
[23:40:47] ====== [PASSED] xe_rtp_table_missing_upper_bound_test ======
[23:40:47] =============== [PASSED] xe_rtp_tables_test ================
[23:40:47] =================== xe_rtp (3 subtests) ====================
[23:40:47] =================== xe_rtp_rules_tests  ====================
[23:40:47] [PASSED] no
[23:40:47] [PASSED] yes
[23:40:47] [PASSED] no-and-no
[23:40:47] [PASSED] no-and-yes
[23:40:47] [PASSED] yes-and-no
[23:40:47] [PASSED] yes-and-yes
[23:40:47] [PASSED] no-or-no
[23:40:47] [PASSED] no-or-yes
[23:40:47] [PASSED] yes-or-no
[23:40:47] [PASSED] yes-or-yes
[23:40:47] [PASSED] no-yes-or-yes-no
[23:40:47] [PASSED] no-yes-or-yes-yes
[23:40:47] [PASSED] yes-yes-or-no-yes
[23:40:47] [PASSED] yes-yes-or-yes-yes
[23:40:47] [PASSED] no-no-or-yes-or-no
[23:40:47] [PASSED] or
[23:40:47] [PASSED] or-yes
[23:40:47] [PASSED] or-no
[23:40:47] [PASSED] yes-or
[23:40:47] [PASSED] no-or
[23:40:47] [PASSED] no-or-or-yes
[23:40:47] [PASSED] yes-or-or-no
[23:40:47] [PASSED] no-or-or-no
[23:40:47] [PASSED] missing-context-engine-class
[23:40:47] [PASSED] missing-context-engine-class-or-yes
[23:40:47] [PASSED] missing-context-engine-class-or-or-yes
[23:40:47] =============== [PASSED] xe_rtp_rules_tests ================
[23:40:47] =============== xe_rtp_process_to_sr_tests  ================
[23:40:47] [PASSED] coalesce-same-reg
[23:40:47] [PASSED] coalesce-same-reg-literal-and-func
[23:40:47] [PASSED] no-match-no-add
[23:40:47] [PASSED] two-regs-two-entries
[23:40:47] [PASSED] clr-one-set-other
[23:40:47] [PASSED] set-field
[23:40:47] [PASSED] conflict-duplicate
[23:40:47] [PASSED] conflict-not-disjoint
[23:40:47] [PASSED] conflict-not-disjoint-literal-and-func
[23:40:47] [PASSED] conflict-reg-type
[23:40:47] [PASSED] bad-mcr-reg-forced-to-regular
[23:40:47] [PASSED] bad-regular-reg-forced-to-mcr
[23:40:47] =========== [PASSED] xe_rtp_process_to_sr_tests ============
[23:40:47] ================== xe_rtp_process_tests  ===================
[23:40:47] [PASSED] active1
[23:40:47] [PASSED] active2
[23:40:47] [PASSED] active-inactive
[23:40:47] [PASSED] inactive-active
[23:40:47] [PASSED] inactive-active-inactive
[23:40:47] [PASSED] inactive-inactive-inactive
[23:40:47] ============== [PASSED] xe_rtp_process_tests ===============
[23:40:47] ===================== [PASSED] xe_rtp ======================
[23:40:47] ==================== xe_wa (1 subtest) =====================
[23:40:47] ======================== xe_wa_gt  =========================
[23:40:47] [PASSED] TIGERLAKE B0
[23:40:47] [PASSED] DG1 A0
[23:40:47] [PASSED] DG1 B0
[23:40:47] [PASSED] ALDERLAKE_S A0
[23:40:47] [PASSED] ALDERLAKE_S B0
[23:40:47] [PASSED] ALDERLAKE_S C0
[23:40:47] [PASSED] ALDERLAKE_S D0
[23:40:47] [PASSED] ALDERLAKE_P A0
[23:40:47] [PASSED] ALDERLAKE_P B0
[23:40:47] [PASSED] ALDERLAKE_P C0
[23:40:47] [PASSED] ALDERLAKE_S RPLS D0
[23:40:47] [PASSED] ALDERLAKE_P RPLU E0
[23:40:47] [PASSED] DG2 G10 C0
[23:40:47] [PASSED] DG2 G11 B1
[23:40:47] [PASSED] DG2 G12 A1
[23:40:47] [PASSED] METEORLAKE 12.70(Xe_LPG) A0 13.00(Xe_LPM+) A0
[23:40:47] [PASSED] METEORLAKE 12.71(Xe_LPG) A0 13.00(Xe_LPM+) A0
[23:40:47] [PASSED] METEORLAKE 12.74(Xe_LPG+) A0 13.00(Xe_LPM+) A0
[23:40:47] [PASSED] LUNARLAKE 20.04(Xe2_LPG) A0 20.00(Xe2_LPM) A0
[23:40:47] [PASSED] LUNARLAKE 20.04(Xe2_LPG) B0 20.00(Xe2_LPM) A0
[23:40:47] [PASSED] BATTLEMAGE 20.01(Xe2_HPG) A0 13.01(Xe2_HPM) A1
[23:40:47] [PASSED] PANTHERLAKE 30.00(Xe3_LPG) A0 30.00(Xe3_LPM) A0
[23:40:47] ==================== [PASSED] xe_wa_gt =====================
[23:40:47] ====================== [PASSED] xe_wa ======================
[23:40:47] ============================================================
[23:40:47] Testing complete. Ran 838 tests: passed: 809, skipped: 29
[23:40:47] Elapsed time: 41.268s total, 1.909s configuring, 38.593s building, 0.715s 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 [23:40:47] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[23:40:49] 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
[23:41:14] Starting KUnit Kernel (1/1)...
[23:41:14] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[23:41:14] ============ drm_test_pick_cmdline (2 subtests) ============
[23:41:14] [PASSED] drm_test_pick_cmdline_res_1920_1080_60
[23:41:14] =============== drm_test_pick_cmdline_named  ===============
[23:41:14] [PASSED] NTSC
[23:41:14] [PASSED] NTSC-J
[23:41:14] [PASSED] PAL
[23:41:14] [PASSED] PAL-M
[23:41:14] =========== [PASSED] drm_test_pick_cmdline_named ===========
[23:41:14] ============== [PASSED] drm_test_pick_cmdline ==============
[23:41:14] == drm_test_atomic_get_connector_for_encoder (1 subtest) ===
[23:41:14] [PASSED] drm_test_drm_atomic_get_connector_for_encoder
[23:41:14] ==== [PASSED] drm_test_atomic_get_connector_for_encoder ====
[23:41:14] =========== drm_validate_clone_mode (2 subtests) ===========
[23:41:14] ============== drm_test_check_in_clone_mode  ===============
[23:41:14] [PASSED] in_clone_mode
[23:41:14] [PASSED] not_in_clone_mode
[23:41:14] ========== [PASSED] drm_test_check_in_clone_mode ===========
[23:41:14] =============== drm_test_check_valid_clones  ===============
[23:41:14] [PASSED] not_in_clone_mode
[23:41:14] [PASSED] valid_clone
[23:41:14] [PASSED] invalid_clone
[23:41:14] =========== [PASSED] drm_test_check_valid_clones ===========
[23:41:14] ============= [PASSED] drm_validate_clone_mode =============
[23:41:14] ============= drm_validate_modeset (1 subtest) =============
[23:41:14] [PASSED] drm_test_check_connector_changed_modeset
[23:41:14] ============== [PASSED] drm_validate_modeset ===============
[23:41:14] ====== drm_test_bridge_get_current_state (1 subtest) =======
[23:41:14] [PASSED] drm_test_drm_bridge_get_current_state_atomic
[23:41:14] ======== [PASSED] drm_test_bridge_get_current_state ========
[23:41:14] ====== drm_test_bridge_helper_reset_crtc (3 subtests) ======
[23:41:14] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic
[23:41:14] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic_disabled
[23:41:14] [PASSED] drm_test_drm_bridge_helper_hdmi_output_bus_fmts
[23:41:14] ======== [PASSED] drm_test_bridge_helper_reset_crtc ========
[23:41:14] ============== drm_bridge_alloc (2 subtests) ===============
[23:41:14] [PASSED] drm_test_drm_bridge_alloc_basic
[23:41:14] [PASSED] drm_test_drm_bridge_alloc_get_put
[23:41:14] ================ [PASSED] drm_bridge_alloc =================
[23:41:14] ============= drm_bridge_bus_fmt (5 subtests) ==============
[23:41:14] [PASSED] drm_test_bridge_rgb_yuv_rgb
[23:41:14] [PASSED] drm_test_bridge_must_convert_to_yuv444
[23:41:14] [PASSED] drm_test_bridge_hdmi_auto_rgb
[23:41:14] [PASSED] drm_test_bridge_auto_first
[23:41:14] [PASSED] drm_test_bridge_rgb_yuv_no_path
[23:41:14] =============== [PASSED] drm_bridge_bus_fmt ================
[23:41:14] ============= drm_cmdline_parser (40 subtests) =============
[23:41:14] [PASSED] drm_test_cmdline_force_d_only
[23:41:14] [PASSED] drm_test_cmdline_force_D_only_dvi
[23:41:14] [PASSED] drm_test_cmdline_force_D_only_hdmi
[23:41:14] [PASSED] drm_test_cmdline_force_D_only_not_digital
[23:41:14] [PASSED] drm_test_cmdline_force_e_only
[23:41:14] [PASSED] drm_test_cmdline_res
[23:41:14] [PASSED] drm_test_cmdline_res_vesa
[23:41:14] [PASSED] drm_test_cmdline_res_vesa_rblank
[23:41:14] [PASSED] drm_test_cmdline_res_rblank
[23:41:14] [PASSED] drm_test_cmdline_res_bpp
[23:41:14] [PASSED] drm_test_cmdline_res_refresh
[23:41:14] [PASSED] drm_test_cmdline_res_bpp_refresh
[23:41:14] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced
[23:41:14] [PASSED] drm_test_cmdline_res_bpp_refresh_margins
[23:41:14] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off
[23:41:14] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on
[23:41:14] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog
[23:41:14] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital
[23:41:14] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on
[23:41:14] [PASSED] drm_test_cmdline_res_margins_force_on
[23:41:14] [PASSED] drm_test_cmdline_res_vesa_margins
[23:41:14] [PASSED] drm_test_cmdline_name
[23:41:14] [PASSED] drm_test_cmdline_name_bpp
[23:41:14] [PASSED] drm_test_cmdline_name_option
[23:41:14] [PASSED] drm_test_cmdline_name_bpp_option
[23:41:14] [PASSED] drm_test_cmdline_rotate_0
[23:41:14] [PASSED] drm_test_cmdline_rotate_90
[23:41:14] [PASSED] drm_test_cmdline_rotate_180
[23:41:14] [PASSED] drm_test_cmdline_rotate_270
[23:41:14] [PASSED] drm_test_cmdline_hmirror
[23:41:14] [PASSED] drm_test_cmdline_vmirror
[23:41:14] [PASSED] drm_test_cmdline_margin_options
[23:41:14] [PASSED] drm_test_cmdline_multiple_options
[23:41:14] [PASSED] drm_test_cmdline_bpp_extra_and_option
[23:41:14] [PASSED] drm_test_cmdline_extra_and_option
[23:41:14] [PASSED] drm_test_cmdline_freestanding_options
[23:41:14] [PASSED] drm_test_cmdline_freestanding_force_e_and_options
[23:41:14] [PASSED] drm_test_cmdline_panel_orientation
[23:41:14] ================ drm_test_cmdline_invalid  =================
[23:41:14] [PASSED] margin_only
[23:41:14] [PASSED] interlace_only
[23:41:14] [PASSED] res_missing_x
[23:41:14] [PASSED] res_missing_y
[23:41:14] [PASSED] res_bad_y
[23:41:14] [PASSED] res_missing_y_bpp
[23:41:14] [PASSED] res_bad_bpp
[23:41:14] [PASSED] res_bad_refresh
[23:41:14] [PASSED] res_bpp_refresh_force_on_off
[23:41:14] [PASSED] res_invalid_mode
[23:41:14] [PASSED] res_bpp_wrong_place_mode
[23:41:14] [PASSED] name_bpp_refresh
[23:41:14] [PASSED] name_refresh
[23:41:14] [PASSED] name_refresh_wrong_mode
[23:41:14] [PASSED] name_refresh_invalid_mode
[23:41:14] [PASSED] rotate_multiple
[23:41:14] [PASSED] rotate_invalid_val
[23:41:14] [PASSED] rotate_truncated
[23:41:14] [PASSED] invalid_option
[23:41:14] [PASSED] invalid_tv_option
[23:41:14] [PASSED] truncated_tv_option
[23:41:14] ============ [PASSED] drm_test_cmdline_invalid =============
[23:41:14] =============== drm_test_cmdline_tv_options  ===============
[23:41:14] [PASSED] NTSC
[23:41:14] [PASSED] NTSC_443
[23:41:14] [PASSED] NTSC_J
[23:41:14] [PASSED] PAL
[23:41:14] [PASSED] PAL_M
[23:41:14] [PASSED] PAL_N
[23:41:14] [PASSED] SECAM
[23:41:14] [PASSED] MONO_525
[23:41:14] [PASSED] MONO_625
[23:41:14] =========== [PASSED] drm_test_cmdline_tv_options ===========
[23:41:14] =============== [PASSED] drm_cmdline_parser ================
[23:41:14] ========== drmm_connector_hdmi_init (20 subtests) ==========
[23:41:14] [PASSED] drm_test_connector_hdmi_init_valid
[23:41:14] [PASSED] drm_test_connector_hdmi_init_bpc_8
[23:41:14] [PASSED] drm_test_connector_hdmi_init_bpc_10
[23:41:14] [PASSED] drm_test_connector_hdmi_init_bpc_12
[23:41:14] [PASSED] drm_test_connector_hdmi_init_bpc_invalid
[23:41:14] [PASSED] drm_test_connector_hdmi_init_bpc_null
[23:41:14] [PASSED] drm_test_connector_hdmi_init_formats_empty
[23:41:14] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb
[23:41:14] === drm_test_connector_hdmi_init_formats_yuv420_allowed  ===
[23:41:14] [PASSED] supported_formats=0x9 yuv420_allowed=1
[23:41:14] [PASSED] supported_formats=0x9 yuv420_allowed=0
[23:41:14] [PASSED] supported_formats=0x5 yuv420_allowed=1
[23:41:14] [PASSED] supported_formats=0x5 yuv420_allowed=0
[23:41:14] === [PASSED] drm_test_connector_hdmi_init_formats_yuv420_allowed ===
[23:41:14] [PASSED] drm_test_connector_hdmi_init_null_ddc
[23:41:14] [PASSED] drm_test_connector_hdmi_init_null_product
[23:41:14] [PASSED] drm_test_connector_hdmi_init_null_vendor
[23:41:14] [PASSED] drm_test_connector_hdmi_init_product_length_exact
[23:41:14] [PASSED] drm_test_connector_hdmi_init_product_length_too_long
[23:41:14] [PASSED] drm_test_connector_hdmi_init_product_valid
[23:41:14] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact
[23:41:14] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long
[23:41:14] [PASSED] drm_test_connector_hdmi_init_vendor_valid
[23:41:14] ========= drm_test_connector_hdmi_init_type_valid  =========
[23:41:14] [PASSED] HDMI-A
[23:41:14] [PASSED] HDMI-B
[23:41:14] ===== [PASSED] drm_test_connector_hdmi_init_type_valid =====
[23:41:14] ======== drm_test_connector_hdmi_init_type_invalid  ========
[23:41:14] [PASSED] Unknown
[23:41:14] [PASSED] VGA
[23:41:14] [PASSED] DVI-I
[23:41:14] [PASSED] DVI-D
[23:41:14] [PASSED] DVI-A
[23:41:14] [PASSED] Composite
[23:41:14] [PASSED] SVIDEO
[23:41:14] [PASSED] LVDS
[23:41:14] [PASSED] Component
[23:41:14] [PASSED] DIN
[23:41:14] [PASSED] DP
[23:41:14] [PASSED] TV
[23:41:14] [PASSED] eDP
[23:41:14] [PASSED] Virtual
[23:41:14] [PASSED] DSI
[23:41:14] [PASSED] DPI
[23:41:14] [PASSED] Writeback
[23:41:14] [PASSED] SPI
[23:41:14] [PASSED] USB
[23:41:14] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ====
[23:41:14] ============ [PASSED] drmm_connector_hdmi_init =============
[23:41:14] ============= drmm_connector_init (3 subtests) =============
[23:41:14] [PASSED] drm_test_drmm_connector_init
[23:41:14] [PASSED] drm_test_drmm_connector_init_null_ddc
[23:41:14] ========= drm_test_drmm_connector_init_type_valid  =========
[23:41:14] [PASSED] Unknown
[23:41:14] [PASSED] VGA
[23:41:14] [PASSED] DVI-I
[23:41:14] [PASSED] DVI-D
[23:41:14] [PASSED] DVI-A
[23:41:14] [PASSED] Composite
[23:41:14] [PASSED] SVIDEO
[23:41:14] [PASSED] LVDS
[23:41:14] [PASSED] Component
[23:41:14] [PASSED] DIN
[23:41:14] [PASSED] DP
[23:41:14] [PASSED] HDMI-A
[23:41:14] [PASSED] HDMI-B
[23:41:14] [PASSED] TV
[23:41:14] [PASSED] eDP
[23:41:14] [PASSED] Virtual
[23:41:14] [PASSED] DSI
[23:41:14] [PASSED] DPI
[23:41:14] [PASSED] Writeback
[23:41:14] [PASSED] SPI
[23:41:14] [PASSED] USB
[23:41:14] ===== [PASSED] drm_test_drmm_connector_init_type_valid =====
[23:41:14] =============== [PASSED] drmm_connector_init ===============
[23:41:14] ========= drm_connector_dynamic_init (6 subtests) ==========
[23:41:14] [PASSED] drm_test_drm_connector_dynamic_init
[23:41:14] [PASSED] drm_test_drm_connector_dynamic_init_null_ddc
[23:41:14] [PASSED] drm_test_drm_connector_dynamic_init_not_added
[23:41:14] [PASSED] drm_test_drm_connector_dynamic_init_properties
[23:41:14] ===== drm_test_drm_connector_dynamic_init_type_valid  ======
[23:41:14] [PASSED] Unknown
[23:41:14] [PASSED] VGA
[23:41:14] [PASSED] DVI-I
[23:41:14] [PASSED] DVI-D
[23:41:14] [PASSED] DVI-A
[23:41:14] [PASSED] Composite
[23:41:14] [PASSED] SVIDEO
[23:41:14] [PASSED] LVDS
[23:41:14] [PASSED] Component
[23:41:14] [PASSED] DIN
[23:41:14] [PASSED] DP
[23:41:14] [PASSED] HDMI-A
[23:41:14] [PASSED] HDMI-B
[23:41:14] [PASSED] TV
[23:41:14] [PASSED] eDP
[23:41:14] [PASSED] Virtual
[23:41:14] [PASSED] DSI
[23:41:14] [PASSED] DPI
[23:41:14] [PASSED] Writeback
[23:41:14] [PASSED] SPI
[23:41:14] [PASSED] USB
[23:41:14] = [PASSED] drm_test_drm_connector_dynamic_init_type_valid ==
[23:41:14] ======== drm_test_drm_connector_dynamic_init_name  =========
[23:41:14] [PASSED] Unknown
[23:41:14] [PASSED] VGA
[23:41:14] [PASSED] DVI-I
[23:41:14] [PASSED] DVI-D
[23:41:14] [PASSED] DVI-A
[23:41:14] [PASSED] Composite
[23:41:14] [PASSED] SVIDEO
[23:41:14] [PASSED] LVDS
[23:41:14] [PASSED] Component
[23:41:14] [PASSED] DIN
[23:41:14] [PASSED] DP
[23:41:14] [PASSED] HDMI-A
[23:41:14] [PASSED] HDMI-B
[23:41:14] [PASSED] TV
[23:41:14] [PASSED] eDP
[23:41:14] [PASSED] Virtual
[23:41:14] [PASSED] DSI
[23:41:14] [PASSED] DPI
[23:41:14] [PASSED] Writeback
[23:41:14] [PASSED] SPI
[23:41:14] [PASSED] USB
[23:41:14] ==== [PASSED] drm_test_drm_connector_dynamic_init_name =====
[23:41:14] =========== [PASSED] drm_connector_dynamic_init ============
[23:41:14] ==== drm_connector_dynamic_register_early (4 subtests) =====
[23:41:14] [PASSED] drm_test_drm_connector_dynamic_register_early_on_list
[23:41:14] [PASSED] drm_test_drm_connector_dynamic_register_early_defer
[23:41:14] [PASSED] drm_test_drm_connector_dynamic_register_early_no_init
[23:41:14] [PASSED] drm_test_drm_connector_dynamic_register_early_no_mode_object
[23:41:14] ====== [PASSED] drm_connector_dynamic_register_early =======
[23:41:14] ======= drm_connector_dynamic_register (7 subtests) ========
[23:41:14] [PASSED] drm_test_drm_connector_dynamic_register_on_list
[23:41:14] [PASSED] drm_test_drm_connector_dynamic_register_no_defer
[23:41:14] [PASSED] drm_test_drm_connector_dynamic_register_no_init
[23:41:14] [PASSED] drm_test_drm_connector_dynamic_register_mode_object
[23:41:14] [PASSED] drm_test_drm_connector_dynamic_register_sysfs
[23:41:14] [PASSED] drm_test_drm_connector_dynamic_register_sysfs_name
[23:41:14] [PASSED] drm_test_drm_connector_dynamic_register_debugfs
[23:41:14] ========= [PASSED] drm_connector_dynamic_register ==========
[23:41:14] = drm_connector_attach_broadcast_rgb_property (2 subtests) =
[23:41:14] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property
[23:41:14] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector
[23:41:14] === [PASSED] drm_connector_attach_broadcast_rgb_property ===
[23:41:14] ========== drm_get_tv_mode_from_name (2 subtests) ==========
[23:41:14] ========== drm_test_get_tv_mode_from_name_valid  ===========
[23:41:14] [PASSED] NTSC
[23:41:14] [PASSED] NTSC-443
[23:41:14] [PASSED] NTSC-J
[23:41:14] [PASSED] PAL
[23:41:14] [PASSED] PAL-M
[23:41:14] [PASSED] PAL-N
[23:41:14] [PASSED] SECAM
[23:41:14] [PASSED] Mono
[23:41:14] ====== [PASSED] drm_test_get_tv_mode_from_name_valid =======
[23:41:14] [PASSED] drm_test_get_tv_mode_from_name_truncated
[23:41:14] ============ [PASSED] drm_get_tv_mode_from_name ============
[23:41:14] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) =
[23:41:14] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb
[23:41:14] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc
[23:41:14] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1
[23:41:14] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc
[23:41:14] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1
[23:41:14] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double
[23:41:14] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid  =
[23:41:14] [PASSED] VIC 96
[23:41:14] [PASSED] VIC 97
[23:41:14] [PASSED] VIC 101
[23:41:14] [PASSED] VIC 102
[23:41:14] [PASSED] VIC 106
[23:41:14] [PASSED] VIC 107
[23:41:14] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid ===
[23:41:14] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc
[23:41:14] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc
[23:41:14] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc
[23:41:14] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc
[23:41:14] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc
[23:41:14] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ====
[23:41:14] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) ==
[23:41:14] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name  ====
[23:41:14] [PASSED] Automatic
[23:41:14] [PASSED] Full
[23:41:14] [PASSED] Limited 16:235
[23:41:14] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name ===
[23:41:14] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid
[23:41:14] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ====
[23:41:14] == drm_hdmi_connector_get_output_format_name (2 subtests) ==
[23:41:14] === drm_test_drm_hdmi_connector_get_output_format_name  ====
[23:41:14] [PASSED] RGB
[23:41:14] [PASSED] YUV 4:2:0
[23:41:14] [PASSED] YUV 4:2:2
[23:41:14] [PASSED] YUV 4:4:4
[23:41:14] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name ===
[23:41:14] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid
[23:41:14] ==== [PASSED] drm_hdmi_connector_get_output_format_name ====
[23:41:14] ============= drm_damage_helper (21 subtests) ==============
[23:41:14] [PASSED] drm_test_damage_iter_no_damage
[23:41:14] [PASSED] drm_test_damage_iter_no_damage_fractional_src
[23:41:14] [PASSED] drm_test_damage_iter_no_damage_src_moved
[23:41:14] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved
[23:41:14] [PASSED] drm_test_damage_iter_no_damage_not_visible
[23:41:14] [PASSED] drm_test_damage_iter_no_damage_no_crtc
[23:41:14] [PASSED] drm_test_damage_iter_no_damage_no_fb
[23:41:14] [PASSED] drm_test_damage_iter_simple_damage
[23:41:14] [PASSED] drm_test_damage_iter_single_damage
[23:41:14] [PASSED] drm_test_damage_iter_single_damage_intersect_src
[23:41:14] [PASSED] drm_test_damage_iter_single_damage_outside_src
[23:41:14] [PASSED] drm_test_damage_iter_single_damage_fractional_src
[23:41:14] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src
[23:41:14] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src
[23:41:14] [PASSED] drm_test_damage_iter_single_damage_src_moved
[23:41:14] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved
[23:41:14] [PASSED] drm_test_damage_iter_damage
[23:41:14] [PASSED] drm_test_damage_iter_damage_one_intersect
[23:41:14] [PASSED] drm_test_damage_iter_damage_one_outside
[23:41:14] [PASSED] drm_test_damage_iter_damage_src_moved
[23:41:14] [PASSED] drm_test_damage_iter_damage_not_visible
[23:41:14] ================ [PASSED] drm_damage_helper ================
[23:41:14] ============== drm_dp_mst_helper (3 subtests) ==============
[23:41:14] ============== drm_test_dp_mst_calc_pbn_mode  ==============
[23:41:14] [PASSED] Clock 154000 BPP 30 DSC disabled
[23:41:14] [PASSED] Clock 234000 BPP 30 DSC disabled
[23:41:14] [PASSED] Clock 297000 BPP 24 DSC disabled
[23:41:14] [PASSED] Clock 332880 BPP 24 DSC enabled
[23:41:14] [PASSED] Clock 324540 BPP 24 DSC enabled
[23:41:14] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ==========
[23:41:14] ============== drm_test_dp_mst_calc_pbn_div  ===============
[23:41:14] [PASSED] Link rate 2000000 lane count 4
[23:41:14] [PASSED] Link rate 2000000 lane count 2
[23:41:14] [PASSED] Link rate 2000000 lane count 1
[23:41:14] [PASSED] Link rate 1350000 lane count 4
[23:41:14] [PASSED] Link rate 1350000 lane count 2
[23:41:14] [PASSED] Link rate 1350000 lane count 1
[23:41:14] [PASSED] Link rate 1000000 lane count 4
[23:41:14] [PASSED] Link rate 1000000 lane count 2
[23:41:14] [PASSED] Link rate 1000000 lane count 1
[23:41:14] [PASSED] Link rate 810000 lane count 4
[23:41:14] [PASSED] Link rate 810000 lane count 2
[23:41:14] [PASSED] Link rate 810000 lane count 1
[23:41:14] [PASSED] Link rate 540000 lane count 4
[23:41:14] [PASSED] Link rate 540000 lane count 2
[23:41:14] [PASSED] Link rate 540000 lane count 1
[23:41:14] [PASSED] Link rate 270000 lane count 4
[23:41:14] [PASSED] Link rate 270000 lane count 2
[23:41:14] [PASSED] Link rate 270000 lane count 1
[23:41:14] [PASSED] Link rate 162000 lane count 4
[23:41:14] [PASSED] Link rate 162000 lane count 2
[23:41:14] [PASSED] Link rate 162000 lane count 1
[23:41:14] ========== [PASSED] drm_test_dp_mst_calc_pbn_div ===========
[23:41:14] ========= drm_test_dp_mst_sideband_msg_req_decode  =========
[23:41:14] [PASSED] DP_ENUM_PATH_RESOURCES with port number
[23:41:14] [PASSED] DP_POWER_UP_PHY with port number
[23:41:14] [PASSED] DP_POWER_DOWN_PHY with port number
[23:41:14] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks
[23:41:14] [PASSED] DP_ALLOCATE_PAYLOAD with port number
[23:41:14] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI
[23:41:14] [PASSED] DP_ALLOCATE_PAYLOAD with PBN
[23:41:14] [PASSED] DP_QUERY_PAYLOAD with port number
[23:41:14] [PASSED] DP_QUERY_PAYLOAD with VCPI
[23:41:14] [PASSED] DP_REMOTE_DPCD_READ with port number
[23:41:14] [PASSED] DP_REMOTE_DPCD_READ with DPCD address
[23:41:14] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes
[23:41:14] [PASSED] DP_REMOTE_DPCD_WRITE with port number
[23:41:14] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address
[23:41:14] [PASSED] DP_REMOTE_DPCD_WRITE with data array
[23:41:14] [PASSED] DP_REMOTE_I2C_READ with port number
[23:41:14] [PASSED] DP_REMOTE_I2C_READ with I2C device ID
[23:41:14] [PASSED] DP_REMOTE_I2C_READ with transactions array
[23:41:14] [PASSED] DP_REMOTE_I2C_WRITE with port number
[23:41:14] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID
[23:41:14] [PASSED] DP_REMOTE_I2C_WRITE with data array
[23:41:14] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID
[23:41:14] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID
[23:41:14] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event
[23:41:14] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event
[23:41:14] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior
[23:41:14] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior
[23:41:14] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode =====
[23:41:14] ================ [PASSED] drm_dp_mst_helper ================
[23:41:14] ================== drm_exec (7 subtests) ===================
[23:41:14] [PASSED] sanitycheck
[23:41:14] [PASSED] test_lock
[23:41:14] [PASSED] test_lock_unlock
[23:41:14] [PASSED] test_duplicates
[23:41:14] [PASSED] test_prepare
[23:41:14] [PASSED] test_prepare_array
[23:41:14] [PASSED] test_multiple_loops
[23:41:14] ==================== [PASSED] drm_exec =====================
[23:41:14] =========== drm_format_helper_test (17 subtests) ===========
[23:41:14] ============== drm_test_fb_xrgb8888_to_gray8  ==============
[23:41:14] [PASSED] single_pixel_source_buffer
[23:41:14] [PASSED] single_pixel_clip_rectangle
[23:41:14] [PASSED] well_known_colors
[23:41:14] [PASSED] destination_pitch
[23:41:14] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ==========
[23:41:14] ============= drm_test_fb_xrgb8888_to_rgb332  ==============
[23:41:14] [PASSED] single_pixel_source_buffer
[23:41:14] [PASSED] single_pixel_clip_rectangle
[23:41:14] [PASSED] well_known_colors
[23:41:14] [PASSED] destination_pitch
[23:41:14] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ==========
[23:41:14] ============= drm_test_fb_xrgb8888_to_rgb565  ==============
[23:41:14] [PASSED] single_pixel_source_buffer
[23:41:14] [PASSED] single_pixel_clip_rectangle
[23:41:14] [PASSED] well_known_colors
[23:41:14] [PASSED] destination_pitch
[23:41:14] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ==========
[23:41:14] ============ drm_test_fb_xrgb8888_to_xrgb1555  =============
[23:41:14] [PASSED] single_pixel_source_buffer
[23:41:14] [PASSED] single_pixel_clip_rectangle
[23:41:14] [PASSED] well_known_colors
[23:41:14] [PASSED] destination_pitch
[23:41:14] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 =========
[23:41:14] ============ drm_test_fb_xrgb8888_to_argb1555  =============
[23:41:14] [PASSED] single_pixel_source_buffer
[23:41:14] [PASSED] single_pixel_clip_rectangle
[23:41:14] [PASSED] well_known_colors
[23:41:14] [PASSED] destination_pitch
[23:41:14] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 =========
[23:41:14] ============ drm_test_fb_xrgb8888_to_rgba5551  =============
[23:41:14] [PASSED] single_pixel_source_buffer
[23:41:14] [PASSED] single_pixel_clip_rectangle
[23:41:14] [PASSED] well_known_colors
[23:41:14] [PASSED] destination_pitch
[23:41:14] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 =========
[23:41:14] ============= drm_test_fb_xrgb8888_to_rgb888  ==============
[23:41:14] [PASSED] single_pixel_source_buffer
[23:41:14] [PASSED] single_pixel_clip_rectangle
[23:41:14] [PASSED] well_known_colors
[23:41:14] [PASSED] destination_pitch
[23:41:14] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ==========
[23:41:14] ============= drm_test_fb_xrgb8888_to_bgr888  ==============
[23:41:14] [PASSED] single_pixel_source_buffer
[23:41:14] [PASSED] single_pixel_clip_rectangle
[23:41:14] [PASSED] well_known_colors
[23:41:14] [PASSED] destination_pitch
[23:41:14] ========= [PASSED] drm_test_fb_xrgb8888_to_bgr888 ==========
[23:41:14] ============ drm_test_fb_xrgb8888_to_argb8888  =============
[23:41:14] [PASSED] single_pixel_source_buffer
[23:41:14] [PASSED] single_pixel_clip_rectangle
[23:41:14] [PASSED] well_known_colors
[23:41:14] [PASSED] destination_pitch
[23:41:14] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 =========
[23:41:14] =========== drm_test_fb_xrgb8888_to_xrgb2101010  ===========
[23:41:14] [PASSED] single_pixel_source_buffer
[23:41:14] [PASSED] single_pixel_clip_rectangle
[23:41:14] [PASSED] well_known_colors
[23:41:14] [PASSED] destination_pitch
[23:41:14] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 =======
[23:41:14] =========== drm_test_fb_xrgb8888_to_argb2101010  ===========
[23:41:14] [PASSED] single_pixel_source_buffer
[23:41:14] [PASSED] single_pixel_clip_rectangle
[23:41:14] [PASSED] well_known_colors
[23:41:14] [PASSED] destination_pitch
[23:41:14] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 =======
[23:41:14] ============== drm_test_fb_xrgb8888_to_mono  ===============
[23:41:14] [PASSED] single_pixel_source_buffer
[23:41:14] [PASSED] single_pixel_clip_rectangle
[23:41:14] [PASSED] well_known_colors
[23:41:14] [PASSED] destination_pitch
[23:41:14] ========== [PASSED] drm_test_fb_xrgb8888_to_mono ===========
[23:41:14] ==================== drm_test_fb_swab  =====================
[23:41:14] [PASSED] single_pixel_source_buffer
[23:41:14] [PASSED] single_pixel_clip_rectangle
[23:41:14] [PASSED] well_known_colors
[23:41:14] [PASSED] destination_pitch
[23:41:14] ================ [PASSED] drm_test_fb_swab =================
[23:41:14] ============ drm_test_fb_xrgb8888_to_xbgr8888  =============
[23:41:14] [PASSED] single_pixel_source_buffer
[23:41:14] [PASSED] single_pixel_clip_rectangle
[23:41:14] [PASSED] well_known_colors
[23:41:14] [PASSED] destination_pitch
[23:41:14] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 =========
[23:41:14] ============ drm_test_fb_xrgb8888_to_abgr8888  =============
[23:41:14] [PASSED] single_pixel_source_buffer
[23:41:14] [PASSED] single_pixel_clip_rectangle
[23:41:14] [PASSED] well_known_colors
[23:41:14] [PASSED] destination_pitch
[23:41:14] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 =========
[23:41:14] ================= drm_test_fb_clip_offset  =================
[23:41:14] [PASSED] pass through
[23:41:14] [PASSED] horizontal offset
[23:41:14] [PASSED] vertical offset
[23:41:14] [PASSED] horizontal and vertical offset
[23:41:14] [PASSED] horizontal offset (custom pitch)
[23:41:14] [PASSED] vertical offset (custom pitch)
[23:41:14] [PASSED] horizontal and vertical offset (custom pitch)
[23:41:14] ============= [PASSED] drm_test_fb_clip_offset =============
[23:41:14] =================== drm_test_fb_memcpy  ====================
[23:41:14] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258)
[23:41:14] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258)
[23:41:14] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559)
[23:41:14] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258)
[23:41:14] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258)
[23:41:14] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559)
[23:41:14] [PASSED] well_known_colors: XB24 little-endian (0x34324258)
[23:41:14] [PASSED] well_known_colors: XRA8 little-endian (0x38415258)
[23:41:14] [PASSED] well_known_colors: YU24 little-endian (0x34325559)
[23:41:14] [PASSED] destination_pitch: XB24 little-endian (0x34324258)
[23:41:14] [PASSED] destination_pitch: XRA8 little-endian (0x38415258)
[23:41:14] [PASSED] destination_pitch: YU24 little-endian (0x34325559)
[23:41:14] =============== [PASSED] drm_test_fb_memcpy ================
[23:41:14] ============= [PASSED] drm_format_helper_test ==============
[23:41:14] ================= drm_format (18 subtests) =================
[23:41:14] [PASSED] drm_test_format_block_width_invalid
[23:41:14] [PASSED] drm_test_format_block_width_one_plane
[23:41:14] [PASSED] drm_test_format_block_width_two_plane
[23:41:14] [PASSED] drm_test_format_block_width_three_plane
[23:41:14] [PASSED] drm_test_format_block_width_tiled
[23:41:14] [PASSED] drm_test_format_block_height_invalid
[23:41:14] [PASSED] drm_test_format_block_height_one_plane
[23:41:14] [PASSED] drm_test_format_block_height_two_plane
[23:41:14] [PASSED] drm_test_format_block_height_three_plane
[23:41:14] [PASSED] drm_test_format_block_height_tiled
[23:41:14] [PASSED] drm_test_format_min_pitch_invalid
[23:41:14] [PASSED] drm_test_format_min_pitch_one_plane_8bpp
[23:41:14] [PASSED] drm_test_format_min_pitch_one_plane_16bpp
[23:41:14] [PASSED] drm_test_format_min_pitch_one_plane_24bpp
[23:41:14] [PASSED] drm_test_format_min_pitch_one_plane_32bpp
[23:41:14] [PASSED] drm_test_format_min_pitch_two_plane
[23:41:14] [PASSED] drm_test_format_min_pitch_three_plane_8bpp
[23:41:14] [PASSED] drm_test_format_min_pitch_tiled
[23:41:14] =================== [PASSED] drm_format ====================
[23:41:14] ============== drm_framebuffer (10 subtests) ===============
[23:41:14] ========== drm_test_framebuffer_check_src_coords  ==========
[23:41:14] [PASSED] Success: source fits into fb
[23:41:14] [PASSED] Fail: overflowing fb with x-axis coordinate
[23:41:14] [PASSED] Fail: overflowing fb with y-axis coordinate
[23:41:14] [PASSED] Fail: overflowing fb with source width
[23:41:14] [PASSED] Fail: overflowing fb with source height
[23:41:14] ====== [PASSED] drm_test_framebuffer_check_src_coords ======
[23:41:14] [PASSED] drm_test_framebuffer_cleanup
[23:41:14] =============== drm_test_framebuffer_create  ===============
[23:41:14] [PASSED] ABGR8888 normal sizes
[23:41:14] [PASSED] ABGR8888 max sizes
[23:41:14] [PASSED] ABGR8888 pitch greater than min required
[23:41:14] [PASSED] ABGR8888 pitch less than min required
[23:41:14] [PASSED] ABGR8888 Invalid width
[23:41:14] [PASSED] ABGR8888 Invalid buffer handle
[23:41:14] [PASSED] No pixel format
[23:41:14] [PASSED] ABGR8888 Width 0
[23:41:14] [PASSED] ABGR8888 Height 0
[23:41:14] [PASSED] ABGR8888 Out of bound height * pitch combination
[23:41:14] [PASSED] ABGR8888 Large buffer offset
[23:41:14] [PASSED] ABGR8888 Buffer offset for inexistent plane
[23:41:14] [PASSED] ABGR8888 Invalid flag
[23:41:14] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers
[23:41:14] [PASSED] ABGR8888 Valid buffer modifier
[23:41:14] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE)
[23:41:14] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS
[23:41:14] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS
[23:41:14] [PASSED] NV12 Normal sizes
[23:41:14] [PASSED] NV12 Max sizes
[23:41:14] [PASSED] NV12 Invalid pitch
[23:41:14] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag
[23:41:14] [PASSED] NV12 different  modifier per-plane
[23:41:14] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE
[23:41:14] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS
[23:41:14] [PASSED] NV12 Modifier for inexistent plane
[23:41:14] [PASSED] NV12 Handle for inexistent plane
[23:41:14] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS
[23:41:14] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier
[23:41:14] [PASSED] YVU420 Normal sizes
[23:41:14] [PASSED] YVU420 Max sizes
[23:41:14] [PASSED] YVU420 Invalid pitch
[23:41:14] [PASSED] YVU420 Different pitches
[23:41:14] [PASSED] YVU420 Different buffer offsets/pitches
[23:41:14] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS
[23:41:14] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS
[23:41:14] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS
[23:41:14] [PASSED] YVU420 Valid modifier
[23:41:14] [PASSED] YVU420 Different modifiers per plane
[23:41:14] [PASSED] YVU420 Modifier for inexistent plane
[23:41:14] [PASSED] YUV420_10BIT Invalid modifier(DRM_FORMAT_MOD_LINEAR)
[23:41:14] [PASSED] X0L2 Normal sizes
[23:41:14] [PASSED] X0L2 Max sizes
[23:41:14] [PASSED] X0L2 Invalid pitch
[23:41:14] [PASSED] X0L2 Pitch greater than minimum required
[23:41:14] [PASSED] X0L2 Handle for inexistent plane
[23:41:14] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set
[23:41:14] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set
[23:41:14] [PASSED] X0L2 Valid modifier
[23:41:14] [PASSED] X0L2 Modifier for inexistent plane
[23:41:14] =========== [PASSED] drm_test_framebuffer_create ===========
[23:41:14] [PASSED] drm_test_framebuffer_free
[23:41:14] [PASSED] drm_test_framebuffer_init
[23:41:14] [PASSED] drm_test_framebuffer_init_bad_format
[23:41:14] [PASSED] drm_test_framebuffer_init_dev_mismatch
[23:41:14] [PASSED] drm_test_framebuffer_lookup
[23:41:14] [PASSED] drm_test_framebuffer_lookup_inexistent
[23:41:14] [PASSED] drm_test_framebuffer_modifiers_not_supported
[23:41:14] ================= [PASSED] drm_framebuffer =================
[23:41:14] ================ drm_gem_shmem (8 subtests) ================
[23:41:14] [PASSED] drm_gem_shmem_test_obj_create
[23:41:14] [PASSED] drm_gem_shmem_test_obj_create_private
[23:41:14] [PASSED] drm_gem_shmem_test_pin_pages
[23:41:14] [PASSED] drm_gem_shmem_test_vmap
[23:41:14] [PASSED] drm_gem_shmem_test_get_sg_table
[23:41:14] [PASSED] drm_gem_shmem_test_get_pages_sgt
[23:41:14] [PASSED] drm_gem_shmem_test_madvise
[23:41:14] [PASSED] drm_gem_shmem_test_purge
[23:41:14] ================== [PASSED] drm_gem_shmem ==================
[23:41:14] === drm_atomic_helper_connector_hdmi_check (29 subtests) ===
[23:41:14] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode
[23:41:14] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1
[23:41:14] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode
[23:41:14] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1
[23:41:14] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode
[23:41:14] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1
[23:41:14] ====== drm_test_check_broadcast_rgb_cea_mode_yuv420  =======
[23:41:14] [PASSED] Automatic
[23:41:14] [PASSED] Full
[23:41:14] [PASSED] Limited 16:235
[23:41:14] == [PASSED] drm_test_check_broadcast_rgb_cea_mode_yuv420 ===
[23:41:14] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed
[23:41:14] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed
[23:41:14] [PASSED] drm_test_check_disable_connector
[23:41:14] [PASSED] drm_test_check_hdmi_funcs_reject_rate
[23:41:14] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_rgb
[23:41:14] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_yuv420
[23:41:14] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv422
[23:41:14] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv420
[23:41:14] [PASSED] drm_test_check_driver_unsupported_fallback_yuv420
[23:41:14] [PASSED] drm_test_check_output_bpc_crtc_mode_changed
[23:41:14] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed
[23:41:14] [PASSED] drm_test_check_output_bpc_dvi
[23:41:14] [PASSED] drm_test_check_output_bpc_format_vic_1
[23:41:14] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only
[23:41:14] [PASSED] drm_test_check_output_bpc_format_display_rgb_only
[23:41:14] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only
[23:41:14] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only
[23:41:14] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc
[23:41:14] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc
[23:41:14] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc
[23:41:14] ============ drm_test_check_hdmi_color_format  =============
[23:41:14] [PASSED] AUTO -> RGB
[23:41:14] [PASSED] YCBCR422 -> YUV422
[23:41:14] [PASSED] YCBCR420 -> YUV420
[23:41:14] [PASSED] YCBCR444 -> YUV444
[23:41:14] [PASSED] RGB -> RGB
[23:41:14] ======== [PASSED] drm_test_check_hdmi_color_format =========
[23:41:14] ======== drm_test_check_hdmi_color_format_420_only  ========
[23:41:14] [PASSED] RGB should fail
[23:41:14] [PASSED] YUV444 should fail
[23:41:14] [PASSED] YUV422 should fail
[23:41:14] [PASSED] YUV420 should work
[23:41:14] ==== [PASSED] drm_test_check_hdmi_color_format_420_only ====
[23:41:14] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ======
[23:41:14] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ====
[23:41:14] [PASSED] drm_test_check_broadcast_rgb_value
[23:41:14] [PASSED] drm_test_check_bpc_8_value
[23:41:14] [PASSED] drm_test_check_bpc_10_value
[23:41:14] [PASSED] drm_test_check_bpc_12_value
[23:41:14] [PASSED] drm_test_check_format_value
[23:41:14] [PASSED] drm_test_check_tmds_char_value
[23:41:14] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ======
[23:41:14] = drm_atomic_helper_connector_hdmi_mode_valid (7 subtests) =
[23:41:14] [PASSED] drm_test_check_mode_valid
[23:41:14] [PASSED] drm_test_check_mode_valid_reject
[23:41:14] [PASSED] drm_test_check_mode_valid_reject_rate
[23:41:14] [PASSED] drm_test_check_mode_valid_reject_max_clock
[23:41:14] [PASSED] drm_test_check_mode_valid_yuv420_only_max_clock
[23:41:14] [PASSED] drm_test_check_mode_valid_reject_yuv420_only_connector
[23:41:14] [PASSED] drm_test_check_mode_valid_accept_yuv420_also_connector_rgb
[23:41:14] === [PASSED] drm_atomic_helper_connector_hdmi_mode_valid ===
[23:41:14] = drm_atomic_helper_connector_hdmi_infoframes (5 subtests) =
[23:41:14] [PASSED] drm_test_check_infoframes
[23:41:14] [PASSED] drm_test_check_reject_avi_infoframe
[23:41:14] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_8
[23:41:14] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_10
[23:41:14] [PASSED] drm_test_check_reject_audio_infoframe
[23:41:14] === [PASSED] drm_atomic_helper_connector_hdmi_infoframes ===
[23:41:14] ================= drm_managed (2 subtests) =================
[23:41:14] [PASSED] drm_test_managed_release_action
[23:41:14] [PASSED] drm_test_managed_run_action
[23:41:14] =================== [PASSED] drm_managed ===================
[23:41:14] =================== drm_mm (6 subtests) ====================
[23:41:14] [PASSED] drm_test_mm_init
[23:41:14] [PASSED] drm_test_mm_debug
[23:41:14] [PASSED] drm_test_mm_align32
[23:41:14] [PASSED] drm_test_mm_align64
[23:41:14] [PASSED] drm_test_mm_lowest
[23:41:14] [PASSED] drm_test_mm_highest
[23:41:14] ===================== [PASSED] drm_mm ======================
[23:41:14] ============= drm_modes_analog_tv (5 subtests) =============
[23:41:14] [PASSED] drm_test_modes_analog_tv_mono_576i
[23:41:14] [PASSED] drm_test_modes_analog_tv_ntsc_480i
[23:41:14] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined
[23:41:14] [PASSED] drm_test_modes_analog_tv_pal_576i
[23:41:14] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined
[23:41:14] =============== [PASSED] drm_modes_analog_tv ===============
[23:41:14] ============== drm_panic_helper (3 subtests) ===============
[23:41:14] ============= drm_test_panic_screen_user_map  ==============
[23:41:14] [PASSED] Panic screen user, mode: 1024 x 768 	XR24 little-endian (0x34325258)
[23:41:14] [PASSED] Panic screen user, mode: 494 x 494 	XR24 little-endian (0x34325258)
[23:41:14] [PASSED] Panic screen user, mode: 1920 x 1080 	XR24 little-endian (0x34325258)
[23:41:14] [PASSED] Panic screen user, mode: 1024 x 768 	RG16 little-endian (0x36314752)
[23:41:14] [PASSED] Panic screen user, mode: 1024 x 768 	RG24 little-endian (0x34324752)
[23:41:14] [PASSED] Panic screen kmsg, mode: 1024 x 768 	XR24 little-endian (0x34325258)
[23:41:14] [PASSED] Panic screen kmsg, mode: 494 x 494 	XR24 little-endian (0x34325258)
[23:41:14] [PASSED] Panic screen kmsg, mode: 1920 x 1080 	XR24 little-endian (0x34325258)
[23:41:14] [PASSED] Panic screen kmsg, mode: 1024 x 768 	RG16 little-endian (0x36314752)
[23:41:14] [PASSED] Panic screen kmsg, mode: 1024 x 768 	RG24 little-endian (0x34324752)
[23:41:14] ========= [PASSED] drm_test_panic_screen_user_map ==========
[23:41:14] ============= drm_test_panic_screen_user_page  =============
[23:41:14] [PASSED] Panic screen user, mode: 1024 x 768 	XR24 little-endian (0x34325258)
[23:41:14] [PASSED] Panic screen user, mode: 494 x 494 	XR24 little-endian (0x34325258)
[23:41:14] [PASSED] Panic screen user, mode: 1920 x 1080 	XR24 little-endian (0x34325258)
[23:41:14] [PASSED] Panic screen user, mode: 1024 x 768 	RG16 little-endian (0x36314752)
[23:41:14] [PASSED] Panic screen user, mode: 1024 x 768 	RG24 little-endian (0x34324752)
[23:41:14] [PASSED] Panic screen kmsg, mode: 1024 x 768 	XR24 little-endian (0x34325258)
[23:41:14] [PASSED] Panic screen kmsg, mode: 494 x 494 	XR24 little-endian (0x34325258)
[23:41:14] [PASSED] Panic screen kmsg, mode: 1920 x 1080 	XR24 little-endian (0x34325258)
[23:41:14] [PASSED] Panic screen kmsg, mode: 1024 x 768 	RG16 little-endian (0x36314752)
[23:41:14] [PASSED] Panic screen kmsg, mode: 1024 x 768 	RG24 little-endian (0x34324752)
[23:41:14] ========= [PASSED] drm_test_panic_screen_user_page =========
[23:41:14] ========== drm_test_panic_screen_user_set_pixel  ===========
[23:41:14] [PASSED] Panic screen user, mode: 1024 x 768 	XR24 little-endian (0x34325258)
[23:41:14] [PASSED] Panic screen user, mode: 494 x 494 	XR24 little-endian (0x34325258)
[23:41:14] [PASSED] Panic screen user, mode: 1920 x 1080 	XR24 little-endian (0x34325258)
[23:41:14] [PASSED] Panic screen user, mode: 1024 x 768 	RG16 little-endian (0x36314752)
[23:41:14] [PASSED] Panic screen user, mode: 1024 x 768 	RG24 little-endian (0x34324752)
[23:41:14] [PASSED] Panic screen kmsg, mode: 1024 x 768 	XR24 little-endian (0x34325258)
[23:41:14] [PASSED] Panic screen kmsg, mode: 494 x 494 	XR24 little-endian (0x34325258)
[23:41:14] [PASSED] Panic screen kmsg, mode: 1920 x 1080 	XR24 little-endian (0x34325258)
[23:41:14] [PASSED] Panic screen kmsg, mode: 1024 x 768 	RG16 little-endian (0x36314752)
[23:41:14] [PASSED] Panic screen kmsg, mode: 1024 x 768 	RG24 little-endian (0x34324752)
[23:41:14] ====== [PASSED] drm_test_panic_screen_user_set_pixel =======
[23:41:14] ================ [PASSED] drm_panic_helper =================
[23:41:14] ============== drm_plane_helper (2 subtests) ===============
[23:41:14] =============== drm_test_check_plane_state  ================
[23:41:14] [PASSED] clipping_simple
[23:41:14] [PASSED] clipping_rotate_reflect
[23:41:14] [PASSED] positioning_simple
[23:41:14] [PASSED] upscaling
[23:41:14] [PASSED] downscaling
[23:41:14] [PASSED] rounding1
[23:41:14] [PASSED] rounding2
[23:41:14] [PASSED] rounding3
[23:41:14] [PASSED] rounding4
[23:41:14] =========== [PASSED] drm_test_check_plane_state ============
[23:41:14] =========== drm_test_check_invalid_plane_state  ============
[23:41:14] [PASSED] positioning_invalid
[23:41:14] [PASSED] upscaling_invalid
[23:41:14] [PASSED] downscaling_invalid
[23:41:14] ======= [PASSED] drm_test_check_invalid_plane_state ========
[23:41:14] ================ [PASSED] drm_plane_helper =================
[23:41:14] ====== drm_connector_helper_tv_get_modes (1 subtest) =======
[23:41:14] ====== drm_test_connector_helper_tv_get_modes_check  =======
[23:41:14] [PASSED] None
[23:41:14] [PASSED] PAL
[23:41:14] [PASSED] NTSC
[23:41:14] [PASSED] Both, NTSC Default
[23:41:14] [PASSED] Both, PAL Default
[23:41:14] [PASSED] Both, NTSC Default, with PAL on command-line
[23:41:14] [PASSED] Both, PAL Default, with NTSC on command-line
[23:41:14] == [PASSED] drm_test_connector_helper_tv_get_modes_check ===
[23:41:14] ======== [PASSED] drm_connector_helper_tv_get_modes ========
[23:41:14] ================== drm_rect (9 subtests) ===================
[23:41:14] [PASSED] drm_test_rect_clip_scaled_div_by_zero
[23:41:14] [PASSED] drm_test_rect_clip_scaled_not_clipped
[23:41:14] [PASSED] drm_test_rect_clip_scaled_clipped
[23:41:14] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned
[23:41:14] ================= drm_test_rect_intersect  =================
[23:41:14] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0
[23:41:14] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1
[23:41:14] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0
[23:41:14] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1
[23:41:14] [PASSED] right x left: 2x1+0+0 x 3x1+1+0
[23:41:14] [PASSED] left x right: 3x1+1+0 x 2x1+0+0
[23:41:14] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1
[23:41:14] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0
[23:41:14] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1
[23:41:14] [PASSED] touching side: 1x1+0+0 x 1x1+1+0
[23:41:14] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0
[23:41:14] [PASSED] inside another: 2x2+0+0 x 1x1+1+1
[23:41:14] [PASSED] far away: 1x1+0+0 x 1x1+3+6
[23:41:14] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10
[23:41:14] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10
[23:41:14] ============= [PASSED] drm_test_rect_intersect =============
[23:41:14] ================ drm_test_rect_calc_hscale  ================
[23:41:14] [PASSED] normal use
[23:41:14] [PASSED] out of max range
[23:41:14] [PASSED] out of min range
[23:41:14] [PASSED] zero dst
[23:41:14] [PASSED] negative src
[23:41:14] [PASSED] negative dst
[23:41:14] ============ [PASSED] drm_test_rect_calc_hscale ============
[23:41:14] ================ drm_test_rect_calc_vscale  ================
[23:41:14] [PASSED] normal use
[23:41:14] [PASSED] out of max range
[23:41:14] [PASSED] out of min range
[23:41:14] [PASSED] zero dst
[23:41:14] [PASSED] negative src
[23:41:14] [PASSED] negative dst
[23:41:14] ============ [PASSED] drm_test_rect_calc_vscale ============
[23:41:14] ================== drm_test_rect_rotate  ===================
[23:41:14] [PASSED] reflect-x
[23:41:14] [PASSED] reflect-y
[23:41:14] [PASSED] rotate-0
[23:41:14] [PASSED] rotate-90
[23:41:14] [PASSED] rotate-180
[23:41:14] [PASSED] rotate-270
[23:41:14] ============== [PASSED] drm_test_rect_rotate ===============
[23:41:14] ================ drm_test_rect_rotate_inv  =================
[23:41:14] [PASSED] reflect-x
[23:41:14] [PASSED] reflect-y
[23:41:14] [PASSED] rotate-0
[23:41:14] [PASSED] rotate-90
[23:41:14] [PASSED] rotate-180
[23:41:14] [PASSED] rotate-270
[23:41:14] ============ [PASSED] drm_test_rect_rotate_inv =============
[23:41:14] ==================== [PASSED] drm_rect =====================
[23:41:14] ============ drm_sysfb_modeset_test (1 subtest) ============
[23:41:14] ============ drm_test_sysfb_build_fourcc_list  =============
[23:41:14] [PASSED] no native formats
[23:41:14] [PASSED] XRGB8888 as native format
[23:41:14] [PASSED] remove duplicates
[23:41:14] [PASSED] convert alpha formats
[23:41:14] [PASSED] random formats
[23:41:14] ======== [PASSED] drm_test_sysfb_build_fourcc_list =========
[23:41:14] ============= [PASSED] drm_sysfb_modeset_test ==============
[23:41:14] ================== drm_fixp (2 subtests) ===================
[23:41:14] [PASSED] drm_test_int2fixp
[23:41:14] [PASSED] drm_test_sm2fixp
[23:41:14] ==================== [PASSED] drm_fixp =====================
[23:41:14] ============================================================
[23:41:14] Testing complete. Ran 667 tests: passed: 667
[23:41:14] Elapsed time: 27.181s total, 1.918s configuring, 24.792s building, 0.418s 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 [23:41:14] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[23:41:16] 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
[23:41:26] Starting KUnit Kernel (1/1)...
[23:41:26] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[23:41:26] ================= ttm_device (5 subtests) ==================
[23:41:26] [PASSED] ttm_device_init_basic
[23:41:26] [PASSED] ttm_device_init_multiple
[23:41:26] [PASSED] ttm_device_fini_basic
[23:41:26] [PASSED] ttm_device_init_no_vma_man
[23:41:26] ================== ttm_device_init_pools  ==================
[23:41:26] [PASSED] No DMA allocations, no DMA32 required
[23:41:26] [PASSED] DMA allocations, DMA32 required
[23:41:26] [PASSED] No DMA allocations, DMA32 required
[23:41:26] [PASSED] DMA allocations, no DMA32 required
[23:41:26] ============== [PASSED] ttm_device_init_pools ==============
[23:41:26] =================== [PASSED] ttm_device ====================
[23:41:26] ================== ttm_pool (8 subtests) ===================
[23:41:26] ================== ttm_pool_alloc_basic  ===================
[23:41:26] [PASSED] One page
[23:41:26] [PASSED] More than one page
[23:41:26] [PASSED] Above the allocation limit
[23:41:27] [PASSED] One page, with coherent DMA mappings enabled
[23:41:27] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[23:41:27] ============== [PASSED] ttm_pool_alloc_basic ===============
[23:41:27] ============== ttm_pool_alloc_basic_dma_addr  ==============
[23:41:27] [PASSED] One page
[23:41:27] [PASSED] More than one page
[23:41:27] [PASSED] Above the allocation limit
[23:41:27] [PASSED] One page, with coherent DMA mappings enabled
[23:41:27] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[23:41:27] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ==========
[23:41:27] [PASSED] ttm_pool_alloc_order_caching_match
[23:41:27] [PASSED] ttm_pool_alloc_caching_mismatch
[23:41:27] [PASSED] ttm_pool_alloc_order_mismatch
[23:41:27] [PASSED] ttm_pool_free_dma_alloc
[23:41:27] [PASSED] ttm_pool_free_no_dma_alloc
[23:41:27] [PASSED] ttm_pool_fini_basic
[23:41:27] ==================== [PASSED] ttm_pool =====================
[23:41:27] ================ ttm_resource (8 subtests) =================
[23:41:27] ================= ttm_resource_init_basic  =================
[23:41:27] [PASSED] Init resource in TTM_PL_SYSTEM
[23:41:27] [PASSED] Init resource in TTM_PL_VRAM
[23:41:27] [PASSED] Init resource in a private placement
[23:41:27] [PASSED] Init resource in TTM_PL_SYSTEM, set placement flags
[23:41:27] ============= [PASSED] ttm_resource_init_basic =============
[23:41:27] [PASSED] ttm_resource_init_pinned
[23:41:27] [PASSED] ttm_resource_fini_basic
[23:41:27] [PASSED] ttm_resource_manager_init_basic
[23:41:27] [PASSED] ttm_resource_manager_usage_basic
[23:41:27] [PASSED] ttm_resource_manager_set_used_basic
[23:41:27] [PASSED] ttm_sys_man_alloc_basic
[23:41:27] [PASSED] ttm_sys_man_free_basic
[23:41:27] ================== [PASSED] ttm_resource ===================
[23:41:27] =================== ttm_tt (15 subtests) ===================
[23:41:27] ==================== ttm_tt_init_basic  ====================
[23:41:27] [PASSED] Page-aligned size
[23:41:27] [PASSED] Extra pages requested
[23:41:27] ================ [PASSED] ttm_tt_init_basic ================
[23:41:27] [PASSED] ttm_tt_init_misaligned
[23:41:27] [PASSED] ttm_tt_fini_basic
[23:41:27] [PASSED] ttm_tt_fini_sg
[23:41:27] [PASSED] ttm_tt_fini_shmem
[23:41:27] [PASSED] ttm_tt_create_basic
[23:41:27] [PASSED] ttm_tt_create_invalid_bo_type
[23:41:27] [PASSED] ttm_tt_create_ttm_exists
[23:41:27] [PASSED] ttm_tt_create_failed
[23:41:27] [PASSED] ttm_tt_destroy_basic
[23:41:27] [PASSED] ttm_tt_populate_null_ttm
[23:41:27] [PASSED] ttm_tt_populate_populated_ttm
[23:41:27] [PASSED] ttm_tt_unpopulate_basic
[23:41:27] [PASSED] ttm_tt_unpopulate_empty_ttm
[23:41:27] [PASSED] ttm_tt_swapin_basic
[23:41:27] ===================== [PASSED] ttm_tt ======================
[23:41:27] =================== ttm_bo (14 subtests) ===================
[23:41:27] =========== ttm_bo_reserve_optimistic_no_ticket  ===========
[23:41:27] [PASSED] Cannot be interrupted and sleeps
[23:41:27] [PASSED] Cannot be interrupted, locks straight away
[23:41:27] [PASSED] Can be interrupted, sleeps
[23:41:27] ======= [PASSED] ttm_bo_reserve_optimistic_no_ticket =======
[23:41:27] [PASSED] ttm_bo_reserve_locked_no_sleep
[23:41:27] [PASSED] ttm_bo_reserve_no_wait_ticket
[23:41:27] [PASSED] ttm_bo_reserve_double_resv
[23:41:27] [PASSED] ttm_bo_reserve_interrupted
[23:41:27] [PASSED] ttm_bo_reserve_deadlock
[23:41:27] [PASSED] ttm_bo_unreserve_basic
[23:41:27] [PASSED] ttm_bo_unreserve_pinned
[23:41:27] [PASSED] ttm_bo_unreserve_bulk
[23:41:27] [PASSED] ttm_bo_fini_basic
[23:41:27] [PASSED] ttm_bo_fini_shared_resv
[23:41:27] [PASSED] ttm_bo_pin_basic
[23:41:27] [PASSED] ttm_bo_pin_unpin_resource
[23:41:27] [PASSED] ttm_bo_multiple_pin_one_unpin
[23:41:27] ===================== [PASSED] ttm_bo ======================
[23:41:27] ============== ttm_bo_validate (22 subtests) ===============
[23:41:27] ============== ttm_bo_init_reserved_sys_man  ===============
[23:41:27] [PASSED] Buffer object for userspace
[23:41:27] [PASSED] Kernel buffer object
[23:41:27] [PASSED] Shared buffer object
[23:41:27] ========== [PASSED] ttm_bo_init_reserved_sys_man ===========
[23:41:27] ============== ttm_bo_init_reserved_mock_man  ==============
[23:41:27] [PASSED] Buffer object for userspace
[23:41:27] [PASSED] Kernel buffer object
[23:41:27] [PASSED] Shared buffer object
[23:41:27] ========== [PASSED] ttm_bo_init_reserved_mock_man ==========
[23:41:27] [PASSED] ttm_bo_init_reserved_resv
[23:41:27] ================== ttm_bo_validate_basic  ==================
[23:41:27] [PASSED] Buffer object for userspace
[23:41:27] [PASSED] Kernel buffer object
[23:41:27] [PASSED] Shared buffer object
[23:41:27] ============== [PASSED] ttm_bo_validate_basic ==============
[23:41:27] [PASSED] ttm_bo_validate_invalid_placement
[23:41:27] ============= ttm_bo_validate_same_placement  ==============
[23:41:27] [PASSED] System manager
[23:41:27] [PASSED] VRAM manager
[23:41:27] ========= [PASSED] ttm_bo_validate_same_placement ==========
[23:41:27] [PASSED] ttm_bo_validate_failed_alloc
[23:41:27] [PASSED] ttm_bo_validate_pinned
[23:41:27] [PASSED] ttm_bo_validate_busy_placement
[23:41:27] ================ ttm_bo_validate_multihop  =================
[23:41:27] [PASSED] Buffer object for userspace
[23:41:27] [PASSED] Kernel buffer object
[23:41:27] [PASSED] Shared buffer object
[23:41:27] ============ [PASSED] ttm_bo_validate_multihop =============
[23:41:27] ========== ttm_bo_validate_no_placement_signaled  ==========
[23:41:27] [PASSED] Buffer object in system domain, no page vector
[23:41:27] [PASSED] Buffer object in system domain with an existing page vector
[23:41:27] ====== [PASSED] ttm_bo_validate_no_placement_signaled ======
[23:41:27] ======== ttm_bo_validate_no_placement_not_signaled  ========
[23:41:27] [PASSED] Buffer object for userspace
[23:41:27] [PASSED] Kernel buffer object
[23:41:27] [PASSED] Shared buffer object
[23:41:27] ==== [PASSED] ttm_bo_validate_no_placement_not_signaled ====
[23:41:27] [PASSED] ttm_bo_validate_move_fence_signaled
[23:41:27] ========= ttm_bo_validate_move_fence_not_signaled  =========
[23:41:27] [PASSED] Waits for GPU
[23:41:27] [PASSED] Tries to lock straight away
[23:41:27] ===== [PASSED] ttm_bo_validate_move_fence_not_signaled =====
[23:41:27] [PASSED] ttm_bo_validate_swapout
[23:41:27] [PASSED] ttm_bo_validate_happy_evict
[23:41:27] [PASSED] ttm_bo_validate_all_pinned_evict
[23:41:27] [PASSED] ttm_bo_validate_allowed_only_evict
[23:41:27] [PASSED] ttm_bo_validate_deleted_evict
[23:41:27] [PASSED] ttm_bo_validate_busy_domain_evict
[23:41:27] [PASSED] ttm_bo_validate_evict_gutting
[23:41:27] [PASSED] ttm_bo_validate_recrusive_evict
[23:41:27] ================= [PASSED] ttm_bo_validate =================
[23:41:27] ============================================================
[23:41:27] Testing complete. Ran 102 tests: passed: 102
[23:41:27] Elapsed time: 12.249s total, 1.869s configuring, 10.165s building, 0.177s running

+ for kcfg in "${kunitconfigs[@]}"
+ [[ ! -f /kernel/drivers/dma-buf/.kunitconfig ]]
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/dma-buf/.kunitconfig [23:41:27] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[23:41:29] 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
[23:41:37] Starting KUnit Kernel (1/1)...
[23:41:37] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[23:41:37] =============== dma-buf-fence (12 subtests) ================
[23:41:37] [PASSED] test_sanitycheck
[23:41:37] [PASSED] test_signaling
[23:41:37] [PASSED] test_add_callback
[23:41:37] [PASSED] test_late_add_callback
[23:41:37] [PASSED] test_rm_callback
[23:41:37] [PASSED] test_late_rm_callback
[23:41:37] [PASSED] test_status
[23:41:37] [PASSED] test_error
[23:41:37] [PASSED] test_wait
[23:41:37] [PASSED] test_wait_timeout
[23:41:37] [PASSED] test_stub
[23:41:37] [SKIPPED] test_race_signal_callback (requires at least 2 CPUs)
[23:41:37] ================== [PASSED] dma-buf-fence ==================
[23:41:37] ============ dma-buf-fence-chain (11 subtests) =============
[23:41:37] [PASSED] test_sanitycheck
[23:41:37] [PASSED] test_find_seqno
[23:41:37] [PASSED] test_find_signaled
[23:41:37] [PASSED] test_find_out_of_order
[23:41:42] [PASSED] test_find_gap
[23:41:42] [PASSED] test_find_race
[23:41:42] [PASSED] test_signal_forward
[23:41:42] [PASSED] test_signal_backward
[23:41:42] [PASSED] test_wait_forward
[23:41:42] [PASSED] test_wait_backward
[23:41:42] [PASSED] test_wait_random
[23:41:42] =============== [PASSED] dma-buf-fence-chain ===============
[23:41:42] ============ dma-buf-fence-unwrap (11 subtests) ============
[23:41:42] [PASSED] test_sanitycheck
[23:41:42] [PASSED] test_unwrap_array
[23:41:42] [PASSED] test_unwrap_chain
[23:41:42] [PASSED] test_unwrap_chain_array
[23:41:42] [PASSED] test_unwrap_merge
[23:41:42] [PASSED] test_unwrap_merge_duplicate
[23:41:42] [PASSED] test_unwrap_merge_seqno
[23:41:42] [PASSED] test_unwrap_merge_order
[23:41:42] [PASSED] test_unwrap_merge_complex
[23:41:42] [PASSED] test_unwrap_merge_complex_seqno
[23:41:42] [PASSED] test_dedup_empty
[23:41:42] ============== [PASSED] dma-buf-fence-unwrap ===============
[23:41:42] ================ dma-buf-resv (5 subtests) =================
[23:41:42] [PASSED] test_sanitycheck
[23:41:42] ===================== test_signaling  ======================
[23:41:42] [PASSED] kernel
[23:41:42] [PASSED] write
[23:41:42] [PASSED] read
[23:41:42] [PASSED] bookkeep
[23:41:42] ================= [PASSED] test_signaling ==================
[23:41:42] ====================== test_for_each  ======================
[23:41:42] [PASSED] kernel
[23:41:42] [PASSED] write
[23:41:42] [PASSED] read
[23:41:42] [PASSED] bookkeep
[23:41:42] ================== [PASSED] test_for_each ==================
[23:41:42] ================= test_for_each_unlocked  ==================
[23:41:42] [PASSED] kernel
[23:41:42] [PASSED] write
[23:41:42] [PASSED] read
[23:41:42] [PASSED] bookkeep
[23:41:42] ============= [PASSED] test_for_each_unlocked ==============
[23:41:42] ===================== test_get_fences  =====================
[23:41:42] [PASSED] kernel
[23:41:42] [PASSED] write
[23:41:42] [PASSED] read
[23:41:42] [PASSED] bookkeep
[23:41:42] ================= [PASSED] test_get_fences =================
[23:41:42] ================== [PASSED] dma-buf-resv ===================
[23:41:42] ============================================================
[23:41:42] Testing complete. Ran 51 tests: passed: 50, skipped: 1
[23:41:43] Elapsed time: 15.725s total, 1.829s configuring, 8.624s building, 5.257s running

+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel

#16 lore raw

✓ Xe.CI.BAT: success for Add a minimum age gate to the shrinker + LRU fixes (rev3)

In reply to Matthew Brost
== Series Details ==

== Series Details ==

Series: Add a minimum age gate to the shrinker + LRU fixes (rev3)
URL : https://patchwork.freedesktop.org/series/176975/
State : success

== Summary ==

CI Bug Log - changes from xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb_BAT -> xe-pw-176975v3_BAT
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Participating hosts (15 -> 15)
------------------------------

No changes in participating hosts

Known issues
------------

Here are the changes found in xe-pw-176975v3_BAT that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@kms_flip@basic-plain-flip:
- bat-ptl-2: [PASS][1] -> [ABORT][2] ([Intel XE#9362]) +1 other test abort
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/bat-ptl-2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/bat-ptl-2/igt@[email protected]

* igt@xe_exec_fault_mode@twice-userptr-prefetch:
- bat-atsm-2: NOTRUN -> [SKIP][3] ([Intel XE#288]) +32 other tests skip
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/bat-atsm-2/igt@[email protected]

#### Possible fixes ####

* igt@xe_live_ktest@xe_migrate@xe_migrate_access_memory_kunit:
- bat-atsm-2: [ABORT][4] ([Intel XE#9663]) -> [PASS][5] +1 other test pass
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/bat-atsm-2/igt@xe_live_ktest@xe_migrate@xe_migrate_access_memory_kunit.html
[5]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/bat-atsm-2/igt@xe_live_ktest@xe_migrate@xe_migrate_access_memory_kunit.html

[Intel XE#288]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/288
[Intel XE#9362]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/9362
[Intel XE#9663]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/9663

Build changes
-------------

* Linux: xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb -> xe-pw-176975v3

IGT_9168: 9168
xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb: adaeb3881f12295309596acf2387c3f00b3050bb
xe-pw-176975v3: 176975v3

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/index.html

#17 lore raw

✓ Xe.CI.FULL: success for Add a minimum age gate to the shrinker + LRU fixes (rev3)

In reply to Matthew Brost
== Series Details ==

== Series Details ==

Series: Add a minimum age gate to the shrinker + LRU fixes (rev3)
URL : https://patchwork.freedesktop.org/series/176975/
State : success

== Summary ==

CI Bug Log - changes from xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb_FULL -> xe-pw-176975v3_FULL
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Participating hosts (3 -> 3)
------------------------------

No changes in participating hosts

Known issues
------------

Here are the changes found in xe-pw-176975v3_FULL that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@kms_big_fb@linear-max-hw-stride-32bpp-rotate-0-hflip:
- shard-lnl: NOTRUN -> [SKIP][1] ([Intel XE#7059] / [Intel XE#7085])
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-2/igt@[email protected]

* igt@kms_big_fb@x-tiled-64bpp-rotate-90:
- shard-lnl: NOTRUN -> [SKIP][2] ([Intel XE#1407]) +2 other tests skip
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-2/igt@[email protected]

* igt@kms_big_fb@yf-tiled-64bpp-rotate-180:
- shard-lnl: NOTRUN -> [SKIP][3] ([Intel XE#1124]) +1 other test skip
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@[email protected]

* igt@kms_big_fb@yf-tiled-64bpp-rotate-270:
- shard-bmg: NOTRUN -> [SKIP][4] ([Intel XE#1124])
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-6/igt@[email protected]

* igt@kms_bw@linear-tiling-4-displays-target-2160x1440p:
- shard-lnl: NOTRUN -> [SKIP][5] ([Intel XE#8365])
[5]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@[email protected]

* igt@kms_ccs@crc-primary-rotation-180-4-tiled-lnl-ccs@pipe-c-dp-1:
- shard-bmg: NOTRUN -> [SKIP][6] ([Intel XE#2652]) +7 other tests skip
[6]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-7/igt@kms_ccs@[email protected]

* igt@kms_ccs@crc-primary-rotation-180-4-tiled-mtl-rc-ccs-cc:
- shard-lnl: NOTRUN -> [SKIP][7] ([Intel XE#2887]) +4 other tests skip
[7]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@[email protected]

* igt@kms_ccs@crc-primary-suspend-4-tiled-bmg-ccs@pipe-c-hdmi-a-3:
- shard-bmg: [PASS][8] -> [INCOMPLETE][9] ([Intel XE#7084] / [Intel XE#8150])
[8]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-bmg-9/igt@kms_ccs@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-9/igt@kms_ccs@[email protected]

* igt@kms_cdclk@mode-transition-all-outputs:
- shard-bmg: NOTRUN -> [SKIP][10] ([Intel XE#2724] / [Intel XE#7449])
[10]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-6/igt@[email protected]

* igt@kms_chamelium_color_pipeline@plane-fixed-matrix-yuv-rgb-bt601:
- shard-bmg: NOTRUN -> [SKIP][11] ([Intel XE#7358])
[11]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-6/igt@kms_chamelium_color_pipeline@plane-fixed-matrix-yuv-rgb-bt601.html

* igt@kms_chamelium_hpd@hdmi-hpd-fast:
- shard-lnl: NOTRUN -> [SKIP][12] ([Intel XE#373])
[12]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@[email protected]

* igt@kms_color_pipeline@plane-lut1d-pre-ctm3x4@pipe-b-plane-4:
- shard-lnl: NOTRUN -> [SKIP][13] ([Intel XE#6969]) +5 other tests skip
[13]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@kms_color_pipeline@[email protected]

* igt@kms_content_protection@atomic@pipe-a-dp-2:
- shard-bmg: NOTRUN -> [FAIL][14] ([Intel XE#1178] / [Intel XE#3304] / [Intel XE#7374]) +2 other tests fail
[14]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-2/igt@kms_content_protection@[email protected]

* igt@kms_content_protection@legacy:
- shard-lnl: NOTRUN -> [SKIP][15] ([Intel XE#7642])
[15]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@[email protected]

* igt@kms_cursor_crc@cursor-offscreen-32x10:
- shard-lnl: NOTRUN -> [SKIP][16] ([Intel XE#1424]) +1 other test skip
[16]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-2/igt@[email protected]

* igt@kms_cursor_crc@cursor-onscreen-256x85:
- shard-bmg: NOTRUN -> [SKIP][17] ([Intel XE#2320])
[17]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-6/igt@[email protected]

* igt@kms_cursor_crc@cursor-rapid-movement-512x170:
- shard-bmg: NOTRUN -> [SKIP][18] ([Intel XE#2321] / [Intel XE#7355])
[18]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-6/igt@[email protected]

* igt@kms_dp_link_training@non-uhbr-mst:
- shard-lnl: NOTRUN -> [SKIP][19] ([Intel XE#9536])
[19]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@[email protected]

* igt@kms_dp_link_training@non-uhbr-sst:
- shard-lnl: NOTRUN -> [SKIP][20] ([Intel XE#9530])
[20]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-2/igt@[email protected]

* igt@kms_dsc@dsc-with-bpc-formats:
- shard-bmg: NOTRUN -> [SKIP][21] ([Intel XE#8265]) +1 other test skip
[21]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-6/igt@[email protected]

* igt@kms_dsc@dsc-with-bpc-formats-bigjoiner:
- shard-lnl: NOTRUN -> [SKIP][22] ([Intel XE#8265])
[22]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@[email protected]

* igt@kms_flip@2x-flip-vs-absolute-wf_vblank:
- shard-lnl: NOTRUN -> [SKIP][23] ([Intel XE#1421]) +2 other tests skip
[23]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-2/igt@kms_flip@2x-flip-vs-absolute-wf_vblank.html

* igt@kms_frontbuffer_tracking@drrs-2p-primscrn-pri-shrfb-draw-render:
- shard-bmg: NOTRUN -> [SKIP][24] ([Intel XE#2311]) +3 other tests skip
[24]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-6/igt@kms_frontbuffer_tracking@drrs-2p-primscrn-pri-shrfb-draw-render.html

* igt@kms_frontbuffer_tracking@drrs-abgr161616f-draw-render:
- shard-lnl: NOTRUN -> [SKIP][25] ([Intel XE#7061] / [Intel XE#7356]) +2 other tests skip
[25]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-2/igt@[email protected]

* igt@kms_frontbuffer_tracking@drrs-suspend:
- shard-lnl: NOTRUN -> [SKIP][26] ([Intel XE#6312] / [Intel XE#651]) +2 other tests skip
[26]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-2/igt@[email protected]

* igt@kms_frontbuffer_tracking@drrshdr-rgb101010-draw-render:
- shard-lnl: NOTRUN -> [SKIP][27] ([Intel XE#6312]) +5 other tests skip
[27]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcdrrs-2p-scndscrn-pri-indfb-draw-render:
- shard-lnl: NOTRUN -> [SKIP][28] ([Intel XE#656] / [Intel XE#7905]) +12 other tests skip
[28]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@kms_frontbuffer_tracking@fbcdrrs-2p-scndscrn-pri-indfb-draw-render.html

* igt@kms_frontbuffer_tracking@fbcdrrshdr-2p-primscrn-pri-shrfb-draw-blt:
- shard-lnl: NOTRUN -> [SKIP][29] ([Intel XE#7905]) +9 other tests skip
[29]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-2/igt@kms_frontbuffer_tracking@fbcdrrshdr-2p-primscrn-pri-shrfb-draw-blt.html

* igt@kms_frontbuffer_tracking@fbchdr-1p-primscrn-cur-indfb-draw-blt:
- shard-lnl: NOTRUN -> [SKIP][30] ([Intel XE#7865]) +9 other tests skip
[30]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@kms_frontbuffer_tracking@fbchdr-1p-primscrn-cur-indfb-draw-blt.html

* igt@kms_frontbuffer_tracking@fbcpsrhdr-rgb101010-draw-blt:
- shard-bmg: NOTRUN -> [SKIP][31] ([Intel XE#2313]) +2 other tests skip
[31]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-6/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsrhdr-tiling-y:
- shard-lnl: NOTRUN -> [SKIP][32] ([Intel XE#7399])
[32]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-2/igt@[email protected]

* igt@kms_frontbuffer_tracking@psrhdr-argb161616f-draw-blt:
- shard-lnl: NOTRUN -> [SKIP][33] ([Intel XE#7061]) +4 other tests skip
[33]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@[email protected]

* igt@kms_plane@pixel-format-4-tiled-lnl-ccs-modifier-source-clamping:
- shard-bmg: NOTRUN -> [SKIP][34] ([Intel XE#7283])
[34]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-6/igt@kms_plane@pixel-format-4-tiled-lnl-ccs-modifier-source-clamping.html

* igt@kms_plane_multiple@2x-tiling-x:
- shard-lnl: NOTRUN -> [SKIP][35] ([Intel XE#4596] / [Intel XE#5854])
[35]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@[email protected]

* igt@kms_plane_scaling@planes-unity-scaling-downscale-factor-0-5@pipe-a:
- shard-lnl: NOTRUN -> [SKIP][36] ([Intel XE#2763] / [Intel XE#6886]) +3 other tests skip
[36]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-2/igt@kms_plane_scaling@[email protected]

* igt@kms_pm_rpm@dpms-non-lpsp:
- shard-lnl: NOTRUN -> [SKIP][37] ([Intel XE#1439] / [Intel XE#3141] / [Intel XE#7383])
[37]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@[email protected]

* igt@kms_psr2_sf@fbc-psr2-overlay-primary-update-sf-dmg-area:
- shard-bmg: NOTRUN -> [SKIP][38] ([Intel XE#1489])
[38]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-6/igt@[email protected]

* igt@kms_psr2_sf@pr-primary-plane-update-sf-dmg-area:
- shard-lnl: NOTRUN -> [SKIP][39] ([Intel XE#2893] / [Intel XE#7304])
[39]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@[email protected]

* igt@kms_psr@fbc-psr2-basic:
- shard-lnl: NOTRUN -> [SKIP][40] ([Intel XE#1406] / [Intel XE#7345])
[40]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@[email protected]

* igt@kms_psr@fbc-psr2-basic@edp-1:
- shard-lnl: NOTRUN -> [SKIP][41] ([Intel XE#1406] / [Intel XE#4609] / [Intel XE#7345])
[41]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@kms_psr@[email protected]

* igt@kms_psr@pr-no-drrs:
- shard-lnl: NOTRUN -> [SKIP][42] ([Intel XE#1406])
[42]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@[email protected]

* igt@kms_psr@pr-sprite-render:
- shard-bmg: NOTRUN -> [SKIP][43] ([Intel XE#2234] / [Intel XE#2850])
[43]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-6/igt@[email protected]

* igt@kms_rotation_crc@primary-y-tiled-reflect-x-0:
- shard-lnl: NOTRUN -> [SKIP][44] ([Intel XE#1127] / [Intel XE#5813])
[44]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-2/igt@[email protected]

* igt@kms_rotation_crc@primary-yf-tiled-reflect-x-90:
- shard-lnl: NOTRUN -> [SKIP][45] ([Intel XE#3904] / [Intel XE#7342])
[45]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@[email protected]

* igt@kms_vrr@negative-basic:
- shard-lnl: NOTRUN -> [SKIP][46] ([Intel XE#1499] / [Intel XE#9271])
[46]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@[email protected]

* igt@xe_evict@evict-beng-threads-large:
- shard-lnl: NOTRUN -> [SKIP][47] ([Intel XE#6540] / [Intel XE#688]) +4 other tests skip
[47]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@[email protected]

* igt@xe_evict@evict-mixed-many-threads-small:
- shard-bmg: [PASS][48] -> [INCOMPLETE][49] ([Intel XE#6321] / [Intel XE#8355])
[48]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-bmg-7/igt@[email protected]
[49]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-2/igt@[email protected]

* igt@xe_exec_balancer@many-execqueues-cm-parallel-userptr-invalidate:
- shard-lnl: NOTRUN -> [SKIP][50] ([Intel XE#7482]) +3 other tests skip
[50]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@xe_exec_balancer@many-execqueues-cm-parallel-userptr-invalidate.html

* igt@xe_exec_basic@multigpu-once-bindexecqueue-userptr-invalidate:
- shard-lnl: NOTRUN -> [SKIP][51] ([Intel XE#1392]) +3 other tests skip
[51]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@xe_exec_basic@multigpu-once-bindexecqueue-userptr-invalidate.html

* igt@xe_exec_basic@multigpu-once-bindexecqueue-userptr-rebind:
- shard-bmg: NOTRUN -> [SKIP][52] ([Intel XE#2322] / [Intel XE#7372]) +1 other test skip
[52]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-6/igt@[email protected]

* igt@xe_exec_fault_mode@many-multi-queue-imm:
- shard-bmg: NOTRUN -> [SKIP][53] ([Intel XE#8374])
[53]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-6/igt@[email protected]

* igt@xe_exec_fault_mode@twice-multi-queue-userptr-rebind-imm:
- shard-lnl: NOTRUN -> [SKIP][54] ([Intel XE#8374]) +7 other tests skip
[54]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-2/igt@[email protected]

* igt@xe_exec_multi_queue@few-execs-close-fd-smem:
- shard-lnl: NOTRUN -> [SKIP][55] ([Intel XE#8364]) +6 other tests skip
[55]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@[email protected]

* igt@xe_exec_multi_queue@many-execs-preempt-mode-fault-userptr:
- shard-bmg: NOTRUN -> [SKIP][56] ([Intel XE#8364]) +2 other tests skip
[56]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-6/igt@[email protected]

* igt@xe_exec_reset@multi-queue-close-execqueues:
- shard-lnl: NOTRUN -> [SKIP][57] ([Intel XE#8369]) +1 other test skip
[57]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@[email protected]

* igt@xe_exec_threads@threads-multi-queue-basic:
- shard-lnl: NOTRUN -> [SKIP][58] ([Intel XE#8378]) +2 other tests skip
[58]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@[email protected]

* igt@xe_exec_threads@threads-multi-queue-cm-fd-userptr-invalidate-race:
- shard-bmg: NOTRUN -> [SKIP][59] ([Intel XE#8378]) +1 other test skip
[59]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-6/igt@xe_exec_threads@threads-multi-queue-cm-fd-userptr-invalidate-race.html

* igt@xe_gt_freq@freq_suspend:
- shard-lnl: NOTRUN -> [SKIP][60] ([Intel XE#584] / [Intel XE#7369])
[60]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@xe_gt_freq@freq_suspend.html

* igt@xe_module_load@load:
- shard-ptl: ([PASS][61], [PASS][62], [PASS][63], [PASS][64], [PASS][65], [PASS][66], [PASS][67], [PASS][68], [PASS][69], [PASS][70], [PASS][71], [PASS][72], [PASS][73], [PASS][74], [PASS][75], [PASS][76], [PASS][77], [PASS][78], [PASS][79], [PASS][80], [PASS][81], [PASS][82], [PASS][83], [PASS][84], [PASS][85]) -> ([PASS][86], [PASS][87], [PASS][88], [PASS][89], [PASS][90], [SKIP][91], [SKIP][92], [PASS][93], [PASS][94], [PASS][95], [PASS][96], [PASS][97], [PASS][98], [PASS][99], [PASS][100], [SKIP][101], [PASS][102], [PASS][103], [SKIP][104]) ([Intel XE#9286])
[61]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-6/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-6/igt@[email protected]
[63]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-6/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-3/igt@[email protected]
[65]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-3/igt@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-3/igt@[email protected]
[67]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-8/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-8/igt@[email protected]
[69]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-2/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-2/igt@[email protected]
[71]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-7/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-7/igt@[email protected]
[73]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-7/igt@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-2/igt@[email protected]
[75]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-4/igt@[email protected]
[76]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-4/igt@[email protected]
[77]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-8/igt@[email protected]
[78]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-4/igt@[email protected]
[79]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-8/igt@[email protected]
[80]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-1/igt@[email protected]
[81]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-1/igt@[email protected]
[82]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-1/igt@[email protected]
[83]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-5/igt@[email protected]
[84]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-5/igt@[email protected]
[85]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-ptl-5/igt@[email protected]
[86]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-ptl-3/igt@[email protected]
[87]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-ptl-7/igt@[email protected]
[88]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-ptl-6/igt@[email protected]
[89]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-ptl-5/igt@[email protected]
[90]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-ptl-5/igt@[email protected]
[91]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-ptl-5/igt@[email protected]
[92]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-ptl-6/igt@[email protected]
[93]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-ptl-6/igt@[email protected]
[94]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-ptl-8/igt@[email protected]
[95]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-ptl-1/igt@[email protected]
[96]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-ptl-1/igt@[email protected]
[97]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-ptl-1/igt@[email protected]
[98]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-ptl-4/igt@[email protected]
[99]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-ptl-4/igt@[email protected]
[100]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-ptl-2/igt@[email protected]
[101]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-ptl-2/igt@[email protected]
[102]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-ptl-2/igt@[email protected]
[103]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-ptl-3/igt@[email protected]
[104]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-ptl-3/igt@[email protected]

* igt@xe_multigpu_svm@mgpu-atomic-op-basic:
- shard-lnl: NOTRUN -> [SKIP][105] ([Intel XE#6964]) +1 other test skip
[105]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-2/igt@[email protected]

* igt@xe_page_reclaim@binds-full-pd:
- shard-lnl: NOTRUN -> [SKIP][106] ([Intel XE#7793])
[106]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@[email protected]

* igt@xe_pat@pat-sw-hw-suspend:
- shard-bmg: NOTRUN -> [FAIL][107] ([Intel XE#7695])
[107]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-6/igt@[email protected]

* igt@xe_pm@s2idle-d3cold-basic-exec:
- shard-lnl: NOTRUN -> [SKIP][108] ([Intel XE#2284] / [Intel XE#366] / [Intel XE#7370])
[108]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@[email protected]

* igt@xe_pm@s4-vm-bind-prefetch:
- shard-lnl: [PASS][109] -> [ABORT][110] ([Intel XE#9362])
[109]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-lnl-5/igt@[email protected]
[110]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-5/igt@[email protected]

* igt@xe_sriov_vram@vf-access-provisioned:
- shard-lnl: NOTRUN -> [SKIP][111] ([Intel XE#6376] / [Intel XE#7330] / [Intel XE#7422])
[111]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-3/igt@[email protected]

#### Possible fixes ####

* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
- shard-bmg: [FAIL][112] ([Intel XE#7809]) -> [PASS][113]
[112]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-bmg-8/igt@[email protected]
[113]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-7/igt@[email protected]

* igt@xe_configfs@ctx-restore-mid-bb:
- shard-bmg: [ABORT][114] ([Intel XE#9463]) -> [PASS][115]
[114]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-bmg-3/igt@[email protected]
[115]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-6/igt@[email protected]

* igt@xe_evict@evict-beng-mixed-many-threads-small:
- shard-bmg: [INCOMPLETE][116] ([Intel XE#6321] / [Intel XE#8355]) -> [PASS][117]
[116]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-bmg-4/igt@[email protected]
[117]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-10/igt@[email protected]

* igt@xe_pm@s4-vm-bind-unbind-all:
- shard-lnl: [ABORT][118] ([Intel XE#9362]) -> [PASS][119] +1 other test pass
[118]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-lnl-5/igt@[email protected]
[119]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-lnl-2/igt@[email protected]

#### Warnings ####

* igt@kms_tiled_display@basic-test-pattern:
- shard-bmg: [FAIL][120] ([Intel XE#1729] / [Intel XE#7424]) -> [SKIP][121] ([Intel XE#2426] / [Intel XE#5848])
[120]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb/shard-bmg-1/igt@[email protected]
[121]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/shard-bmg-6/igt@[email protected]

[Intel XE#1124]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1124
[Intel XE#1127]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1127
[Intel XE#1178]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1178
[Intel XE#1392]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1392
[Intel XE#1406]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1406
[Intel XE#1407]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1407
[Intel XE#1421]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1421
[Intel XE#1424]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1424
[Intel XE#1439]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1439
[Intel XE#1489]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1489
[Intel XE#1499]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1499
[Intel XE#1729]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1729
[Intel XE#2234]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2234
[Intel XE#2284]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2284
[Intel XE#2311]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2311
[Intel XE#2313]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2313
[Intel XE#2320]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2320
[Intel XE#2321]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2321
[Intel XE#2322]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2322
[Intel XE#2426]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2426
[Intel XE#2652]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2652
[Intel XE#2724]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2724
[Intel XE#2763]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2763
[Intel XE#2850]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2850
[Intel XE#2887]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2887
[Intel XE#2893]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2893
[Intel XE#3141]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3141
[Intel XE#3304]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3304
[Intel XE#366]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/366
[Intel XE#373]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/373
[Intel XE#3904]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3904
[Intel XE#4596]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4596
[Intel XE#4609]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4609
[Intel XE#5813]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/5813
[Intel XE#584]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/584
[Intel XE#5848]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/5848
[Intel XE#5854]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/5854
[Intel XE#6312]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6312
[Intel XE#6321]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6321
[Intel XE#6376]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6376
[Intel XE#651]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/651
[Intel XE#6540]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6540
[Intel XE#656]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/656
[Intel XE#688]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/688
[Intel XE#6886]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6886
[Intel XE#6964]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6964
[Intel XE#6969]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6969
[Intel XE#7059]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7059
[Intel XE#7061]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7061
[Intel XE#7084]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7084
[Intel XE#7085]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7085
[Intel XE#7283]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7283
[Intel XE#7304]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7304
[Intel XE#7330]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7330
[Intel XE#7342]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7342
[Intel XE#7345]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7345
[Intel XE#7355]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7355
[Intel XE#7356]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7356
[Intel XE#7358]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7358
[Intel XE#7369]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7369
[Intel XE#7370]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7370
[Intel XE#7372]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7372
[Intel XE#7374]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7374
[Intel XE#7383]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7383
[Intel XE#7399]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7399
[Intel XE#7422]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7422
[Intel XE#7424]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7424
[Intel XE#7449]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7449
[Intel XE#7482]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7482
[Intel XE#7642]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7642
[Intel XE#7695]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7695
[Intel XE#7793]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7793
[Intel XE#7809]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7809
[Intel XE#7865]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7865
[Intel XE#7905]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7905
[Intel XE#8150]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/8150
[Intel XE#8265]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/8265
[Intel XE#8355]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/8355
[Intel XE#8364]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/8364
[Intel XE#8365]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/8365
[Intel XE#8369]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/8369
[Intel XE#8374]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/8374
[Intel XE#8378]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/8378
[Intel XE#9271]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/9271
[Intel XE#9286]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/9286
[Intel XE#9362]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/9362
[Intel XE#9463]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/9463
[Intel XE#9530]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/9530
[Intel XE#9536]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/9536

Build changes
-------------

* Linux: xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb -> xe-pw-176975v3

IGT_9168: 9168
xe-6017-adaeb3881f12295309596acf2387c3f00b3050bb: adaeb3881f12295309596acf2387c3f00b3050bb
xe-pw-176975v3: 176975v3

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-176975v3/index.html

reviewer Reviewed-by on v6 1/3
#2 lore raw

Re: [PATCH v6 1/3] drm/xe: Bump the LRU on a successful page fault

In reply to Matthew Brost
Quoted 29 lines · Matthew Brost

Servicing a page fault validates the VMA's backing store and binds it, making the BO part of the VM's active working set, but unlike exec it never moves anything on the TTM LRU. In fault mode, where a VM may run for a long time without a single exec, the BOs the GPU actually touches therefore drift towards the LRU head and are picked by eviction and by the shrinker ahead of genuinely cold BOs.

Bump the BO's LRU on a successful page fault.

Fixes dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
---
  drivers/gpu/drm/xe/xe_pagefault.c | 7 +++++++
  1 file changed, 7 insertions(+)
drivers/gpu/drm/xe/xe_pagefault.c +2 -0
index 5247321c805e..6828f81df50e 100644
@@ -201,6 +201,8 @@ static int xe_pagefault_handle_vma(struct xe_gt *gt, struct xe_vma *vma,
  		xe_validation_ctx_init(&ctx, &vm->xe->val, &exec,
  				       (struct xe_val_flags) {});
  		drm_exec_until_all_locked(&exec) {
+			struct xe_bo *bo = xe_vma_bo(vma);
+
  			err = xe_pagefault_begin(&exec, vma, tile->mem.vram,
  						 needs_vram == 1);
  			drm_exec_retry_on_contention(&exec);

drivers/gpu/drm/xe/xe_pagefault.c static int xe_pagefault_handle_vma(struct xe_gt *gt, struct xe_vma *vma, · line 229

Quoted 7 lines
drivers/gpu/drm/xe/xe_pagefault.c +4 -0
@@ -221,6 +223,11 @@ static int xe_pagefault_handle_vma(struct xe_gt *gt, struct xe_vma *vma,
  				xe_pagefault_set_error(pf, XE_PAGEFAULT_ERROR_VMA_REBIND);
  				break;
  			}
+
+			if (bo) {
+				scoped_guard(spinlock, &vm->xe->ttm.lru_lock)
+					ttm_bo_move_to_lru_tail(&bo->ttm);

Would it be cleaner to just use ttm_bo_move_to_lru_tail_unlocked() without the scoped guard stuff?

Quoted 4 lines
drivers/gpu/drm/xe/xe_pagefault.c +1 -0
+			}
  		}
  		xe_validation_ctx_fini(&ctx);
  	} while (err == -EAGAIN);
maintainer
#6 lore raw

Re: [PATCH v6 2/3] drm/ttm: Allow skipping to the next priority in the bo LRU cursor

In reply to Matthew Brost

Hi,

Quoted 114 lines · Matthew Brost

Drivers walking a manager's LRU with ttm_bo_lru_for_each_reserved_guarded() may decide that the rest of the current priority isn't worth walking, for example when the priority is roughly age ordered and the walk hit a BO that is still too hot to evict. Today the only option is to stop the walk altogether, which also gives up on the remaining priorities.

Add ttm_resource_manager_next_priority() to move a resource cursor to the start of the next priority, and ttm_bo_lru_cursor_skip_priority() to make the next ttm_bo_lru_cursor_next() use it.

While at it, stop incrementing the cursor priority past the last valid priority once the iteration is done.

Assisted-by LLM
---
 drivers/gpu/drm/ttm/ttm_bo_util.c  |  3 +++
 drivers/gpu/drm/ttm/ttm_resource.c | 35 ++++++++++++++++++++++++++----
 include/drm/ttm/ttm_bo.h           | 19 ++++++++++++++++
 include/drm/ttm/ttm_resource.h     |  2 ++
 4 files changed, 55 insertions(+), 4 deletions(-)
drivers/gpu/drm/ttm/ttm_bo_util.c +3 -0
index f9458a4d5a09..d626f014e61f 100644
@@ -997,6 +997,9 @@ __ttm_bo_lru_cursor_next(struct ttm_bo_lru_cursor *curs)
 		if (first) {
 			res = ttm_resource_manager_first(&curs->res_curs);
 			first = false;
+		} else if (curs->skip_priority) {
+			res = ttm_resource_manager_next_priority(&curs->res_curs);
+			curs->skip_priority = false;
 		} else {
 			res = ttm_resource_manager_next(&curs->res_curs);
 		}
drivers/gpu/drm/ttm/ttm_resource.c +31 -4
index 4e6d3d658d85..e631507d7aa1 100644
@@ -674,6 +674,17 @@ ttm_resource_cursor_check_bulk(struct ttm_resource_cursor *cursor,
 	}
 }
 
+static bool ttm_resource_cursor_next_priority(struct ttm_resource_cursor *cursor)
+{
+	if (cursor->priority + 1 >= TTM_MAX_BO_PRIORITY)
+		return false;
+
+	list_move(&cursor->hitch.link, &cursor->man->lru[++cursor->priority]);
+	ttm_resource_cursor_clear_bulk(cursor);
+
+	return true;
+}
+
 /**
  * ttm_resource_manager_first() - Start iterating over the resources
  * of a resource manager
@@ -723,16 +734,32 @@ ttm_resource_manager_next(struct ttm_resource_cursor *cursor)
 			}
 		}
 
-		if (++cursor->priority >= TTM_MAX_BO_PRIORITY)
+		if (!ttm_resource_cursor_next_priority(cursor))
 			break;
-
-		list_move(&cursor->hitch.link, &man->lru[cursor->priority]);
-		ttm_resource_cursor_clear_bulk(cursor);
 	}
 
 	return NULL;
 }
 
+/**
+ * ttm_resource_manager_next_priority() - Skip the rest of the current
+ * priority and continue iterating at the next one
+ * @cursor: cursor to record the position
+ *
+ * Return: the first resource of the next non-empty priority, or NULL if
+ * there is none.
+ */
+struct ttm_resource *
+ttm_resource_manager_next_priority(struct ttm_resource_cursor *cursor)
+{
+	lockdep_assert_held(&cursor->man->bdev->lru_lock);
+
+	if (!ttm_resource_cursor_next_priority(cursor))
+		return NULL;
+
+	return ttm_resource_manager_next(cursor);
+}
+
 /**
  * ttm_lru_first_res_or_null() - Return the first resource on an lru list
  * @head: The list head of the lru list.
include/drm/ttm/ttm_bo.h +7 -0
index 32791c4db2a9..2fc517dbf03d 100644
@@ -507,10 +507,29 @@ struct ttm_bo_lru_cursor {
 	 * unlock before the next iteration or after loop exit.
 	 */
 	bool needs_unlock;
+	/**
+	 * @skip_priority: Continue at the next LRU priority on the next
+	 * iteration. See ttm_bo_lru_cursor_skip_priority().
+	 */
+	bool skip_priority;
 	/** @arg: Pointer to common BO LRU walk arguments. */
 	struct ttm_lru_walk_arg *arg;
 };
 
+/**
+ * ttm_bo_lru_cursor_skip_priority() - Skip the rest of the current priority

include/drm/ttm/ttm_bo.h struct ttm_bo_lru_cursor { · line 530

Quoted 10 lines
include/drm/ttm/ttm_bo.h +10 -0
+ * @curs: The cursor.
+ *
+ * Make the next ttm_bo_lru_cursor_next() skip the remaining buffer objects
+ * of the current LRU priority and continue at the next priority, for
+ * example when the caller decides the rest of the priority isn't worth
+ * walking.
+ */
+static inline void ttm_bo_lru_cursor_skip_priority(struct ttm_bo_lru_cursor *curs)
+{
+	curs->skip_priority = true;

Hm. I wonder if you could instead call ttm_bo_lru_cursor_cleanup_bo() here and then increment the priority (with proper checks). Then the normal LRU iteration should also select the first item on the proper priority's LRU.

It sort of conflicts the other refactoring you did, but doing things this way avoids adding more boolean flags and complexity in __ttm_bo_lru_cursor_next (which I'm not a huge fan of).

Best,
Natalie

Quoted 18 lines
include/drm/ttm/ttm_bo.h +2 -0
+}
+
 void ttm_bo_lru_cursor_fini(struct ttm_bo_lru_cursor *curs);
 
 struct ttm_bo_lru_cursor *
include/drm/ttm/ttm_resource.h +2 -0
index 714c533622c2..8cd70d1e5481 100644
@@ -499,6 +499,8 @@ struct ttm_resource *
 ttm_resource_manager_first(struct ttm_resource_cursor *cursor);
 struct ttm_resource *
 ttm_resource_manager_next(struct ttm_resource_cursor *cursor);
+struct ttm_resource *
+ttm_resource_manager_next_priority(struct ttm_resource_cursor *cursor);
 
 struct ttm_resource *
 ttm_lru_first_res_or_null(struct list_head *head);
author maintainer
#3 lore raw

Re: [PATCH v6 1/3] drm/xe: Bump the LRU on a successful page fault

In reply to Matthew Auld
Quoted 32 lines · Matthew Auld
Quoted 31 lines · Matthew Brost

Servicing a page fault validates the VMA's backing store and binds it, making the BO part of the VM's active working set, but unlike exec it never moves anything on the TTM LRU. In fault mode, where a VM may run for a long time without a single exec, the BOs the GPU actually touches therefore drift towards the LRU head and are picked by eviction and by the shrinker ahead of genuinely cold BOs.

Bump the BO's LRU on a successful page fault.

Fixes dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
---
  drivers/gpu/drm/xe/xe_pagefault.c | 7 +++++++
  1 file changed, 7 insertions(+)
drivers/gpu/drm/xe/xe_pagefault.c +2 -0
index 5247321c805e..6828f81df50e 100644
@@ -201,6 +201,8 @@ static int xe_pagefault_handle_vma(struct xe_gt *gt, struct xe_vma *vma,
  		xe_validation_ctx_init(&ctx, &vm->xe->val, &exec,
  				       (struct xe_val_flags) {});
  		drm_exec_until_all_locked(&exec) {
+			struct xe_bo *bo = xe_vma_bo(vma);
+
  			err = xe_pagefault_begin(&exec, vma, tile->mem.vram,
  						 needs_vram == 1);
  			drm_exec_retry_on_contention(&exec);
@@ -221,6 +223,11 @@ static int xe_pagefault_handle_vma(struct xe_gt *gt, struct xe_vma *vma,
  				xe_pagefault_set_error(pf, XE_PAGEFAULT_ERROR_VMA_REBIND);
  				break;
Quoted 9 lines

drivers/gpu/drm/xe/xe_pagefault.c static int xe_pagefault_handle_vma(struct xe_gt *gt, struct xe_vma *vma, · line 229

Quoted 5 lines
drivers/gpu/drm/xe/xe_pagefault.c +4 -0
  			}
+
+			if (bo) {
+				scoped_guard(spinlock, &vm->xe->ttm.lru_lock)
+					ttm_bo_move_to_lru_tail(&bo->ttm);

Would it be cleaner to just use ttm_bo_move_to_lru_tail_unlocked() without the scoped guard stuff?

Yes, that would be better. Will adjust.

Matt

Quoted 7 lines
Quoted 4 lines
drivers/gpu/drm/xe/xe_pagefault.c +1 -0
+			}
  		}
  		xe_validation_ctx_fini(&ctx);
  	} while (err == -EAGAIN);
author maintainer
#7 lore raw

Re: [PATCH v6 2/3] drm/ttm: Allow skipping to the next priority in the bo LRU cursor

In reply to Natalie Vock
Quoted 115 lines · Natalie Vock

Hi,

Quoted 112 lines · Matthew Brost

Drivers walking a manager's LRU with ttm_bo_lru_for_each_reserved_guarded() may decide that the rest of the current priority isn't worth walking, for example when the priority is roughly age ordered and the walk hit a BO that is still too hot to evict. Today the only option is to stop the walk altogether, which also gives up on the remaining priorities.

Add ttm_resource_manager_next_priority() to move a resource cursor to the start of the next priority, and ttm_bo_lru_cursor_skip_priority() to make the next ttm_bo_lru_cursor_next() use it.

While at it, stop incrementing the cursor priority past the last valid priority once the iteration is done.

Assisted-by LLM
---
 drivers/gpu/drm/ttm/ttm_bo_util.c  |  3 +++
 drivers/gpu/drm/ttm/ttm_resource.c | 35 ++++++++++++++++++++++++++----
 include/drm/ttm/ttm_bo.h           | 19 ++++++++++++++++
 include/drm/ttm/ttm_resource.h     |  2 ++
 4 files changed, 55 insertions(+), 4 deletions(-)
drivers/gpu/drm/ttm/ttm_bo_util.c +3 -0
index f9458a4d5a09..d626f014e61f 100644
@@ -997,6 +997,9 @@ __ttm_bo_lru_cursor_next(struct ttm_bo_lru_cursor *curs)
 		if (first) {
 			res = ttm_resource_manager_first(&curs->res_curs);
 			first = false;
+		} else if (curs->skip_priority) {
+			res = ttm_resource_manager_next_priority(&curs->res_curs);
+			curs->skip_priority = false;
 		} else {
 			res = ttm_resource_manager_next(&curs->res_curs);
 		}
drivers/gpu/drm/ttm/ttm_resource.c +31 -4
index 4e6d3d658d85..e631507d7aa1 100644
@@ -674,6 +674,17 @@ ttm_resource_cursor_check_bulk(struct ttm_resource_cursor *cursor,
 	}
 }
 
+static bool ttm_resource_cursor_next_priority(struct ttm_resource_cursor *cursor)
+{
+	if (cursor->priority + 1 >= TTM_MAX_BO_PRIORITY)
+		return false;
+
+	list_move(&cursor->hitch.link, &cursor->man->lru[++cursor->priority]);
+	ttm_resource_cursor_clear_bulk(cursor);
+
+	return true;
+}
+
 /**
  * ttm_resource_manager_first() - Start iterating over the resources
  * of a resource manager
@@ -723,16 +734,32 @@ ttm_resource_manager_next(struct ttm_resource_cursor *cursor)
 			}
 		}
 
-		if (++cursor->priority >= TTM_MAX_BO_PRIORITY)
+		if (!ttm_resource_cursor_next_priority(cursor))
 			break;
-
-		list_move(&cursor->hitch.link, &man->lru[cursor->priority]);
-		ttm_resource_cursor_clear_bulk(cursor);
 	}
 
 	return NULL;
 }
 
+/**
+ * ttm_resource_manager_next_priority() - Skip the rest of the current
+ * priority and continue iterating at the next one
+ * @cursor: cursor to record the position
+ *
+ * Return: the first resource of the next non-empty priority, or NULL if
+ * there is none.
+ */
+struct ttm_resource *
+ttm_resource_manager_next_priority(struct ttm_resource_cursor *cursor)
+{
+	lockdep_assert_held(&cursor->man->bdev->lru_lock);
+
+	if (!ttm_resource_cursor_next_priority(cursor))
+		return NULL;
+
+	return ttm_resource_manager_next(cursor);
+}
+
 /**
  * ttm_lru_first_res_or_null() - Return the first resource on an lru list
  * @head: The list head of the lru list.
include/drm/ttm/ttm_bo.h +5 -0
index 32791c4db2a9..2fc517dbf03d 100644
@@ -507,10 +507,29 @@ struct ttm_bo_lru_cursor {
 	 * unlock before the next iteration or after loop exit.
 	 */
 	bool needs_unlock;
+	/**
+	 * @skip_priority: Continue at the next LRU priority on the next
+	 * iteration. See ttm_bo_lru_cursor_skip_priority().
+	 */
+	bool skip_priority;
 	/** @arg: Pointer to common BO LRU walk arguments. */
 	struct ttm_lru_walk_arg *arg;
 };
 
Quoted 17 lines

include/drm/ttm/ttm_bo.h struct ttm_bo_lru_cursor { · line 530

Quoted 12 lines
include/drm/ttm/ttm_bo.h +12 -0
+/**
+ * ttm_bo_lru_cursor_skip_priority() - Skip the rest of the current priority
+ * @curs: The cursor.
+ *
+ * Make the next ttm_bo_lru_cursor_next() skip the remaining buffer objects
+ * of the current LRU priority and continue at the next priority, for
+ * example when the caller decides the rest of the priority isn't worth
+ * walking.
+ */
+static inline void ttm_bo_lru_cursor_skip_priority(struct ttm_bo_lru_cursor *curs)
+{
+	curs->skip_priority = true;

Hm. I wonder if you could instead call ttm_bo_lru_cursor_cleanup_bo() here and then increment the priority (with proper checks). Then the normal LRU iteration should also select the first item on the proper priority's LRU.

I don't think that quite works but agree getting ride of the bool should be doable.

I think we need to grab the lru spin lock here and move the hitch to end of the priority band and the next call to __ttm_bo_lru_cursor_next figures everything out with any modification or an extra bool.

Let me try this out.

Matt

Quoted 26 lines

It sort of conflicts the other refactoring you did, but doing things this way avoids adding more boolean flags and complexity in __ttm_bo_lru_cursor_next (which I'm not a huge fan of).

Best,
Natalie

Quoted 18 lines
include/drm/ttm/ttm_bo.h +2 -0
+}
+
 void ttm_bo_lru_cursor_fini(struct ttm_bo_lru_cursor *curs);
 
 struct ttm_bo_lru_cursor *
include/drm/ttm/ttm_resource.h +2 -0
index 714c533622c2..8cd70d1e5481 100644
@@ -499,6 +499,8 @@ struct ttm_resource *
 ttm_resource_manager_first(struct ttm_resource_cursor *cursor);
 struct ttm_resource *
 ttm_resource_manager_next(struct ttm_resource_cursor *cursor);
+struct ttm_resource *
+ttm_resource_manager_next_priority(struct ttm_resource_cursor *cursor);
 
 struct ttm_resource *
 ttm_lru_first_res_or_null(struct list_head *head);
maintainer Reviewed-by on v6 1/3
#4 lore raw

Re: [PATCH v6 1/3] drm/xe: Bump the LRU on a successful page fault

In reply to Matthew Brost
Quoted 11 lines · Matthew Brost

Servicing a page fault validates the VMA's backing store and binds it,
making the BO part of the VM's active working set, but unlike exec it never moves anything on the TTM LRU. In fault mode, where a VM may run
for a long time without a single exec, the BOs the GPU actually touches
therefore drift towards the LRU head and are picked by eviction and by
the shrinker ahead of genuinely cold BOs.

Quoted 5 lines

Bump the BO's LRU on a successful page fault.

Fixes dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel

GPUs")

Found the newer version:

Quoted 36 lines

---
 drivers/gpu/drm/xe/xe_pagefault.c | 7 +++++++

 1 file changed, 7 insertions(+)
drivers/gpu/drm/xe/xe_pagefault.c +2 -0
index 5247321c805e..6828f81df50e 100644
@@ -201,6 +201,8 @@ static int xe_pagefault_handle_vma(struct xe_gt
 *gt, struct xe_vma *vma,
  		xe_validation_ctx_init(&ctx, &vm->xe->val, &exec,
  				       (struct xe_val_flags) {});
  		drm_exec_until_all_locked(&exec) {
+			struct xe_bo *bo = xe_vma_bo(vma);
+

  err = xe_pagefault_begin(&exec, vma, tile-

Quoted 1 line

mem.vram,

  needs_vram == 1); drm_exec_retry_on_contention(&exec);

drivers/gpu/drm/xe/xe_pagefault.c +4 -0
@@ -221,6 +223,11 @@ static int xe_pagefault_handle_vma(struct xe_gt
 *gt, struct xe_vma *vma,
  				xe_pagefault_set_error(pf,
 XE_PAGEFAULT_ERROR_VMA_REBIND);
  				break;
  			}
+
+			if (bo) {
+				scoped_guard(spinlock, &vm->xe-
 >ttm.lru_lock)
+					ttm_bo_move_to_lru_tail(&bo-
Quoted 1 line

ttm);

drivers/gpu/drm/xe/xe_pagefault.c +1 -0
+			}

  }
  xe_validation_ctx_fini(&ctx);
  } while (err == -EAGAIN);

maintainer Reviewed-by on v6 2/3
#8 lore raw

Re: [PATCH v6 2/3] drm/ttm: Allow skipping to the next priority in the bo LRU cursor

In reply to Matthew Brost
Quoted 11 lines · Matthew Brost

Drivers walking a manager's LRU with ttm_bo_lru_for_each_reserved_guarded()
may decide that the rest of the current priority isn't worth walking, for example when the priority is roughly age ordered and the walk hit a BO that is still too hot to evict. Today the only option is to stop the walk altogether, which also gives up on the remaining priorities.

Add ttm_resource_manager_next_priority() to move a resource cursor to the start of the next priority, and ttm_bo_lru_cursor_skip_priority() to make the next ttm_bo_lru_cursor_next() use it.

Quoted 6 lines

While at it, stop incrementing the cursor priority past the last valid
priority once the iteration is done.

Assisted-by LLM
Quoted 151 lines

---
 drivers/gpu/drm/ttm/ttm_bo_util.c  |  3 +++ drivers/gpu/drm/ttm/ttm_resource.c | 35 ++++++++++++++++++++++++++-- --
 include/drm/ttm/ttm_bo.h           | 19 ++++++++++++++++ include/drm/ttm/ttm_resource.h     |  2 ++

 4 files changed, 55 insertions(+), 4 deletions(-)
drivers/gpu/drm/ttm/ttm_bo_util.c +0 -0
index f9458a4d5a09..d626f014e61f 100644
@@ -997,6 +997,9 @@ __ttm_bo_lru_cursor_next(struct ttm_bo_lru_cursor
 *curs)
  		if (first) {

  res = ttm_resource_manager_first(&curs-

Quoted 1 line

res_curs);

  first = false;

drivers/gpu/drm/ttm/ttm_bo_util.c +2 -0
+		} else if (curs->skip_priority) {
+			res =

ttm_resource_manager_next_priority(&curs->res_curs);

drivers/gpu/drm/ttm/ttm_bo_util.c +1 -0
+			curs->skip_priority = false;

  } else {
  res = ttm_resource_manager_next(&curs-

Quoted 1 line

res_curs);

  }

drivers/gpu/drm/ttm/ttm_resource.c +0 -0
index 4e6d3d658d85..e631507d7aa1 100644
@@ -674,6 +674,17 @@ ttm_resource_cursor_check_bulk(struct
 ttm_resource_cursor *cursor,
  	}
  }


+static bool ttm_resource_cursor_next_priority(struct ttm_resource_cursor *cursor)

drivers/gpu/drm/ttm/ttm_resource.c +5 -0
+{
+	if (cursor->priority + 1 >= TTM_MAX_BO_PRIORITY)
+		return false;
+
+	list_move(&cursor->hitch.link, &cursor->man->lru[++cursor-
Quoted 1 line

priority]);

drivers/gpu/drm/ttm/ttm_resource.c +5 -0
+	ttm_resource_cursor_clear_bulk(cursor);
+
+	return true;
+}
+

 /**
  * ttm_resource_manager_first() - Start iterating over the resources
  * of a resource manager

drivers/gpu/drm/ttm/ttm_resource.c +0 -0
@@ -723,16 +734,32 @@ ttm_resource_manager_next(struct
 ttm_resource_cursor *cursor)
  			}
  		}

drivers/gpu/drm/ttm/ttm_resource.c +1 -1
-		if (++cursor->priority >= TTM_MAX_BO_PRIORITY)
+		if (!ttm_resource_cursor_next_priority(cursor))

  break;

drivers/gpu/drm/ttm/ttm_resource.c +0 -2
-
-		list_move(&cursor->hitch.link, &man->lru[cursor-
Quoted 1 line

priority]);

drivers/gpu/drm/ttm/ttm_resource.c +0 -1
-		ttm_resource_cursor_clear_bulk(cursor);

  }

  return NULL;
 }

+/**
+ * ttm_resource_manager_next_priority() - Skip the rest of the current
+ * priority and continue iterating at the next one
+ * @cursor: cursor to record the position
+ *
+ * Return: the first resource of the next non-empty priority, or NULL if
+ * there is none.
+ */

drivers/gpu/drm/ttm/ttm_resource.c +2 -0
+struct ttm_resource *
+ttm_resource_manager_next_priority(struct ttm_resource_cursor

*cursor)

drivers/gpu/drm/ttm/ttm_resource.c +9 -0
+{
+	lockdep_assert_held(&cursor->man->bdev->lru_lock);
+
+	if (!ttm_resource_cursor_next_priority(cursor))
+		return NULL;
+
+	return ttm_resource_manager_next(cursor);
+}
+

 /**
  * ttm_lru_first_res_or_null() - Return the first resource on an lru list
  * @head: The list head of the lru list.

include/drm/ttm/ttm_bo.h +2 -0
index 32791c4db2a9..2fc517dbf03d 100644
@@ -507,10 +507,29 @@ struct ttm_bo_lru_cursor {
  	 * unlock before the next iteration or after loop exit.
  	 */
  	bool needs_unlock;
+	/**
+	 * @skip_priority: Continue at the next LRU priority on the

next

include/drm/ttm/ttm_bo.h +3 -0
+	 * iteration. See ttm_bo_lru_cursor_skip_priority().
+	 */
+	bool skip_priority;

  /** @arg: Pointer to common BO LRU walk arguments. */ struct ttm_lru_walk_arg *arg;
 };

+/**
+ * ttm_bo_lru_cursor_skip_priority() - Skip the rest of the current priority
+ * @curs: The cursor.
+ *
+ * Make the next ttm_bo_lru_cursor_next() skip the remaining buffer objects
+ * of the current LRU priority and continue at the next priority, for
+ * example when the caller decides the rest of the priority isn't worth
+ * walking.
+ */
+static inline void ttm_bo_lru_cursor_skip_priority(struct ttm_bo_lru_cursor *curs)

include/drm/ttm/ttm_bo.h +4 -0
+{
+	curs->skip_priority = true;
+}
+

 void ttm_bo_lru_cursor_fini(struct ttm_bo_lru_cursor *curs);
 struct ttm_bo_lru_cursor *

include/drm/ttm/ttm_resource.h +0 -0
index 714c533622c2..8cd70d1e5481 100644
@@ -499,6 +499,8 @@ struct ttm_resource *
  ttm_resource_manager_first(struct ttm_resource_cursor *cursor);

 struct ttm_resource * ttm_resource_manager_next(struct ttm_resource_cursor *cursor);

include/drm/ttm/ttm_resource.h +2 -0
+struct ttm_resource *
+ttm_resource_manager_next_priority(struct ttm_resource_cursor

*cursor);

 struct ttm_resource * ttm_lru_first_res_or_null(struct list_head *head);

#11 lore raw

Re: [PATCH v6 3/3] drm/xe: Add a minimum age gate to the shrinker

In reply to Matthew Brost
Quoted 42 lines · Matthew Brost

Backing up a BO costs a GPU blit plus a page copy, and if the BO is part
of an active working set it is faulted straight back in on the next exec.
Evicting a BO that was used moments ago is therefore almost always a loss, yet the shrinker has no notion of recency beyond LRU order.

Timestamp BOs wherever their LRU position is updated, and read the stamp
back from whatever owns that position. A BO in a VM's bulk move is anchored inside its range, so it is aged by the VM-wide stamp taken in
xe_vm_bump_lru() alongside the bulk move itself. Any other BO carries its own, stamped there too and on a successful move into TT in xe_bo_move(), where ttm_resource_alloc() has already placed the new resource at the LRU tail.

Add a per-device shrinker_min_age_ms sysfs attribute, defaulting to CONFIG_DRM_XE_SHRINKER_MIN_AGE_MS (0, disabled). While set, the shrinker
won't back up BOs younger than the delay. Each LRU priority is roughly
age ordered, so the gate is applied per priority: xe_shrinker_count() snoops the first shrinkable BO of each priority and reports nothing only
if all of them are young, and the backup walk skips to the next priority
at the first young BO, both as a backstop for the count sample and so a
hot priority doesn't shield colder BOs in another one.

Only BOs this shrinker would actually back up have a say. BOs in XE_PL_SYSTEM, which are not GPU mapped and hence not part of a working
set, and BOs xe_bo_shrink() rejects outright are never young. Purgeable
BOs and those advised DONTNEED are neither: they are dropped rather than
backed up and accounted to the purgeable shrinker, so they are never young and the count snoop skips their XE_BO_PRIORITY_LOW band entirely.

Quoted 5 lines

The gate is hard and applies at every reclaim priority, so a working set
kept younger than the delay is never backed up and can lead to OOM. This
is deliberate, and why it is off by default.

For completeness, Perhaps add to the commit message that the plan is to follow up with an OOM notifier?

I also wonder what happens during the PM notifier preparing for suspend on DGFX, Does that move mark bos accessed, hence possibly blocked by the shrinker at suspend time?

Quoted 701 lines
Assisted-by LLM

---
 drivers/gpu/drm/xe/Kconfig.profile   |  15 +++ drivers/gpu/drm/xe/xe_bo.c           |  83 ++++++++++++++ drivers/gpu/drm/xe/xe_bo.h           |   5 + drivers/gpu/drm/xe/xe_bo_types.h     |   8 ++ drivers/gpu/drm/xe/xe_device_sysfs.c |  35 ++++++ drivers/gpu/drm/xe/xe_pagefault.c    |   2 +- drivers/gpu/drm/xe/xe_shrinker.c     | 164
+++++++++++++++++++++++++--
 drivers/gpu/drm/xe/xe_shrinker.h     |   3 + drivers/gpu/drm/xe/xe_vm.c           |   4 +- drivers/gpu/drm/xe/xe_vm_types.h     |   8 ++

 10 files changed, 316 insertions(+), 11 deletions(-)
drivers/gpu/drm/xe/Kconfig.profile +0 -0
index 23045ed2aa94..dd3985e502b8 100644
@@ -74,6 +74,7 @@ config DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT

    to apply to applicable user. For elevated user, all above MIN
    and MAX values will apply when this configuration is enable to
    apply limitation. By default limitation is applied. +
 config DRM_XE_SHRINKER_NON_PURGEABLE_SEEKS
  int "Default seeks value of the non-purgeable bo shrinker" default 8

drivers/gpu/drm/xe/Kconfig.profile +0 -0
@@ -86,3 +87,17 @@ config DRM_XE_SHRINKER_NON_PURGEABLE_SEEKS

    reclaim pressure on non-purgeable buffer objects, which need
    GPU idling and writeback to be reclaimed, in favour of purgeable
    ones and other kernel caches.

drivers/gpu/drm/xe/Kconfig.profile +7 -0
+
+config DRM_XE_SHRINKER_MIN_AGE_MS
+	int "Default minimum BO age before shrinker backup (ms)"
+	default 0
+	range 0 1000000
+	help
+	  Default for the per-device shrinker_min_age_ms sysfs

attribute. The

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  shrinker won't back up a BO that was moved into TT, or

bumped on the

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  LRU by an exec, less than this many milliseconds ago. BOs

already

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  evicted to system memory are not part of a working set and

are

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  never protected. This applies at every reclaim priority: a

working

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  set kept younger than this is never backed up and can

cause OOM.

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  Only set if that risk is preferred over thrashing a hot

working

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  set. 0 disables.
drivers/gpu/drm/xe/xe_bo.c +0 -0
index 42a6aa1a2e4a..a4c0c6284a24 100644
@@ -1357,9 +1357,92 @@ static int xe_bo_move(struct ttm_buffer_object
 *ttm_bo, bool evict,
  		xe_tt_unmap_sg(xe, ttm_bo->ttm);
  	}

drivers/gpu/drm/xe/xe_bo.c +2 -0
+	/*
+	 * ttm_resource_alloc() already placed the new resource at

the tail of

drivers/gpu/drm/xe/xe_bo.c +1 -0
+	 * its LRU, or of @bo's bulk move, so only record when that

happened.

drivers/gpu/drm/xe/xe_bo.c +2 -0
+	 */
+	if (!ret && ttm_bo->resource && ttm_bo->resource->mem_type

== XE_PL_TT)

drivers/gpu/drm/xe/xe_bo.c +2 -0
+		WRITE_ONCE(bo->lru_stamp, jiffies);
+

  return ret;
 }

+/**
+ * xe_bo_bump_lru_locked() - Bump a BO on the LRU and stamp its last use
+ * @bo: The buffer object, reserved by the caller.
+ *
+ * Move @bo to the tail of its LRU and record the time for the shrinker's
+ * minimum age gate. Only meaningful for BOs outside a bulk move, since a
+ * BO in one is anchored inside its range and is bumped, and aged, with it.
+ * The caller must hold the device LRU lock.
+ */

drivers/gpu/drm/xe/xe_bo.c +8 -0
+void xe_bo_bump_lru_locked(struct xe_bo *bo)
+{
+	WRITE_ONCE(bo->lru_stamp, jiffies);
+	ttm_bo_move_to_lru_tail(&bo->ttm);
+}
+
+/**
+ * xe_bo_shrink_backup_candidate() - Whether the shrinker may back

up a BO
+ * @bo: The TTM buffer object, reserved by the caller.
+ *
+ * A BO is a backup candidate if backing it up is the only way to reclaim it.
+ * BOs advised DONTNEED, which sit at XE_BO_PRIORITY_LOW, and purgeable ones
+ * are not: their pages are simply dropped, which is cheap, and they are
+ * accounted to the purgeable shrinker. Neither are the BOs xe_bo_shrink()
+ * hands to xe_bo_shrink_purge() outright: ghost BOs, which aren't xe BOs,
+ * and BOs already freed and waiting to be reaped. Nor are BOs whose tt
+ * isn't TTM_TT_FLAG_EXTERNAL_MAPPABLE, which xe_bo_shrink() rejects.
+ *
+ * Return: true if @bo would be backed up by a non-purge shrink pass.
+ */

drivers/gpu/drm/xe/xe_bo.c +5 -0
+bool xe_bo_shrink_backup_candidate(struct ttm_buffer_object *bo)
+{
+	struct xe_ttm_tt *xe_tt;
+
+	if (!xe_bo_is_xe_bo(bo) || !kref_read(&bo->base.refcount) ||

!bo->ttm ||

drivers/gpu/drm/xe/xe_bo.c +1 -0
+	    !(bo->ttm->page_flags & TTM_TT_FLAG_EXTERNAL_MAPPABLE)

||

drivers/gpu/drm/xe/xe_bo.c +10 -0
+	    bo->priority <= XE_BO_PRIORITY_LOW)
+		return false;
+
+	xe_tt = container_of(bo->ttm, struct xe_ttm_tt, ttm);
+
+	return !xe_tt->purgeable;
+}
+
+/**
+ * xe_bo_shrink_too_young() - Whether a BO was used too recently to

shrink
+ * @bo: The TTM buffer object, reserved by the caller.
+ * @min_age: Minimum age in jiffies. 0 disables the check.
+ *
+ * The age is taken from whatever owns @bo's LRU position:
&xe_vm.lru_stamp
+ * if @bo rides along with a VM's bulk move, its own &xe_bo.lru_stamp if not.
+ *
+ * BOs that the shrink walk would not back up anyway are never considered
+ * young, see xe_bo_shrink_backup_candidate(). Neither are BOs in
+ * XE_PL_SYSTEM: they are not GPU mapped, hence not part of a working set,
+ * and must be moved back to TT, refreshing the stamp, before use.
+ *
+ * Return: true if @bo was touched less than @min_age jiffies ago.
+ */
+bool xe_bo_shrink_too_young(struct ttm_buffer_object *bo, unsigned long min_age)

drivers/gpu/drm/xe/xe_bo.c +17 -0
+{
+	struct xe_bo *xe_bo;
+	unsigned long stamp;
+
+	if (!min_age || bo->resource->mem_type == XE_PL_SYSTEM ||
+	    !xe_bo_shrink_backup_candidate(bo))
+		return false;
+
+	xe_bo = ttm_to_xe_bo(bo);
+	if (bo->bulk_move && xe_bo->vm)
+		stamp = READ_ONCE(xe_bo->vm->lru_stamp);
+	else
+		stamp = READ_ONCE(xe_bo->lru_stamp);
+
+	return stamp && time_before(jiffies, stamp + min_age);
+}
+

 static long xe_bo_shrink_purge(struct ttm_operation_ctx *ctx, struct ttm_buffer_object *bo, unsigned long *scanned)

drivers/gpu/drm/xe/xe_bo.h +0 -0
index 77b3a02e9b8e..65d4c638e8d8 100644
@@ -623,6 +623,11 @@ struct xe_bo_shrink_flags {
  	u32 writeback : 1;
  };

drivers/gpu/drm/xe/xe_bo.h +4 -0
+void xe_bo_bump_lru_locked(struct xe_bo *bo);
+
+bool xe_bo_shrink_backup_candidate(struct ttm_buffer_object *bo);
+bool xe_bo_shrink_too_young(struct ttm_buffer_object *bo, unsigned

long min_age);
+
 long xe_bo_shrink(struct ttm_operation_ctx *ctx, struct ttm_buffer_object *bo,
    const struct xe_bo_shrink_flags flags, unsigned long *scanned);

drivers/gpu/drm/xe/xe_bo_types.h +0 -0
index 0265fb314c77..f63b668c7134 100644
@@ -49,6 +49,14 @@ struct xe_bo {
  	u32 flags;
  	/** @vm: VM this BO is attached to, for extobj this will be

NULL */
  struct xe_vm *vm;

drivers/gpu/drm/xe/xe_bo_types.h +2 -0
+	/**
+	 * @lru_stamp: jiffies at the last LRU bump, done on a move

into TT

drivers/gpu/drm/xe/xe_bo_types.h +1 -0
+	 * and at exec time. Only describes the LRU position of a BO

outside

drivers/gpu/drm/xe/xe_bo_types.h +1 -0
+	 * a bulk move; BOs in one are aged by &xe_vm.lru_stamp

instead.

drivers/gpu/drm/xe/xe_bo_types.h +1 -0
+	 * Consulted by the shrinker's minimum age gate. Accessed

with

drivers/gpu/drm/xe/xe_bo_types.h +3 -0
+	 * READ_ONCE()/WRITE_ONCE().
+	 */
+	unsigned long lru_stamp;

  /**
  * @q: Queue this BO is attached to, mostly for LRC BO, NULL otherwise.
  * Protected by the BO dma_resv: readers must hold it across both the

drivers/gpu/drm/xe/xe_device_sysfs.c +0 -0
index ff5d25dd867c..26b1f71ed522 100644
@@ -38,6 +38,12 @@
   * 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.
+ *
+ * shrinker_min_age_ms - Report/change the minimum time, in ms, since a BO was
+ * last moved to TT or bumped on the LRU by an exec before the shrinker may
+ * back it up. BOs evicted to system memory are never protected. Defaults to
+ * CONFIG_DRM_XE_SHRINKER_MIN_AGE_MS, 0 disables. This applies at every
+ * reclaim priority, so a non-zero value can lead to OOM. */

 static ssize_t

drivers/gpu/drm/xe/xe_device_sysfs.c +0 -0
@@ -331,8 +337,37 @@ shrinker_non_purgeable_seeks_store(struct device
 *dev,


 static DEVICE_ATTR_RW(shrinker_non_purgeable_seeks);

drivers/gpu/drm/xe/xe_device_sysfs.c +2 -0
+static ssize_t
+shrinker_min_age_ms_show(struct device *dev, struct device_attribute

*attr,

drivers/gpu/drm/xe/xe_device_sysfs.c +5 -0
+			 char *buf)
+{
+	struct xe_device *xe = pdev_to_xe_device(to_pci_dev(dev));
+
+	return sysfs_emit(buf, "%u\n", xe_shrinker_min_age_ms(xe-
Quoted 1 line

mem.shrinker));

drivers/gpu/drm/xe/xe_device_sysfs.c +4 -0
+}
+
+static ssize_t
+shrinker_min_age_ms_store(struct device *dev, struct

device_attribute *attr,

drivers/gpu/drm/xe/xe_device_sysfs.c +17 -0
+			  const char *buff, size_t count)
+{
+	struct xe_device *xe = pdev_to_xe_device(to_pci_dev(dev));
+	unsigned int ms;
+	int ret;
+
+	ret = kstrtouint(buff, 0, &ms);
+	if (ret)
+		return ret;
+
+	xe_shrinker_set_min_age_ms(xe->mem.shrinker, ms);
+
+	return count;
+}
+
+static DEVICE_ATTR_RW(shrinker_min_age_ms);
+

 static struct attribute *shrinker_attrs[] = { &dev_attr_shrinker_non_purgeable_seeks.attr,

drivers/gpu/drm/xe/xe_device_sysfs.c +1 -0
+	&dev_attr_shrinker_min_age_ms.attr,

  NULL
 };

drivers/gpu/drm/xe/xe_pagefault.c +0 -0
index 6828f81df50e..895866d639f8 100644
@@ -226,7 +226,7 @@ static int xe_pagefault_handle_vma(struct xe_gt
 *gt, struct xe_vma *vma,


  if (bo) { scoped_guard(spinlock, &vm->xe-

Quoted 1 line

ttm.lru_lock)

drivers/gpu/drm/xe/xe_pagefault.c +0 -1
-					ttm_bo_move_to_lru_tail(&bo-
Quoted 1 line

ttm);

drivers/gpu/drm/xe/xe_pagefault.c +1 -0
+					xe_bo_bump_lru_locked(bo);

  }
  }
  xe_validation_ctx_fini(&ctx);

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
index c86455ea08d1..64e5e684f591 100644
@@ -39,6 +39,8 @@
   * @shrink: Pointer to the mm shrinker handling non-purgeable

(shrinkable) objects.
  * @purge_shrink: Pointer to the mm shrinker handling purgeable objects.
  * @pm_worker: Worker to wake up the device if required.
+ * @min_age_ms: Minimum BO age before backup, in ms. 0 disables. Defaults to
+ * CONFIG_DRM_XE_SHRINKER_MIN_AGE_MS, overridable through sysfs. */
 struct xe_shrinker {
  struct xe_device *xe;

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
@@ -50,6 +52,7 @@ struct xe_shrinker {
  	struct shrinker *shrink;
  	struct shrinker *purge_shrink;
  	struct work_struct pm_worker;
+	unsigned int min_age_ms;
  };


 static struct xe_shrinker *to_xe_shrinker(struct shrinker *shrink)

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -104,6 +107,7 @@ static void xe_shrinker_runtime_pm_put(struct

xe_shrinker *shrinker, bool runtim
 static int __xe_shrinker_walk(struct xe_shrinker *shrinker, struct ttm_operation_ctx *ctx, const struct xe_bo_shrink_flags flags,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			      unsigned long min_age,

        unsigned long to_scan, unsigned long *scanned,
        unsigned long *freed)
 {

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -136,6 +140,16 @@ static int __xe_shrinker_walk(struct xe_shrinker
 *shrinker,

  if (flags.purge && ttm_bo->priority > XE_BO_PRIORITY_LOW)
  break;

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+			/*
+			 * Each LRU priority is roughly age ordered,

so the

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			 * rest of this priority is most likely

young too.

drivers/gpu/drm/xe/xe_shrinker.c +3 -0
+			 * Move on to the next priority.
+			 */
+			if (xe_bo_shrink_too_young(ttm_bo, min_age))

{

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+				ttm_bo_lru_cursor_skip_priority(&cur

s);

drivers/gpu/drm/xe/xe_shrinker.c +3 -0
+				continue;
+			}
+

  if (!ttm_bo_shrink_suitable(ttm_bo, ctx)) continue;

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
@@ -171,6 +185,7 @@ static int __xe_shrinker_walk(struct xe_shrinker
 *shrinker,
  static int xe_shrinker_walk(struct xe_shrinker *shrinker,
  			    struct ttm_operation_ctx *ctx,
  			    const struct xe_bo_shrink_flags flags,
+			    unsigned long min_age,

      unsigned long to_scan, unsigned long *scanned,
      unsigned long *freed)
 {

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -180,26 +195,126 @@ static int xe_shrinker_walk(struct xe_shrinker
 *shrinker,


  swap(no_wait_gpu, ctx->no_wait_gpu);
  save_flags.writeback = false;

drivers/gpu/drm/xe/xe_shrinker.c +0 -1
-	ret = __xe_shrinker_walk(shrinker, ctx, save_flags, to_scan,

scanned,

drivers/gpu/drm/xe/xe_shrinker.c +2 -1
-				 freed);
+	ret = __xe_shrinker_walk(shrinker, ctx, save_flags, min_age,
+				 to_scan, scanned, freed);

  swap(no_wait_gpu, ctx->no_wait_gpu);
  if (ret || *scanned >= to_scan)
  return ret;

  if (!ctx->no_wait_gpu) {

drivers/gpu/drm/xe/xe_shrinker.c +0 -1
-		ret = __xe_shrinker_walk(shrinker, ctx, save_flags,

to_scan, scanned,

drivers/gpu/drm/xe/xe_shrinker.c +1 -1
-					 freed);
+		ret = __xe_shrinker_walk(shrinker, ctx, save_flags,

min_age,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+					 to_scan, scanned, freed);

  if (ret || *scanned >= to_scan)
  return ret;
  }

  if (flags.writeback)

drivers/gpu/drm/xe/xe_shrinker.c +0 -1
-		ret = __xe_shrinker_walk(shrinker, ctx, flags,

to_scan, scanned,

drivers/gpu/drm/xe/xe_shrinker.c +1 -1
-					 freed);
+		ret = __xe_shrinker_walk(shrinker, ctx, flags,

min_age,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+					 to_scan, scanned, freed);


  return ret;
 }

+/**
+ * DOC: Shrinker minimum age
+ *
+ * The per-device shrinker_min_age_ms sysfs attribute, defaulting to
+ * CONFIG_DRM_XE_SHRINKER_MIN_AGE_MS, protects recently used BOs from backup.
+ * A BO's age is taken from whatever owns its position on the LRU, and is
+ * stamped wherever that position is updated: the VM-wide stamp for a BO
+ * riding along with a VM's bulk move, bumped on exec in xe_vm_bump_lru(),
+ * its own stamp otherwise, bumped there as well and on a move into TT in
+ * xe_bo_move(). BOs in XE_PL_SYSTEM are never young: they are not GPU
+ * mapped, so not part of a working set, and will be stamped again when
+ * moved back to TT for use.
+ *
+ * The gate is applied per LRU priority, each of which is roughly age
+ * ordered. xe_shrinker_count() snoops the first shrinkable BO of each
+ * priority on each TT-backed LRU. Only if all of them are young does it stop
+ * reporting shrinkable pages; anything else, including reaching no verdict
+ * at all, lets it report. The backup walk in xe_shrinker_scan() skips to the
+ * next priority at the first young BO, as a backstop since the count snoop
+ * is only a sample. A hot priority thus doesn't shield colder BOs in another
+ * priority. BOs that aren't backed up anyway have no say either
way: those
+ * in XE_PL_SYSTEM are never young, and purgeable and DONTNEED ones, which
+ * belong to the purgeable shrinker, are ignored by the snoop entirely.
+ *
+ * The gate is hard and applies at every reclaim priority. A working set kept
+ * younger than the delay is never backed up, which can lead to OOM. This is
+ * intended for users who prefer that risk over thrashing a hot working set,
+ * hence it is disabled by default.
+ */
+static unsigned long xe_shrinker_min_age(struct xe_shrinker *shrinker)

drivers/gpu/drm/xe/xe_shrinker.c +7 -0
+{
+	unsigned int ms = READ_ONCE(shrinker->min_age_ms);
+
+	return ms ? msecs_to_jiffies(ms) : 0;
+}
+
+/* Max shrink-unsuitable BOs to skip per LRU before giving up the

snoop. */

drivers/gpu/drm/xe/xe_shrinker.c +4 -0
+#define XE_SHRINKER_SNOOP_MAX	16
+
+/*
+ * Whether the first BO of every priority on every TT-backed LRU

that this
+ * shrinker would back up is younger than @min_age. BOs are trylocked through
+ * the reserved LRU walker since their tt may be torn down while still on the
+ * LRU. Contended BOs are skipped by the walker, and may be all of them. If no
+ * verdict can be reached, because nothing was inspected or the snoop budget
+ * ran out, report not young and leave it to the scan side check.
+ */

drivers/gpu/drm/xe/xe_shrinker.c +14 -0
+static bool xe_shrinker_lru_young(struct xe_shrinker *shrinker,
+				  unsigned long min_age)
+{
+	struct ttm_operation_ctx ctx = {
+		.interruptible = false,
+		.no_wait_gpu = false,
+	};
+	struct xe_device *xe = shrinker->xe;
+	unsigned int mem_type;
+	bool young = false;
+
+	for (mem_type = XE_PL_SYSTEM; mem_type <= XE_PL_TT;
++mem_type) {
+		struct ttm_resource_manager *man =

ttm_manager_type(&xe->ttm, mem_type);

drivers/gpu/drm/xe/xe_shrinker.c +12 -0
+		struct ttm_bo_lru_cursor curs;
+		struct ttm_buffer_object *ttm_bo;
+		struct ttm_lru_walk_arg arg = {
+			.ctx = &ctx,
+			.trylock_only = true,
+		};
+		unsigned int budget = XE_SHRINKER_SNOOP_MAX;
+
+		if (!man || !man->use_tt)
+			continue;
+
+		ttm_bo_lru_for_each_reserved_guarded(&curs, man,

&arg, ttm_bo) {

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+			/*
+			 * Nothing in the DONTNEED band is backed

up, and it

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			 * is accounted to the purgeable shrinker,

so it has

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			 * no say here. Skip the whole band in one

go.

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+			 */
+			if (ttm_bo->priority <= XE_BO_PRIORITY_LOW)

{

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+				ttm_bo_lru_cursor_skip_priority(&cur

s);

drivers/gpu/drm/xe/xe_shrinker.c +5 -0
+				continue;
+			}
+
+			if (!ttm_bo_shrink_suitable(ttm_bo, &ctx) ||
+			    !xe_bo_shrink_backup_candidate(ttm_bo))

{

drivers/gpu/drm/xe/xe_shrinker.c +6 -0
+				if (!--budget)
+					return false;
+				continue;
+			}
+
+			if (!xe_bo_shrink_too_young(ttm_bo,

min_age))

drivers/gpu/drm/xe/xe_shrinker.c +10 -0
+				return false;
+
+			young = true;
+			ttm_bo_lru_cursor_skip_priority(&curs);
+		}
+	}
+
+	return young;
+}
+

 static unsigned long xe_shrinker_count_purgeable(struct shrinker *shrink, struct shrink_control *sc)
 {

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -239,7 +354,7 @@ static unsigned long

 xe_shrinker_count(struct shrinker *shrink, struct shrink_control *sc)
 {
  struct xe_shrinker *shrinker = to_xe_shrinker(shrink);

drivers/gpu/drm/xe/xe_shrinker.c +1 -1
-	unsigned long num_pages;
+	unsigned long num_pages, min_age;

  bool can_backup = !!(sc->gfp_mask & __GFP_FS);
  if (!can_backup)

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -263,6 +378,10 @@ xe_shrinker_count(struct shrinker *shrink,
 struct shrink_control *sc)


  write_unlock(&shrinker->lock);

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+	min_age = xe_shrinker_min_age(shrinker);
+	if (num_pages && min_age && xe_shrinker_lru_young(shrinker,

min_age))

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+		return SHRINK_EMPTY;
+

  return num_pages ? num_pages : SHRINK_EMPTY; }

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -297,7 +416,8 @@ static unsigned long
 xe_shrinker_scan_purgeable(struct shrinker *shrink,
  		.purge = true,
  	};

drivers/gpu/drm/xe/xe_shrinker.c +0 -1
-	xe_shrinker_walk(shrinker, &ctx, shrink_flags, nr_to_scan,

&nr_scanned, &freed);

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+	xe_shrinker_walk(shrinker, &ctx, shrink_flags, 0,

nr_to_scan, &nr_scanned,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			 &freed);


  sc->nr_scanned = nr_scanned;

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -322,7 +442,9 @@ static unsigned long xe_shrinker_scan(struct

shrinker *shrink, struct shrink_con
  /* Might need runtime PM to access backed-up or CCS- compressed data. */
  runtime_pm = xe_shrinker_runtime_pm_get(shrinker);

drivers/gpu/drm/xe/xe_shrinker.c +0 -1
-	xe_shrinker_walk(shrinker, &ctx, shrink_flags, nr_to_scan,

&nr_scanned, &freed);

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+	xe_shrinker_walk(shrinker, &ctx, shrink_flags,
+			 xe_shrinker_min_age(shrinker), nr_to_scan,

&nr_scanned,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			 &freed);


  sc->nr_scanned = nr_scanned; xe_shrinker_runtime_pm_put(shrinker, runtime_pm);

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -387,6 +509,29 @@ int xe_shrinker_set_non_purgeable_seeks(struct
 xe_shrinker *shrinker,
  	return 0;
  }


+/**
+ * xe_shrinker_min_age_ms() - Get the shrinker minimum BO age
+ * @shrinker: Pointer to the struct xe_shrinker.
+ *
+ * Return: Minimum age, in ms, a BO must reach before it may be backed up.
+ */

drivers/gpu/drm/xe/xe_shrinker.c +13 -0
+unsigned int xe_shrinker_min_age_ms(struct xe_shrinker *shrinker)
+{
+	return READ_ONCE(shrinker->min_age_ms);
+}
+
+/**
+ * xe_shrinker_set_min_age_ms() - Set the shrinker minimum BO age
+ * @shrinker: Pointer to the struct xe_shrinker.
+ * @ms: Minimum age, in ms. 0 disables the gate.
+ *
+ * See DOC: Shrinker minimum age. A non-zero value can lead to OOM.
+ */
+void xe_shrinker_set_min_age_ms(struct xe_shrinker *shrinker,

unsigned int ms)

drivers/gpu/drm/xe/xe_shrinker.c +4 -0
+{
+	WRITE_ONCE(shrinker->min_age_ms, ms);
+}
+

 /**
  * xe_shrinker_create() - Create an xe per-device shrinker
  * @xe: Pointer to the xe device.

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -415,6 +560,7 @@ int xe_shrinker_create(struct xe_device *xe)


  INIT_WORK(&shrinker->pm_worker, xe_shrinker_pm); shrinker->xe = xe;

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+	shrinker->min_age_ms = CONFIG_DRM_XE_SHRINKER_MIN_AGE_MS;

  rwlock_init(&shrinker->lock);

  shrinker->purge_shrink->count_objects =
xe_shrinker_count_purgeable;

drivers/gpu/drm/xe/xe_shrinker.h +0 -0
index 4b3c73689619..586d7772bd58 100644
@@ -18,4 +18,7 @@ int xe_shrinker_non_purgeable_seeks(struct
 xe_shrinker *shrinker);

 int xe_shrinker_set_non_purgeable_seeks(struct xe_shrinker *shrinker,
  unsigned int seeks);

drivers/gpu/drm/xe/xe_shrinker.h +2 -0
+unsigned int xe_shrinker_min_age_ms(struct xe_shrinker *shrinker);
+void xe_shrinker_set_min_age_ms(struct xe_shrinker *shrinker,

unsigned int ms);
+
 #endif

drivers/gpu/drm/xe/xe_vm.c +0 -0
index 86c3b4fd232f..583c55b7f97d 100644
@@ -463,13 +463,15 @@ void xe_vm_bump_lru(struct xe_vm *vm, struct
 drm_exec *exec)
  	spinlock_t *lru_lock = &vm->xe->ttm.lru_lock;
  	struct drm_gem_object *obj;

drivers/gpu/drm/xe/xe_vm.c +2 -0
+	WRITE_ONCE(vm->lru_stamp, jiffies);
+

  spin_lock(lru_lock); ttm_lru_bulk_move_tail(&vm->lru_bulk_move); drm_exec_for_each_locked_object(exec, obj) { if (!drm_gpuvm_is_extobj(&vm->gpuvm, obj)) continue;

drivers/gpu/drm/xe/xe_vm.c +1 -1
-		ttm_bo_move_to_lru_tail(&gem_to_xe_bo(obj)->ttm);
+		xe_bo_bump_lru_locked(gem_to_xe_bo(obj));

  cond_resched_lock(lru_lock);
  }
  spin_unlock(lru_lock);

drivers/gpu/drm/xe/xe_vm_types.h +0 -0
index fb9305124679..046505a285e9 100644
@@ -267,6 +267,14 @@ struct xe_vm {
  	/** @lru_bulk_move: Bulk LRU move list for this VM's BOs */
  	struct ttm_lru_bulk_move lru_bulk_move;

drivers/gpu/drm/xe/xe_vm_types.h +2 -0
+	/**
+	 * @lru_stamp: jiffies at the last xe_vm_bump_lru(), which

is where

drivers/gpu/drm/xe/xe_vm_types.h +1 -0
+	 * @lru_bulk_move is moved to the LRU tail. Ages every BO in

that

drivers/gpu/drm/xe/xe_vm_types.h +1 -0
+	 * bulk move for the shrinker's minimum age gate. Accessed

with

drivers/gpu/drm/xe/xe_vm_types.h

Quoted 3 lines
drivers/gpu/drm/xe/xe_vm_types.h +3 -0
+	 * READ_ONCE()/WRITE_ONCE().
+	 */
+	unsigned long lru_stamp;

Isn't the bo resv / vm resv always held then this is accessed?

Thanks,
Thomas

Quoted 4 lines

+
  u64 size;

  struct xe_pt *pt_root[XE_MAX_TILES_PER_DEVICE];

author maintainer
#12 lore raw

Re: [PATCH v6 3/3] drm/xe: Add a minimum age gate to the shrinker

Quoted 43 lines · Thomas Hellström
Quoted 42 lines · Matthew Brost

Backing up a BO costs a GPU blit plus a page copy, and if the BO is part
of an active working set it is faulted straight back in on the next exec.
Evicting a BO that was used moments ago is therefore almost always a loss, yet the shrinker has no notion of recency beyond LRU order.

Timestamp BOs wherever their LRU position is updated, and read the stamp
back from whatever owns that position. A BO in a VM's bulk move is anchored inside its range, so it is aged by the VM-wide stamp taken in
xe_vm_bump_lru() alongside the bulk move itself. Any other BO carries its own, stamped there too and on a successful move into TT in xe_bo_move(), where ttm_resource_alloc() has already placed the new resource at the LRU tail.

Add a per-device shrinker_min_age_ms sysfs attribute, defaulting to CONFIG_DRM_XE_SHRINKER_MIN_AGE_MS (0, disabled). While set, the shrinker
won't back up BOs younger than the delay. Each LRU priority is roughly
age ordered, so the gate is applied per priority: xe_shrinker_count() snoops the first shrinkable BO of each priority and reports nothing only
if all of them are young, and the backup walk skips to the next priority
at the first young BO, both as a backstop for the count sample and so a
hot priority doesn't shield colder BOs in another one.

Only BOs this shrinker would actually back up have a say. BOs in XE_PL_SYSTEM, which are not GPU mapped and hence not part of a working
set, and BOs xe_bo_shrink() rejects outright are never young. Purgeable
BOs and those advised DONTNEED are neither: they are dropped rather than
backed up and accounted to the purgeable shrinker, so they are never young and the count snoop skips their XE_BO_PRIORITY_LOW band entirely.

Quoted 9 lines
Quoted 5 lines

The gate is hard and applies at every reclaim priority, so a working set
kept younger than the delay is never backed up and can lead to OOM. This
is deliberate, and why it is off by default.

For completeness, Perhaps add to the commit message that the plan is to follow up with an OOM notifier?

That is a possible option. Another idea I had was if we can get the priority exported from the shrinker core - we have a config knob that says 'at this priority or greater', shrink BOs which have been used recently.

Quoted 4 lines

I also wonder what happens during the PM notifier preparing for suspend on DGFX, Does that move mark bos accessed, hence possibly blocked by the shrinker at suspend time?

I haven't tried this on DGFX, can give it try but this off by default.

I'm also a little confused by this - does the shrinker run at suspend time? I thought once the memory in ram a hiberation image in created from the that - i.e., there isn't a requirement the BOs to get shrunk into shmem.

Quoted 698 lines
Quoted 698 lines
Assisted-by LLM

---
 drivers/gpu/drm/xe/Kconfig.profile   |  15 +++ drivers/gpu/drm/xe/xe_bo.c           |  83 ++++++++++++++ drivers/gpu/drm/xe/xe_bo.h           |   5 + drivers/gpu/drm/xe/xe_bo_types.h     |   8 ++ drivers/gpu/drm/xe/xe_device_sysfs.c |  35 ++++++ drivers/gpu/drm/xe/xe_pagefault.c    |   2 +- drivers/gpu/drm/xe/xe_shrinker.c     | 164
+++++++++++++++++++++++++--
 drivers/gpu/drm/xe/xe_shrinker.h     |   3 + drivers/gpu/drm/xe/xe_vm.c           |   4 +- drivers/gpu/drm/xe/xe_vm_types.h     |   8 ++

 10 files changed, 316 insertions(+), 11 deletions(-)
drivers/gpu/drm/xe/Kconfig.profile +0 -0
index 23045ed2aa94..dd3985e502b8 100644
@@ -74,6 +74,7 @@ config DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT

    to apply to applicable user. For elevated user, all above MIN
    and MAX values will apply when this configuration is enable to
    apply limitation. By default limitation is applied. +
 config DRM_XE_SHRINKER_NON_PURGEABLE_SEEKS
  int "Default seeks value of the non-purgeable bo shrinker" default 8

drivers/gpu/drm/xe/Kconfig.profile +0 -0
@@ -86,3 +87,17 @@ config DRM_XE_SHRINKER_NON_PURGEABLE_SEEKS

    reclaim pressure on non-purgeable buffer objects, which need
    GPU idling and writeback to be reclaimed, in favour of purgeable
    ones and other kernel caches.

drivers/gpu/drm/xe/Kconfig.profile +7 -0
+
+config DRM_XE_SHRINKER_MIN_AGE_MS
+	int "Default minimum BO age before shrinker backup (ms)"
+	default 0
+	range 0 1000000
+	help
+	  Default for the per-device shrinker_min_age_ms sysfs

attribute. The

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  shrinker won't back up a BO that was moved into TT, or

bumped on the

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  LRU by an exec, less than this many milliseconds ago. BOs

already

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  evicted to system memory are not part of a working set and

are

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  never protected. This applies at every reclaim priority: a

working

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  set kept younger than this is never backed up and can

cause OOM.

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  Only set if that risk is preferred over thrashing a hot

working

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  set. 0 disables.
drivers/gpu/drm/xe/xe_bo.c +0 -0
index 42a6aa1a2e4a..a4c0c6284a24 100644
@@ -1357,9 +1357,92 @@ static int xe_bo_move(struct ttm_buffer_object
 *ttm_bo, bool evict,
  		xe_tt_unmap_sg(xe, ttm_bo->ttm);
  	}

drivers/gpu/drm/xe/xe_bo.c +2 -0
+	/*
+	 * ttm_resource_alloc() already placed the new resource at

the tail of

drivers/gpu/drm/xe/xe_bo.c +1 -0
+	 * its LRU, or of @bo's bulk move, so only record when that

happened.

drivers/gpu/drm/xe/xe_bo.c +2 -0
+	 */
+	if (!ret && ttm_bo->resource && ttm_bo->resource->mem_type

== XE_PL_TT)

drivers/gpu/drm/xe/xe_bo.c +2 -0
+		WRITE_ONCE(bo->lru_stamp, jiffies);
+

  return ret;
 }

+/**
+ * xe_bo_bump_lru_locked() - Bump a BO on the LRU and stamp its last use
+ * @bo: The buffer object, reserved by the caller.
+ *
+ * Move @bo to the tail of its LRU and record the time for the shrinker's
+ * minimum age gate. Only meaningful for BOs outside a bulk move, since a
+ * BO in one is anchored inside its range and is bumped, and aged, with it.
+ * The caller must hold the device LRU lock.
+ */

drivers/gpu/drm/xe/xe_bo.c +8 -0
+void xe_bo_bump_lru_locked(struct xe_bo *bo)
+{
+	WRITE_ONCE(bo->lru_stamp, jiffies);
+	ttm_bo_move_to_lru_tail(&bo->ttm);
+}
+
+/**
+ * xe_bo_shrink_backup_candidate() - Whether the shrinker may back

up a BO
+ * @bo: The TTM buffer object, reserved by the caller.
+ *
+ * A BO is a backup candidate if backing it up is the only way to reclaim it.
+ * BOs advised DONTNEED, which sit at XE_BO_PRIORITY_LOW, and purgeable ones
+ * are not: their pages are simply dropped, which is cheap, and they are
+ * accounted to the purgeable shrinker. Neither are the BOs xe_bo_shrink()
+ * hands to xe_bo_shrink_purge() outright: ghost BOs, which aren't xe BOs,
+ * and BOs already freed and waiting to be reaped. Nor are BOs whose tt
+ * isn't TTM_TT_FLAG_EXTERNAL_MAPPABLE, which xe_bo_shrink() rejects.
+ *
+ * Return: true if @bo would be backed up by a non-purge shrink pass.
+ */

drivers/gpu/drm/xe/xe_bo.c +5 -0
+bool xe_bo_shrink_backup_candidate(struct ttm_buffer_object *bo)
+{
+	struct xe_ttm_tt *xe_tt;
+
+	if (!xe_bo_is_xe_bo(bo) || !kref_read(&bo->base.refcount) ||

!bo->ttm ||

drivers/gpu/drm/xe/xe_bo.c +1 -0
+	    !(bo->ttm->page_flags & TTM_TT_FLAG_EXTERNAL_MAPPABLE)

||

drivers/gpu/drm/xe/xe_bo.c +10 -0
+	    bo->priority <= XE_BO_PRIORITY_LOW)
+		return false;
+
+	xe_tt = container_of(bo->ttm, struct xe_ttm_tt, ttm);
+
+	return !xe_tt->purgeable;
+}
+
+/**
+ * xe_bo_shrink_too_young() - Whether a BO was used too recently to

shrink
+ * @bo: The TTM buffer object, reserved by the caller.
+ * @min_age: Minimum age in jiffies. 0 disables the check.
+ *
+ * The age is taken from whatever owns @bo's LRU position:
&xe_vm.lru_stamp
+ * if @bo rides along with a VM's bulk move, its own &xe_bo.lru_stamp if not.
+ *
+ * BOs that the shrink walk would not back up anyway are never considered
+ * young, see xe_bo_shrink_backup_candidate(). Neither are BOs in
+ * XE_PL_SYSTEM: they are not GPU mapped, hence not part of a working set,
+ * and must be moved back to TT, refreshing the stamp, before use.
+ *
+ * Return: true if @bo was touched less than @min_age jiffies ago.
+ */
+bool xe_bo_shrink_too_young(struct ttm_buffer_object *bo, unsigned long min_age)

drivers/gpu/drm/xe/xe_bo.c +17 -0
+{
+	struct xe_bo *xe_bo;
+	unsigned long stamp;
+
+	if (!min_age || bo->resource->mem_type == XE_PL_SYSTEM ||
+	    !xe_bo_shrink_backup_candidate(bo))
+		return false;
+
+	xe_bo = ttm_to_xe_bo(bo);
+	if (bo->bulk_move && xe_bo->vm)
+		stamp = READ_ONCE(xe_bo->vm->lru_stamp);
+	else
+		stamp = READ_ONCE(xe_bo->lru_stamp);
+
+	return stamp && time_before(jiffies, stamp + min_age);
+}
+

 static long xe_bo_shrink_purge(struct ttm_operation_ctx *ctx, struct ttm_buffer_object *bo, unsigned long *scanned)

drivers/gpu/drm/xe/xe_bo.h +0 -0
index 77b3a02e9b8e..65d4c638e8d8 100644
@@ -623,6 +623,11 @@ struct xe_bo_shrink_flags {
  	u32 writeback : 1;
  };

drivers/gpu/drm/xe/xe_bo.h +4 -0
+void xe_bo_bump_lru_locked(struct xe_bo *bo);
+
+bool xe_bo_shrink_backup_candidate(struct ttm_buffer_object *bo);
+bool xe_bo_shrink_too_young(struct ttm_buffer_object *bo, unsigned

long min_age);
+
 long xe_bo_shrink(struct ttm_operation_ctx *ctx, struct ttm_buffer_object *bo,
    const struct xe_bo_shrink_flags flags, unsigned long *scanned);

drivers/gpu/drm/xe/xe_bo_types.h +0 -0
index 0265fb314c77..f63b668c7134 100644
@@ -49,6 +49,14 @@ struct xe_bo {
  	u32 flags;
  	/** @vm: VM this BO is attached to, for extobj this will be

NULL */
  struct xe_vm *vm;

drivers/gpu/drm/xe/xe_bo_types.h +2 -0
+	/**
+	 * @lru_stamp: jiffies at the last LRU bump, done on a move

into TT

drivers/gpu/drm/xe/xe_bo_types.h +1 -0
+	 * and at exec time. Only describes the LRU position of a BO

outside

drivers/gpu/drm/xe/xe_bo_types.h +1 -0
+	 * a bulk move; BOs in one are aged by &xe_vm.lru_stamp

instead.

drivers/gpu/drm/xe/xe_bo_types.h +1 -0
+	 * Consulted by the shrinker's minimum age gate. Accessed

with

drivers/gpu/drm/xe/xe_bo_types.h +3 -0
+	 * READ_ONCE()/WRITE_ONCE().
+	 */
+	unsigned long lru_stamp;

  /**
  * @q: Queue this BO is attached to, mostly for LRC BO, NULL otherwise.
  * Protected by the BO dma_resv: readers must hold it across both the

drivers/gpu/drm/xe/xe_device_sysfs.c +0 -0
index ff5d25dd867c..26b1f71ed522 100644
@@ -38,6 +38,12 @@
   * 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.
+ *
+ * shrinker_min_age_ms - Report/change the minimum time, in ms, since a BO was
+ * last moved to TT or bumped on the LRU by an exec before the shrinker may
+ * back it up. BOs evicted to system memory are never protected. Defaults to
+ * CONFIG_DRM_XE_SHRINKER_MIN_AGE_MS, 0 disables. This applies at every
+ * reclaim priority, so a non-zero value can lead to OOM. */

 static ssize_t

drivers/gpu/drm/xe/xe_device_sysfs.c +0 -0
@@ -331,8 +337,37 @@ shrinker_non_purgeable_seeks_store(struct device
 *dev,


 static DEVICE_ATTR_RW(shrinker_non_purgeable_seeks);

drivers/gpu/drm/xe/xe_device_sysfs.c +2 -0
+static ssize_t
+shrinker_min_age_ms_show(struct device *dev, struct device_attribute

*attr,

drivers/gpu/drm/xe/xe_device_sysfs.c +5 -0
+			 char *buf)
+{
+	struct xe_device *xe = pdev_to_xe_device(to_pci_dev(dev));
+
+	return sysfs_emit(buf, "%u\n", xe_shrinker_min_age_ms(xe-
Quoted 1 line

mem.shrinker));

drivers/gpu/drm/xe/xe_device_sysfs.c +4 -0
+}
+
+static ssize_t
+shrinker_min_age_ms_store(struct device *dev, struct

device_attribute *attr,

drivers/gpu/drm/xe/xe_device_sysfs.c +17 -0
+			  const char *buff, size_t count)
+{
+	struct xe_device *xe = pdev_to_xe_device(to_pci_dev(dev));
+	unsigned int ms;
+	int ret;
+
+	ret = kstrtouint(buff, 0, &ms);
+	if (ret)
+		return ret;
+
+	xe_shrinker_set_min_age_ms(xe->mem.shrinker, ms);
+
+	return count;
+}
+
+static DEVICE_ATTR_RW(shrinker_min_age_ms);
+

 static struct attribute *shrinker_attrs[] = { &dev_attr_shrinker_non_purgeable_seeks.attr,

drivers/gpu/drm/xe/xe_device_sysfs.c +1 -0
+	&dev_attr_shrinker_min_age_ms.attr,

  NULL
 };

drivers/gpu/drm/xe/xe_pagefault.c +0 -0
index 6828f81df50e..895866d639f8 100644
@@ -226,7 +226,7 @@ static int xe_pagefault_handle_vma(struct xe_gt
 *gt, struct xe_vma *vma,


  if (bo) { scoped_guard(spinlock, &vm->xe-

Quoted 1 line

ttm.lru_lock)

drivers/gpu/drm/xe/xe_pagefault.c +0 -1
-					ttm_bo_move_to_lru_tail(&bo-
Quoted 1 line

ttm);

drivers/gpu/drm/xe/xe_pagefault.c +1 -0
+					xe_bo_bump_lru_locked(bo);

  }
  }
  xe_validation_ctx_fini(&ctx);

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
index c86455ea08d1..64e5e684f591 100644
@@ -39,6 +39,8 @@
   * @shrink: Pointer to the mm shrinker handling non-purgeable

(shrinkable) objects.
  * @purge_shrink: Pointer to the mm shrinker handling purgeable objects.
  * @pm_worker: Worker to wake up the device if required.
+ * @min_age_ms: Minimum BO age before backup, in ms. 0 disables. Defaults to
+ * CONFIG_DRM_XE_SHRINKER_MIN_AGE_MS, overridable through sysfs. */
 struct xe_shrinker {
  struct xe_device *xe;

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
@@ -50,6 +52,7 @@ struct xe_shrinker {
  	struct shrinker *shrink;
  	struct shrinker *purge_shrink;
  	struct work_struct pm_worker;
+	unsigned int min_age_ms;
  };


 static struct xe_shrinker *to_xe_shrinker(struct shrinker *shrink)

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -104,6 +107,7 @@ static void xe_shrinker_runtime_pm_put(struct

xe_shrinker *shrinker, bool runtim
 static int __xe_shrinker_walk(struct xe_shrinker *shrinker, struct ttm_operation_ctx *ctx, const struct xe_bo_shrink_flags flags,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			      unsigned long min_age,

        unsigned long to_scan, unsigned long *scanned,
        unsigned long *freed)
 {

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -136,6 +140,16 @@ static int __xe_shrinker_walk(struct xe_shrinker
 *shrinker,

  if (flags.purge && ttm_bo->priority > XE_BO_PRIORITY_LOW)
  break;

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+			/*
+			 * Each LRU priority is roughly age ordered,

so the

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			 * rest of this priority is most likely

young too.

drivers/gpu/drm/xe/xe_shrinker.c +3 -0
+			 * Move on to the next priority.
+			 */
+			if (xe_bo_shrink_too_young(ttm_bo, min_age))

{

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+				ttm_bo_lru_cursor_skip_priority(&cur

s);

drivers/gpu/drm/xe/xe_shrinker.c +3 -0
+				continue;
+			}
+

  if (!ttm_bo_shrink_suitable(ttm_bo, ctx)) continue;

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
@@ -171,6 +185,7 @@ static int __xe_shrinker_walk(struct xe_shrinker
 *shrinker,
  static int xe_shrinker_walk(struct xe_shrinker *shrinker,
  			    struct ttm_operation_ctx *ctx,
  			    const struct xe_bo_shrink_flags flags,
+			    unsigned long min_age,

      unsigned long to_scan, unsigned long *scanned,
      unsigned long *freed)
 {

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -180,26 +195,126 @@ static int xe_shrinker_walk(struct xe_shrinker
 *shrinker,


  swap(no_wait_gpu, ctx->no_wait_gpu);
  save_flags.writeback = false;

drivers/gpu/drm/xe/xe_shrinker.c +0 -1
-	ret = __xe_shrinker_walk(shrinker, ctx, save_flags, to_scan,

scanned,

drivers/gpu/drm/xe/xe_shrinker.c +2 -1
-				 freed);
+	ret = __xe_shrinker_walk(shrinker, ctx, save_flags, min_age,
+				 to_scan, scanned, freed);

  swap(no_wait_gpu, ctx->no_wait_gpu);
  if (ret || *scanned >= to_scan)
  return ret;

  if (!ctx->no_wait_gpu) {

drivers/gpu/drm/xe/xe_shrinker.c +0 -1
-		ret = __xe_shrinker_walk(shrinker, ctx, save_flags,

to_scan, scanned,

drivers/gpu/drm/xe/xe_shrinker.c +1 -1
-					 freed);
+		ret = __xe_shrinker_walk(shrinker, ctx, save_flags,

min_age,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+					 to_scan, scanned, freed);

  if (ret || *scanned >= to_scan)
  return ret;
  }

  if (flags.writeback)

drivers/gpu/drm/xe/xe_shrinker.c +0 -1
-		ret = __xe_shrinker_walk(shrinker, ctx, flags,

to_scan, scanned,

drivers/gpu/drm/xe/xe_shrinker.c +1 -1
-					 freed);
+		ret = __xe_shrinker_walk(shrinker, ctx, flags,

min_age,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+					 to_scan, scanned, freed);


  return ret;
 }

+/**
+ * DOC: Shrinker minimum age
+ *
+ * The per-device shrinker_min_age_ms sysfs attribute, defaulting to
+ * CONFIG_DRM_XE_SHRINKER_MIN_AGE_MS, protects recently used BOs from backup.
+ * A BO's age is taken from whatever owns its position on the LRU, and is
+ * stamped wherever that position is updated: the VM-wide stamp for a BO
+ * riding along with a VM's bulk move, bumped on exec in xe_vm_bump_lru(),
+ * its own stamp otherwise, bumped there as well and on a move into TT in
+ * xe_bo_move(). BOs in XE_PL_SYSTEM are never young: they are not GPU
+ * mapped, so not part of a working set, and will be stamped again when
+ * moved back to TT for use.
+ *
+ * The gate is applied per LRU priority, each of which is roughly age
+ * ordered. xe_shrinker_count() snoops the first shrinkable BO of each
+ * priority on each TT-backed LRU. Only if all of them are young does it stop
+ * reporting shrinkable pages; anything else, including reaching no verdict
+ * at all, lets it report. The backup walk in xe_shrinker_scan() skips to the
+ * next priority at the first young BO, as a backstop since the count snoop
+ * is only a sample. A hot priority thus doesn't shield colder BOs in another
+ * priority. BOs that aren't backed up anyway have no say either
way: those
+ * in XE_PL_SYSTEM are never young, and purgeable and DONTNEED ones, which
+ * belong to the purgeable shrinker, are ignored by the snoop entirely.
+ *
+ * The gate is hard and applies at every reclaim priority. A working set kept
+ * younger than the delay is never backed up, which can lead to OOM. This is
+ * intended for users who prefer that risk over thrashing a hot working set,
+ * hence it is disabled by default.
+ */
+static unsigned long xe_shrinker_min_age(struct xe_shrinker *shrinker)

drivers/gpu/drm/xe/xe_shrinker.c +7 -0
+{
+	unsigned int ms = READ_ONCE(shrinker->min_age_ms);
+
+	return ms ? msecs_to_jiffies(ms) : 0;
+}
+
+/* Max shrink-unsuitable BOs to skip per LRU before giving up the

snoop. */

drivers/gpu/drm/xe/xe_shrinker.c +4 -0
+#define XE_SHRINKER_SNOOP_MAX	16
+
+/*
+ * Whether the first BO of every priority on every TT-backed LRU

that this
+ * shrinker would back up is younger than @min_age. BOs are trylocked through
+ * the reserved LRU walker since their tt may be torn down while still on the
+ * LRU. Contended BOs are skipped by the walker, and may be all of them. If no
+ * verdict can be reached, because nothing was inspected or the snoop budget
+ * ran out, report not young and leave it to the scan side check.
+ */

drivers/gpu/drm/xe/xe_shrinker.c +14 -0
+static bool xe_shrinker_lru_young(struct xe_shrinker *shrinker,
+				  unsigned long min_age)
+{
+	struct ttm_operation_ctx ctx = {
+		.interruptible = false,
+		.no_wait_gpu = false,
+	};
+	struct xe_device *xe = shrinker->xe;
+	unsigned int mem_type;
+	bool young = false;
+
+	for (mem_type = XE_PL_SYSTEM; mem_type <= XE_PL_TT;
++mem_type) {
+		struct ttm_resource_manager *man =

ttm_manager_type(&xe->ttm, mem_type);

drivers/gpu/drm/xe/xe_shrinker.c +12 -0
+		struct ttm_bo_lru_cursor curs;
+		struct ttm_buffer_object *ttm_bo;
+		struct ttm_lru_walk_arg arg = {
+			.ctx = &ctx,
+			.trylock_only = true,
+		};
+		unsigned int budget = XE_SHRINKER_SNOOP_MAX;
+
+		if (!man || !man->use_tt)
+			continue;
+
+		ttm_bo_lru_for_each_reserved_guarded(&curs, man,

&arg, ttm_bo) {

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+			/*
+			 * Nothing in the DONTNEED band is backed

up, and it

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			 * is accounted to the purgeable shrinker,

so it has

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			 * no say here. Skip the whole band in one

go.

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+			 */
+			if (ttm_bo->priority <= XE_BO_PRIORITY_LOW)

{

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+				ttm_bo_lru_cursor_skip_priority(&cur

s);

drivers/gpu/drm/xe/xe_shrinker.c +5 -0
+				continue;
+			}
+
+			if (!ttm_bo_shrink_suitable(ttm_bo, &ctx) ||
+			    !xe_bo_shrink_backup_candidate(ttm_bo))

{

drivers/gpu/drm/xe/xe_shrinker.c +6 -0
+				if (!--budget)
+					return false;
+				continue;
+			}
+
+			if (!xe_bo_shrink_too_young(ttm_bo,

min_age))

drivers/gpu/drm/xe/xe_shrinker.c +10 -0
+				return false;
+
+			young = true;
+			ttm_bo_lru_cursor_skip_priority(&curs);
+		}
+	}
+
+	return young;
+}
+

 static unsigned long xe_shrinker_count_purgeable(struct shrinker *shrink, struct shrink_control *sc)
 {

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -239,7 +354,7 @@ static unsigned long

 xe_shrinker_count(struct shrinker *shrink, struct shrink_control *sc)
 {
  struct xe_shrinker *shrinker = to_xe_shrinker(shrink);

drivers/gpu/drm/xe/xe_shrinker.c +1 -1
-	unsigned long num_pages;
+	unsigned long num_pages, min_age;

  bool can_backup = !!(sc->gfp_mask & __GFP_FS);
  if (!can_backup)

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -263,6 +378,10 @@ xe_shrinker_count(struct shrinker *shrink,
 struct shrink_control *sc)


  write_unlock(&shrinker->lock);

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+	min_age = xe_shrinker_min_age(shrinker);
+	if (num_pages && min_age && xe_shrinker_lru_young(shrinker,

min_age))

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+		return SHRINK_EMPTY;
+

  return num_pages ? num_pages : SHRINK_EMPTY; }

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -297,7 +416,8 @@ static unsigned long
 xe_shrinker_scan_purgeable(struct shrinker *shrink,
  		.purge = true,
  	};

drivers/gpu/drm/xe/xe_shrinker.c +0 -1
-	xe_shrinker_walk(shrinker, &ctx, shrink_flags, nr_to_scan,

&nr_scanned, &freed);

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+	xe_shrinker_walk(shrinker, &ctx, shrink_flags, 0,

nr_to_scan, &nr_scanned,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			 &freed);


  sc->nr_scanned = nr_scanned;

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -322,7 +442,9 @@ static unsigned long xe_shrinker_scan(struct

shrinker *shrink, struct shrink_con
  /* Might need runtime PM to access backed-up or CCS- compressed data. */
  runtime_pm = xe_shrinker_runtime_pm_get(shrinker);

drivers/gpu/drm/xe/xe_shrinker.c +0 -1
-	xe_shrinker_walk(shrinker, &ctx, shrink_flags, nr_to_scan,

&nr_scanned, &freed);

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+	xe_shrinker_walk(shrinker, &ctx, shrink_flags,
+			 xe_shrinker_min_age(shrinker), nr_to_scan,

&nr_scanned,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			 &freed);


  sc->nr_scanned = nr_scanned; xe_shrinker_runtime_pm_put(shrinker, runtime_pm);

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -387,6 +509,29 @@ int xe_shrinker_set_non_purgeable_seeks(struct
 xe_shrinker *shrinker,
  	return 0;
  }


+/**
+ * xe_shrinker_min_age_ms() - Get the shrinker minimum BO age
+ * @shrinker: Pointer to the struct xe_shrinker.
+ *
+ * Return: Minimum age, in ms, a BO must reach before it may be backed up.
+ */

drivers/gpu/drm/xe/xe_shrinker.c +13 -0
+unsigned int xe_shrinker_min_age_ms(struct xe_shrinker *shrinker)
+{
+	return READ_ONCE(shrinker->min_age_ms);
+}
+
+/**
+ * xe_shrinker_set_min_age_ms() - Set the shrinker minimum BO age
+ * @shrinker: Pointer to the struct xe_shrinker.
+ * @ms: Minimum age, in ms. 0 disables the gate.
+ *
+ * See DOC: Shrinker minimum age. A non-zero value can lead to OOM.
+ */
+void xe_shrinker_set_min_age_ms(struct xe_shrinker *shrinker,

unsigned int ms)

drivers/gpu/drm/xe/xe_shrinker.c +4 -0
+{
+	WRITE_ONCE(shrinker->min_age_ms, ms);
+}
+

 /**
  * xe_shrinker_create() - Create an xe per-device shrinker
  * @xe: Pointer to the xe device.

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -415,6 +560,7 @@ int xe_shrinker_create(struct xe_device *xe)


  INIT_WORK(&shrinker->pm_worker, xe_shrinker_pm); shrinker->xe = xe;

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+	shrinker->min_age_ms = CONFIG_DRM_XE_SHRINKER_MIN_AGE_MS;

  rwlock_init(&shrinker->lock);

  shrinker->purge_shrink->count_objects =
xe_shrinker_count_purgeable;

drivers/gpu/drm/xe/xe_shrinker.h +0 -0
index 4b3c73689619..586d7772bd58 100644
@@ -18,4 +18,7 @@ int xe_shrinker_non_purgeable_seeks(struct
 xe_shrinker *shrinker);

 int xe_shrinker_set_non_purgeable_seeks(struct xe_shrinker *shrinker,
  unsigned int seeks);

drivers/gpu/drm/xe/xe_shrinker.h +2 -0
+unsigned int xe_shrinker_min_age_ms(struct xe_shrinker *shrinker);
+void xe_shrinker_set_min_age_ms(struct xe_shrinker *shrinker,

unsigned int ms);
+
 #endif

drivers/gpu/drm/xe/xe_vm.c +0 -0
index 86c3b4fd232f..583c55b7f97d 100644
@@ -463,13 +463,15 @@ void xe_vm_bump_lru(struct xe_vm *vm, struct
 drm_exec *exec)
  	spinlock_t *lru_lock = &vm->xe->ttm.lru_lock;
  	struct drm_gem_object *obj;

drivers/gpu/drm/xe/xe_vm.c +2 -0
+	WRITE_ONCE(vm->lru_stamp, jiffies);
+

  spin_lock(lru_lock); ttm_lru_bulk_move_tail(&vm->lru_bulk_move); drm_exec_for_each_locked_object(exec, obj) { if (!drm_gpuvm_is_extobj(&vm->gpuvm, obj)) continue;

drivers/gpu/drm/xe/xe_vm.c +1 -1
-		ttm_bo_move_to_lru_tail(&gem_to_xe_bo(obj)->ttm);
+		xe_bo_bump_lru_locked(gem_to_xe_bo(obj));

  cond_resched_lock(lru_lock);
  }
  spin_unlock(lru_lock);

drivers/gpu/drm/xe/xe_vm_types.h +0 -0
index fb9305124679..046505a285e9 100644
@@ -267,6 +267,14 @@ struct xe_vm {
  	/** @lru_bulk_move: Bulk LRU move list for this VM's BOs */
  	struct ttm_lru_bulk_move lru_bulk_move;

drivers/gpu/drm/xe/xe_vm_types.h +2 -0
+	/**
+	 * @lru_stamp: jiffies at the last xe_vm_bump_lru(), which

is where

drivers/gpu/drm/xe/xe_vm_types.h +1 -0
+	 * @lru_bulk_move is moved to the LRU tail. Ages every BO in
Quoted 9 lines

drivers/gpu/drm/xe/xe_vm_types.h

Quoted 6 lines

that

drivers/gpu/drm/xe/xe_vm_types.h +1 -0
+	 * bulk move for the shrinker's minimum age gate. Accessed

with

drivers/gpu/drm/xe/xe_vm_types.h +3 -0
+	 * READ_ONCE()/WRITE_ONCE().
+	 */
+	unsigned long lru_stamp;

Isn't the bo resv / vm resv always held then this is accessed?

xe_bo_shrink_too_young is the lockless read side.

Matt

Quoted 9 lines

Thanks,
Thomas

Quoted 4 lines

+
  u64 size;

  struct xe_pt *pt_root[XE_MAX_TILES_PER_DEVICE];

#13 lore raw

Re: [PATCH v6 3/3] drm/xe: Add a minimum age gate to the shrinker

Quoted 82 lines · Matthew Brost
Quoted 65 lines · Thomas Hellström
Quoted 56 lines · Matthew Brost

Backing up a BO costs a GPU blit plus a page copy, and if the BO is
part
of an active working set it is faulted straight back in on the next
exec.
Evicting a BO that was used moments ago is therefore almost always a
loss, yet the shrinker has no notion of recency beyond LRU order.

Timestamp BOs wherever their LRU position is updated, and read the
stamp
back from whatever owns that position. A BO in a VM's bulk move is
anchored inside its range, so it is aged by the VM-wide stamp taken
in
xe_vm_bump_lru() alongside the bulk move itself. Any other BO carries
its own, stamped there too and on a successful move into TT in xe_bo_move(), where ttm_resource_alloc() has already placed the new
resource at the LRU tail.

Add a per-device shrinker_min_age_ms sysfs attribute, defaulting to
CONFIG_DRM_XE_SHRINKER_MIN_AGE_MS (0, disabled). While set, the shrinker
won't back up BOs younger than the delay. Each LRU priority is roughly
age ordered, so the gate is applied per priority:
xe_shrinker_count()
snoops the first shrinkable BO of each priority and reports nothing
only
if all of them are young, and the backup walk skips to the next priority
at the first young BO, both as a backstop for the count sample and so
a
hot priority doesn't shield colder BOs in another one.

Only BOs this shrinker would actually back up have a say. BOs in XE_PL_SYSTEM, which are not GPU mapped and hence not part of a working
set, and BOs xe_bo_shrink() rejects outright are never young. Purgeable
BOs and those advised DONTNEED are neither: they are dropped rather
than
backed up and accounted to the purgeable shrinker, so they are never
young and the count snoop skips their XE_BO_PRIORITY_LOW band entirely.

Quoted 7 lines

The gate is hard and applies at every reclaim priority, so a working
set
kept younger than the delay is never backed up and can lead to OOM.
This
is deliberate, and why it is off by default.

Quoted 3 lines

For completeness, Perhaps add to the commit message that the plan is to follow up with an OOM notifier?

That is a possible option. Another idea I had was if we can get the priority exported from the shrinker core - we have a config knob that says 'at this priority or greater', shrink BOs which have been used recently.

Quoted 6 lines

I also wonder what happens during the PM notifier preparing for suspend
on DGFX, Does that move mark bos accessed, hence possibly blocked by
the shrinker at suspend time?

Quoted 7 lines

I haven't tried this on DGFX, can give it try but this off by default.

I'm also a little confused by this - does the shrinker run at suspend time? I thought once the memory in ram a hiberation image in created from the that - i.e., there isn't a requirement the BOs to get shrunk into shmem.

The problem occurs when evicting VRAM to system memory during the pm notifier. If system fills up then the shrinker kicks in. But if that eviction from VRAM to system doesn't bump LRU / update timestamps then that is not a problem.

For hibernation I'm not sure whether whether we actually see backup shrinking, since it requires __GFP_FS and __GFP_IO for writeback, and I think those are turned off during hibernation shrinking.

Quoted 814 lines
Quoted 804 lines
Quoted 804 lines
Assisted-by LLM

---
 drivers/gpu/drm/xe/Kconfig.profile   |  15 +++ drivers/gpu/drm/xe/xe_bo.c           |  83 ++++++++++++++ drivers/gpu/drm/xe/xe_bo.h           |   5 + drivers/gpu/drm/xe/xe_bo_types.h     |   8 ++ drivers/gpu/drm/xe/xe_device_sysfs.c |  35 ++++++ drivers/gpu/drm/xe/xe_pagefault.c    |   2 +- drivers/gpu/drm/xe/xe_shrinker.c     | 164
+++++++++++++++++++++++++--
 drivers/gpu/drm/xe/xe_shrinker.h     |   3 + drivers/gpu/drm/xe/xe_vm.c           |   4 +- drivers/gpu/drm/xe/xe_vm_types.h     |   8 ++

 10 files changed, 316 insertions(+), 11 deletions(-)
drivers/gpu/drm/xe/Kconfig.profile +0 -0
index 23045ed2aa94..dd3985e502b8 100644
@@ -74,6 +74,7 @@ config DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT

    to apply to applicable user. For elevated user, all above
MIN
    and MAX values will apply when this configuration is enable to
    apply limitation. By default limitation is applied. +
 config DRM_XE_SHRINKER_NON_PURGEABLE_SEEKS
  int "Default seeks value of the non-purgeable bo shrinker"
  default 8

drivers/gpu/drm/xe/Kconfig.profile +0 -0
@@ -86,3 +87,17 @@ config DRM_XE_SHRINKER_NON_PURGEABLE_SEEKS
  	  reclaim pressure on non-purgeable buffer objects,

which
need
    GPU idling and writeback to be reclaimed, in favour of purgeable
    ones and other kernel caches.

drivers/gpu/drm/xe/Kconfig.profile +7 -0
+
+config DRM_XE_SHRINKER_MIN_AGE_MS
+	int "Default minimum BO age before shrinker backup (ms)"
+	default 0
+	range 0 1000000
+	help
+	  Default for the per-device shrinker_min_age_ms sysfs

attribute. The

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  shrinker won't back up a BO that was moved into TT, or

bumped on the

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  LRU by an exec, less than this many milliseconds ago.

BOs
already

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  evicted to system memory are not part of a working set

and
are

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  never protected. This applies at every reclaim

priority: a
working

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  set kept younger than this is never backed up and can

cause OOM.

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  Only set if that risk is preferred over thrashing a

hot
working

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  set. 0 disables.
drivers/gpu/drm/xe/xe_bo.c +0 -0
index 42a6aa1a2e4a..a4c0c6284a24 100644
@@ -1357,9 +1357,92 @@ static int xe_bo_move(struct

ttm_buffer_object
*ttm_bo, bool evict,
  xe_tt_unmap_sg(xe, ttm_bo->ttm);
  }

drivers/gpu/drm/xe/xe_bo.c +2 -0
+	/*
+	 * ttm_resource_alloc() already placed the new resource

at
the tail of

drivers/gpu/drm/xe/xe_bo.c +1 -0
+	 * its LRU, or of @bo's bulk move, so only record when

that
happened.

drivers/gpu/drm/xe/xe_bo.c +2 -0
+	 */
+	if (!ret && ttm_bo->resource && ttm_bo->resource-
Quoted 1 line

mem_type

== XE_PL_TT)

drivers/gpu/drm/xe/xe_bo.c +2 -0
+		WRITE_ONCE(bo->lru_stamp, jiffies);
+

  return ret;
 }

+/**
+ * xe_bo_bump_lru_locked() - Bump a BO on the LRU and stamp its last
use
+ * @bo: The buffer object, reserved by the caller.
+ *
+ * Move @bo to the tail of its LRU and record the time for the shrinker's
+ * minimum age gate. Only meaningful for BOs outside a bulk move,
since a
+ * BO in one is anchored inside its range and is bumped, and aged,
with it.
+ * The caller must hold the device LRU lock.
+ */

drivers/gpu/drm/xe/xe_bo.c +8 -0
+void xe_bo_bump_lru_locked(struct xe_bo *bo)
+{
+	WRITE_ONCE(bo->lru_stamp, jiffies);
+	ttm_bo_move_to_lru_tail(&bo->ttm);
+}
+
+/**
+ * xe_bo_shrink_backup_candidate() - Whether the shrinker may

back
up a BO
+ * @bo: The TTM buffer object, reserved by the caller.
+ *
+ * A BO is a backup candidate if backing it up is the only way to
reclaim it.
+ * BOs advised DONTNEED, which sit at XE_BO_PRIORITY_LOW, and purgeable ones
+ * are not: their pages are simply dropped, which is cheap, and they
are
+ * accounted to the purgeable shrinker. Neither are the BOs xe_bo_shrink()
+ * hands to xe_bo_shrink_purge() outright: ghost BOs, which aren't
xe BOs,
+ * and BOs already freed and waiting to be reaped. Nor are BOs whose
tt
+ * isn't TTM_TT_FLAG_EXTERNAL_MAPPABLE, which xe_bo_shrink() rejects.
+ *
+ * Return: true if @bo would be backed up by a non-purge shrink pass.
+ */

drivers/gpu/drm/xe/xe_bo.c +5 -0
+bool xe_bo_shrink_backup_candidate(struct ttm_buffer_object *bo)
+{
+	struct xe_ttm_tt *xe_tt;
+
+	if (!xe_bo_is_xe_bo(bo) || !kref_read(&bo-
Quoted 1 line

base.refcount) ||

!bo->ttm ||

drivers/gpu/drm/xe/xe_bo.c +1 -0
+	    !(bo->ttm->page_flags &

TTM_TT_FLAG_EXTERNAL_MAPPABLE)

Quoted 1 line
Quoted 1 line
drivers/gpu/drm/xe/xe_bo.c +10 -0
+	    bo->priority <= XE_BO_PRIORITY_LOW)
+		return false;
+
+	xe_tt = container_of(bo->ttm, struct xe_ttm_tt, ttm);
+
+	return !xe_tt->purgeable;
+}
+
+/**
+ * xe_bo_shrink_too_young() - Whether a BO was used too recently

to
shrink
+ * @bo: The TTM buffer object, reserved by the caller.
+ * @min_age: Minimum age in jiffies. 0 disables the check.
+ *
+ * The age is taken from whatever owns @bo's LRU position:
&xe_vm.lru_stamp
+ * if @bo rides along with a VM's bulk move, its own &xe_bo.lru_stamp if not.
+ *
+ * BOs that the shrink walk would not back up anyway are never considered
+ * young, see xe_bo_shrink_backup_candidate(). Neither are BOs in
+ * XE_PL_SYSTEM: they are not GPU mapped, hence not part of a working set,
+ * and must be moved back to TT, refreshing the stamp, before use.
+ *
+ * Return: true if @bo was touched less than @min_age jiffies ago.
+ */
+bool xe_bo_shrink_too_young(struct ttm_buffer_object *bo, unsigned
long min_age)

drivers/gpu/drm/xe/xe_bo.c +5 -0
+{
+	struct xe_bo *xe_bo;
+	unsigned long stamp;
+
+	if (!min_age || bo->resource->mem_type == XE_PL_SYSTEM

||

drivers/gpu/drm/xe/xe_bo.c +12 -0
+	    !xe_bo_shrink_backup_candidate(bo))
+		return false;
+
+	xe_bo = ttm_to_xe_bo(bo);
+	if (bo->bulk_move && xe_bo->vm)
+		stamp = READ_ONCE(xe_bo->vm->lru_stamp);
+	else
+		stamp = READ_ONCE(xe_bo->lru_stamp);
+
+	return stamp && time_before(jiffies, stamp + min_age);
+}
+

 static long xe_bo_shrink_purge(struct ttm_operation_ctx *ctx, struct ttm_buffer_object *bo, unsigned long *scanned)

drivers/gpu/drm/xe/xe_bo.h +0 -0
index 77b3a02e9b8e..65d4c638e8d8 100644
@@ -623,6 +623,11 @@ struct xe_bo_shrink_flags {
  	u32 writeback : 1;
  };

drivers/gpu/drm/xe/xe_bo.h +3 -0
+void xe_bo_bump_lru_locked(struct xe_bo *bo);
+
+bool xe_bo_shrink_backup_candidate(struct ttm_buffer_object

*bo);
+bool xe_bo_shrink_too_young(struct ttm_buffer_object *bo, unsigned
long min_age);
+
 long xe_bo_shrink(struct ttm_operation_ctx *ctx, struct ttm_buffer_object *bo,
    const struct xe_bo_shrink_flags flags, unsigned long *scanned);

drivers/gpu/drm/xe/xe_bo_types.h +0 -0
index 0265fb314c77..f63b668c7134 100644
@@ -49,6 +49,14 @@ struct xe_bo {
  	u32 flags;
  	/** @vm: VM this BO is attached to, for extobj this will

be
NULL */
  struct xe_vm *vm;

drivers/gpu/drm/xe/xe_bo_types.h +2 -0
+	/**
+	 * @lru_stamp: jiffies at the last LRU bump, done on a

move
into TT

drivers/gpu/drm/xe/xe_bo_types.h +1 -0
+	 * and at exec time. Only describes the LRU position of

a BO
outside

drivers/gpu/drm/xe/xe_bo_types.h +1 -0
+	 * a bulk move; BOs in one are aged by &xe_vm.lru_stamp

instead.

drivers/gpu/drm/xe/xe_bo_types.h +1 -0
+	 * Consulted by the shrinker's minimum age gate.

Accessed
with

drivers/gpu/drm/xe/xe_bo_types.h +3 -0
+	 * READ_ONCE()/WRITE_ONCE().
+	 */
+	unsigned long lru_stamp;

  /**
  * @q: Queue this BO is attached to, mostly for LRC BO, NULL
otherwise.
  * Protected by the BO dma_resv: readers must hold it across
both the

drivers/gpu/drm/xe/xe_device_sysfs.c +0 -0
index ff5d25dd867c..26b1f71ed522 100644
@@ -38,6 +38,12 @@
   * 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.
+ *
+ * shrinker_min_age_ms - Report/change the minimum time, in ms, since a BO was
+ * last moved to TT or bumped on the LRU by an exec before the shrinker may
+ * back it up. BOs evicted to system memory are never protected. Defaults to
+ * CONFIG_DRM_XE_SHRINKER_MIN_AGE_MS, 0 disables. This applies at
every
+ * reclaim priority, so a non-zero value can lead to OOM. */

 static ssize_t

drivers/gpu/drm/xe/xe_device_sysfs.c +0 -0
@@ -331,8 +337,37 @@ shrinker_non_purgeable_seeks_store(struct

device
*dev,

 static DEVICE_ATTR_RW(shrinker_non_purgeable_seeks);

drivers/gpu/drm/xe/xe_device_sysfs.c +2 -0
+static ssize_t
+shrinker_min_age_ms_show(struct device *dev, struct

device_attribute
*attr,

drivers/gpu/drm/xe/xe_device_sysfs.c +3 -0
+			 char *buf)
+{
+	struct xe_device *xe =

pdev_to_xe_device(to_pci_dev(dev));

drivers/gpu/drm/xe/xe_device_sysfs.c +2 -0
+
+	return sysfs_emit(buf, "%u\n",

xe_shrinker_min_age_ms(xe-

Quoted 1 line

mem.shrinker));

drivers/gpu/drm/xe/xe_device_sysfs.c +4 -0
+}
+
+static ssize_t
+shrinker_min_age_ms_store(struct device *dev, struct

device_attribute *attr,

drivers/gpu/drm/xe/xe_device_sysfs.c +3 -0
+			  const char *buff, size_t count)
+{
+	struct xe_device *xe =

pdev_to_xe_device(to_pci_dev(dev));

drivers/gpu/drm/xe/xe_device_sysfs.c +14 -0
+	unsigned int ms;
+	int ret;
+
+	ret = kstrtouint(buff, 0, &ms);
+	if (ret)
+		return ret;
+
+	xe_shrinker_set_min_age_ms(xe->mem.shrinker, ms);
+
+	return count;
+}
+
+static DEVICE_ATTR_RW(shrinker_min_age_ms);
+

 static struct attribute *shrinker_attrs[] = { &dev_attr_shrinker_non_purgeable_seeks.attr,

drivers/gpu/drm/xe/xe_device_sysfs.c +1 -0
+	&dev_attr_shrinker_min_age_ms.attr,

  NULL
 };

drivers/gpu/drm/xe/xe_pagefault.c +0 -0
index 6828f81df50e..895866d639f8 100644
@@ -226,7 +226,7 @@ static int xe_pagefault_handle_vma(struct

xe_gt
*gt, struct xe_vma *vma,

  if (bo) { scoped_guard(spinlock, &vm->xe-

Quoted 1 line

ttm.lru_lock)

-

					ttm_bo_move_to_lru_tail(&bo-
Quoted 1 line

ttm);

drivers/gpu/drm/xe/xe_pagefault.c +1 -0
+					xe_bo_bump_lru_locked(bo

);
  }
  }
  xe_validation_ctx_fini(&ctx);

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
index c86455ea08d1..64e5e684f591 100644
@@ -39,6 +39,8 @@
   * @shrink: Pointer to the mm shrinker handling non-purgeable

(shrinkable) objects.
  * @purge_shrink: Pointer to the mm shrinker handling purgeable objects.
  * @pm_worker: Worker to wake up the device if required.
+ * @min_age_ms: Minimum BO age before backup, in ms. 0 disables. Defaults to
+ * CONFIG_DRM_XE_SHRINKER_MIN_AGE_MS, overridable through sysfs. */
 struct xe_shrinker {
  struct xe_device *xe;

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
@@ -50,6 +52,7 @@ struct xe_shrinker {
  	struct shrinker *shrink;
  	struct shrinker *purge_shrink;
  	struct work_struct pm_worker;
+	unsigned int min_age_ms;
  };


 static struct xe_shrinker *to_xe_shrinker(struct shrinker *shrink)

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -104,6 +107,7 @@ static void xe_shrinker_runtime_pm_put(struct

xe_shrinker *shrinker, bool runtim
 static int __xe_shrinker_walk(struct xe_shrinker *shrinker, struct ttm_operation_ctx *ctx, const struct xe_bo_shrink_flags flags,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			      unsigned long min_age,

        unsigned long to_scan, unsigned long
*scanned,
        unsigned long *freed) {

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -136,6 +140,16 @@ static int __xe_shrinker_walk(struct

xe_shrinker
*shrinker,
  if (flags.purge && ttm_bo->priority > XE_BO_PRIORITY_LOW)
  break;

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+			/*
+			 * Each LRU priority is roughly age

ordered,
so the

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			 * rest of this priority is most likely

young too.

drivers/gpu/drm/xe/xe_shrinker.c +3 -0
+			 * Move on to the next priority.
+			 */
+			if (xe_bo_shrink_too_young(ttm_bo,

min_age))
{

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+				ttm_bo_lru_cursor_skip_priority(

&cur
s);

drivers/gpu/drm/xe/xe_shrinker.c +3 -0
+				continue;
+			}
+

  if (!ttm_bo_shrink_suitable(ttm_bo, ctx))
  continue;

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -171,6 +185,7 @@ static int __xe_shrinker_walk(struct

xe_shrinker
*shrinker,
 static int xe_shrinker_walk(struct xe_shrinker *shrinker, struct ttm_operation_ctx *ctx, const struct xe_bo_shrink_flags flags,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			    unsigned long min_age,

      unsigned long to_scan, unsigned long *scanned,
      unsigned long *freed)
 {

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -180,26 +195,126 @@ static int xe_shrinker_walk(struct

xe_shrinker
*shrinker,

  swap(no_wait_gpu, ctx->no_wait_gpu);
  save_flags.writeback = false;

drivers/gpu/drm/xe/xe_shrinker.c +0 -1
-	ret = __xe_shrinker_walk(shrinker, ctx, save_flags,

to_scan,
scanned,

drivers/gpu/drm/xe/xe_shrinker.c +1 -1
-				 freed);
+	ret = __xe_shrinker_walk(shrinker, ctx, save_flags,

min_age,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+				 to_scan, scanned, freed);

  swap(no_wait_gpu, ctx->no_wait_gpu);
  if (ret || *scanned >= to_scan)
  return ret;

  if (!ctx->no_wait_gpu) {

drivers/gpu/drm/xe/xe_shrinker.c +0 -1
-		ret = __xe_shrinker_walk(shrinker, ctx,

save_flags,
to_scan, scanned,

drivers/gpu/drm/xe/xe_shrinker.c +1 -1
-					 freed);
+		ret = __xe_shrinker_walk(shrinker, ctx,

save_flags,
min_age,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+					 to_scan, scanned,

freed);
  if (ret || *scanned >= to_scan)
  return ret;
  }

  if (flags.writeback)

drivers/gpu/drm/xe/xe_shrinker.c +0 -1
-		ret = __xe_shrinker_walk(shrinker, ctx, flags,

to_scan, scanned,

drivers/gpu/drm/xe/xe_shrinker.c +1 -1
-					 freed);
+		ret = __xe_shrinker_walk(shrinker, ctx, flags,

min_age,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+					 to_scan, scanned,

freed);

  return ret;
 }

+/**
+ * DOC: Shrinker minimum age
+ *
+ * The per-device shrinker_min_age_ms sysfs attribute, defaulting to
+ * CONFIG_DRM_XE_SHRINKER_MIN_AGE_MS, protects recently used BOs from backup.
+ * A BO's age is taken from whatever owns its position on the LRU,
and is
+ * stamped wherever that position is updated: the VM-wide stamp for
a BO
+ * riding along with a VM's bulk move, bumped on exec in xe_vm_bump_lru(),
+ * its own stamp otherwise, bumped there as well and on a move into
TT in
+ * xe_bo_move(). BOs in XE_PL_SYSTEM are never young: they are not
GPU
+ * mapped, so not part of a working set, and will be stamped again
when
+ * moved back to TT for use.
+ *
+ * The gate is applied per LRU priority, each of which is roughly
age
+ * ordered. xe_shrinker_count() snoops the first shrinkable BO of
each
+ * priority on each TT-backed LRU. Only if all of them are young does it stop
+ * reporting shrinkable pages; anything else, including reaching no
verdict
+ * at all, lets it report. The backup walk in xe_shrinker_scan() skips to the
+ * next priority at the first young BO, as a backstop since the count snoop
+ * is only a sample. A hot priority thus doesn't shield colder BOs
in another
+ * priority. BOs that aren't backed up anyway have no say either
way: those
+ * in XE_PL_SYSTEM are never young, and purgeable and DONTNEED ones,
which
+ * belong to the purgeable shrinker, are ignored by the snoop entirely.
+ *
+ * The gate is hard and applies at every reclaim priority. A working
set kept
+ * younger than the delay is never backed up, which can lead to OOM.
This is
+ * intended for users who prefer that risk over thrashing a hot working set,
+ * hence it is disabled by default.
+ */
+static unsigned long xe_shrinker_min_age(struct xe_shrinker *shrinker)

drivers/gpu/drm/xe/xe_shrinker.c +7 -0
+{
+	unsigned int ms = READ_ONCE(shrinker->min_age_ms);
+
+	return ms ? msecs_to_jiffies(ms) : 0;
+}
+
+/* Max shrink-unsuitable BOs to skip per LRU before giving up

the
snoop. */

drivers/gpu/drm/xe/xe_shrinker.c +4 -0
+#define XE_SHRINKER_SNOOP_MAX	16
+
+/*
+ * Whether the first BO of every priority on every TT-backed LRU

that this
+ * shrinker would back up is younger than @min_age. BOs are trylocked through
+ * the reserved LRU walker since their tt may be torn down while still on the
+ * LRU. Contended BOs are skipped by the walker, and may be all of
them. If no
+ * verdict can be reached, because nothing was inspected or the snoop budget
+ * ran out, report not young and leave it to the scan side check.
+ */

drivers/gpu/drm/xe/xe_shrinker.c +14 -0
+static bool xe_shrinker_lru_young(struct xe_shrinker *shrinker,
+				  unsigned long min_age)
+{
+	struct ttm_operation_ctx ctx = {
+		.interruptible = false,
+		.no_wait_gpu = false,
+	};
+	struct xe_device *xe = shrinker->xe;
+	unsigned int mem_type;
+	bool young = false;
+
+	for (mem_type = XE_PL_SYSTEM; mem_type <= XE_PL_TT;
++mem_type) {
+		struct ttm_resource_manager *man =

ttm_manager_type(&xe->ttm, mem_type);

drivers/gpu/drm/xe/xe_shrinker.c +12 -0
+		struct ttm_bo_lru_cursor curs;
+		struct ttm_buffer_object *ttm_bo;
+		struct ttm_lru_walk_arg arg = {
+			.ctx = &ctx,
+			.trylock_only = true,
+		};
+		unsigned int budget = XE_SHRINKER_SNOOP_MAX;
+
+		if (!man || !man->use_tt)
+			continue;
+
+		ttm_bo_lru_for_each_reserved_guarded(&curs, man,

&arg, ttm_bo) {

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+			/*
+			 * Nothing in the DONTNEED band is

backed
up, and it

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			 * is accounted to the purgeable

shrinker,
so it has

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			 * no say here. Skip the whole band in

one
go.

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+			 */
+			if (ttm_bo->priority <=

XE_BO_PRIORITY_LOW)
{

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+				ttm_bo_lru_cursor_skip_priority(

&cur
s);

drivers/gpu/drm/xe/xe_shrinker.c +4 -0
+				continue;
+			}
+
+			if (!ttm_bo_shrink_suitable(ttm_bo,

&ctx) ||

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			   

!xe_bo_shrink_backup_candidate(ttm_bo))
{

drivers/gpu/drm/xe/xe_shrinker.c +6 -0
+				if (!--budget)
+					return false;
+				continue;
+			}
+
+			if (!xe_bo_shrink_too_young(ttm_bo,

min_age))

drivers/gpu/drm/xe/xe_shrinker.c +10 -0
+				return false;
+
+			young = true;
+			ttm_bo_lru_cursor_skip_priority(&curs);
+		}
+	}
+
+	return young;
+}
+

 static unsigned long xe_shrinker_count_purgeable(struct shrinker *shrink, struct shrink_control *sc)
 {

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -239,7 +354,7 @@ static unsigned long

 xe_shrinker_count(struct shrinker *shrink, struct shrink_control *sc)
 {
  struct xe_shrinker *shrinker = to_xe_shrinker(shrink);

drivers/gpu/drm/xe/xe_shrinker.c +1 -1
-	unsigned long num_pages;
+	unsigned long num_pages, min_age;

  bool can_backup = !!(sc->gfp_mask & __GFP_FS);
  if (!can_backup)

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -263,6 +378,10 @@ xe_shrinker_count(struct shrinker *shrink,
 struct shrink_control *sc)


  write_unlock(&shrinker->lock);

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+	min_age = xe_shrinker_min_age(shrinker);
+	if (num_pages && min_age &&

xe_shrinker_lru_young(shrinker,
min_age))

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+		return SHRINK_EMPTY;
+

  return num_pages ? num_pages : SHRINK_EMPTY; }

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -297,7 +416,8 @@ static unsigned long
 xe_shrinker_scan_purgeable(struct shrinker *shrink,
  		.purge = true,
  	};

drivers/gpu/drm/xe/xe_shrinker.c +0 -1
-	xe_shrinker_walk(shrinker, &ctx, shrink_flags,

nr_to_scan,
&nr_scanned, &freed);

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+	xe_shrinker_walk(shrinker, &ctx, shrink_flags, 0,

nr_to_scan, &nr_scanned,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			 &freed);


  sc->nr_scanned = nr_scanned;

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -322,7 +442,9 @@ static unsigned long xe_shrinker_scan(struct

shrinker *shrink, struct shrink_con
  /* Might need runtime PM to access backed-up or CCS- compressed data. */
  runtime_pm = xe_shrinker_runtime_pm_get(shrinker);

drivers/gpu/drm/xe/xe_shrinker.c +0 -1
-	xe_shrinker_walk(shrinker, &ctx, shrink_flags,

nr_to_scan,
&nr_scanned, &freed);

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+	xe_shrinker_walk(shrinker, &ctx, shrink_flags,
+			 xe_shrinker_min_age(shrinker),

nr_to_scan,
&nr_scanned,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			 &freed);


  sc->nr_scanned = nr_scanned; xe_shrinker_runtime_pm_put(shrinker, runtime_pm);

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -387,6 +509,29 @@ int

xe_shrinker_set_non_purgeable_seeks(struct
xe_shrinker *shrinker,
  return 0;
 }

+/**
+ * xe_shrinker_min_age_ms() - Get the shrinker minimum BO age
+ * @shrinker: Pointer to the struct xe_shrinker.
+ *
+ * Return: Minimum age, in ms, a BO must reach before it may be backed up.
+ */
+unsigned int xe_shrinker_min_age_ms(struct xe_shrinker *shrinker)

drivers/gpu/drm/xe/xe_shrinker.c +6 -0
+{
+	return READ_ONCE(shrinker->min_age_ms);
+}
+
+/**
+ * xe_shrinker_set_min_age_ms() - Set the shrinker minimum BO

age
+ * @shrinker: Pointer to the struct xe_shrinker.
+ * @ms: Minimum age, in ms. 0 disables the gate.
+ *
+ * See DOC: Shrinker minimum age. A non-zero value can lead to OOM.
+ */
+void xe_shrinker_set_min_age_ms(struct xe_shrinker *shrinker, unsigned int ms)

drivers/gpu/drm/xe/xe_shrinker.c +4 -0
+{
+	WRITE_ONCE(shrinker->min_age_ms, ms);
+}
+

 /**
  * xe_shrinker_create() - Create an xe per-device shrinker
  * @xe: Pointer to the xe device.

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -415,6 +560,7 @@ int xe_shrinker_create(struct xe_device *xe)


  INIT_WORK(&shrinker->pm_worker, xe_shrinker_pm); shrinker->xe = xe;

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+	shrinker->min_age_ms =

CONFIG_DRM_XE_SHRINKER_MIN_AGE_MS;
  rwlock_init(&shrinker->lock);

  shrinker->purge_shrink->count_objects =
xe_shrinker_count_purgeable;

drivers/gpu/drm/xe/xe_shrinker.h +0 -0
index 4b3c73689619..586d7772bd58 100644
@@ -18,4 +18,7 @@ int xe_shrinker_non_purgeable_seeks(struct
 xe_shrinker *shrinker);

 int xe_shrinker_set_non_purgeable_seeks(struct xe_shrinker *shrinker,
  unsigned int seeks);
+unsigned int xe_shrinker_min_age_ms(struct xe_shrinker *shrinker);
+void xe_shrinker_set_min_age_ms(struct xe_shrinker *shrinker, unsigned int ms);
+
 #endif

drivers/gpu/drm/xe/xe_vm.c +0 -0
index 86c3b4fd232f..583c55b7f97d 100644
@@ -463,13 +463,15 @@ void xe_vm_bump_lru(struct xe_vm *vm,

struct
drm_exec *exec)
  spinlock_t *lru_lock = &vm->xe->ttm.lru_lock; struct drm_gem_object *obj;

drivers/gpu/drm/xe/xe_vm.c +2 -0
+	WRITE_ONCE(vm->lru_stamp, jiffies);
+

  spin_lock(lru_lock); ttm_lru_bulk_move_tail(&vm->lru_bulk_move); drm_exec_for_each_locked_object(exec, obj) { if (!drm_gpuvm_is_extobj(&vm->gpuvm, obj)) continue;

drivers/gpu/drm/xe/xe_vm.c +0 -1
-		ttm_bo_move_to_lru_tail(&gem_to_xe_bo(obj)-
Quoted 1 line

ttm);

drivers/gpu/drm/xe/xe_vm.c +1 -0
+		xe_bo_bump_lru_locked(gem_to_xe_bo(obj));

  cond_resched_lock(lru_lock);
  }
  spin_unlock(lru_lock);

drivers/gpu/drm/xe/xe_vm_types.h +0 -0
index fb9305124679..046505a285e9 100644
@@ -267,6 +267,14 @@ struct xe_vm {
  	/** @lru_bulk_move: Bulk LRU move list for this VM's BOs
 */
  	struct ttm_lru_bulk_move lru_bulk_move;

drivers/gpu/drm/xe/xe_vm_types.h +2 -0
+	/**
+	 * @lru_stamp: jiffies at the last xe_vm_bump_lru(),

which
is where

drivers/gpu/drm/xe/xe_vm_types.h +1 -0
+	 * @lru_bulk_move is moved to the LRU tail. Ages every

BO in
that

Quoted 9 lines

drivers/gpu/drm/xe/xe_vm_types.h

Quoted 6 lines
drivers/gpu/drm/xe/xe_vm_types.h +1 -0
+	 * bulk move for the shrinker's minimum age gate.

Accessed
with

drivers/gpu/drm/xe/xe_vm_types.h +3 -0
+	 * READ_ONCE()/WRITE_ONCE().
+	 */
+	unsigned long lru_stamp;

Isn't the bo resv / vm resv always held then this is accessed?

Quoted 1 line

xe_bo_shrink_too_young is the lockless read side.

Hm. To me it looks like all accesses have the bo resv held, eliminating the need for READ_ONCE() / WRITE_ONCE(), and xe_bo_shrink_too_young() also requires resv?

Also another thing that came up is that during a pagefault, for a vm bo, the code timestamps the bo (which IMO is correct), but the shrinker reads the vm timestamp and never picks up the bo timestamp. I believe the shrinker should pick the younger of the two.

Thanks,
Thomas

Quoted 12 lines

Matt

Quoted 9 lines

Thanks,
Thomas

Quoted 4 lines

+
  u64 size;

  struct xe_pt *pt_root[XE_MAX_TILES_PER_DEVICE];

author maintainer
#14 lore raw

Re: [PATCH v6 3/3] drm/xe: Add a minimum age gate to the shrinker

Quoted 915 lines · Thomas Hellström
Quoted 82 lines · Matthew Brost
Quoted 65 lines · Thomas Hellström
Quoted 56 lines · Matthew Brost

Backing up a BO costs a GPU blit plus a page copy, and if the BO is
part
of an active working set it is faulted straight back in on the next
exec.
Evicting a BO that was used moments ago is therefore almost always a
loss, yet the shrinker has no notion of recency beyond LRU order.

Timestamp BOs wherever their LRU position is updated, and read the
stamp
back from whatever owns that position. A BO in a VM's bulk move is
anchored inside its range, so it is aged by the VM-wide stamp taken
in
xe_vm_bump_lru() alongside the bulk move itself. Any other BO carries
its own, stamped there too and on a successful move into TT in xe_bo_move(), where ttm_resource_alloc() has already placed the new
resource at the LRU tail.

Add a per-device shrinker_min_age_ms sysfs attribute, defaulting to
CONFIG_DRM_XE_SHRINKER_MIN_AGE_MS (0, disabled). While set, the shrinker
won't back up BOs younger than the delay. Each LRU priority is roughly
age ordered, so the gate is applied per priority:
xe_shrinker_count()
snoops the first shrinkable BO of each priority and reports nothing
only
if all of them are young, and the backup walk skips to the next priority
at the first young BO, both as a backstop for the count sample and so
a
hot priority doesn't shield colder BOs in another one.

Only BOs this shrinker would actually back up have a say. BOs in XE_PL_SYSTEM, which are not GPU mapped and hence not part of a working
set, and BOs xe_bo_shrink() rejects outright are never young. Purgeable
BOs and those advised DONTNEED are neither: they are dropped rather
than
backed up and accounted to the purgeable shrinker, so they are never
young and the count snoop skips their XE_BO_PRIORITY_LOW band entirely.

Quoted 7 lines

The gate is hard and applies at every reclaim priority, so a working
set
kept younger than the delay is never backed up and can lead to OOM.
This
is deliberate, and why it is off by default.

Quoted 3 lines

For completeness, Perhaps add to the commit message that the plan is to follow up with an OOM notifier?

That is a possible option. Another idea I had was if we can get the priority exported from the shrinker core - we have a config knob that says 'at this priority or greater', shrink BOs which have been used recently.

Quoted 6 lines

I also wonder what happens during the PM notifier preparing for suspend
on DGFX, Does that move mark bos accessed, hence possibly blocked by
the shrinker at suspend time?

Quoted 7 lines

I haven't tried this on DGFX, can give it try but this off by default.

I'm also a little confused by this - does the shrinker run at suspend time? I thought once the memory in ram a hiberation image in created from the that - i.e., there isn't a requirement the BOs to get shrunk into shmem.

The problem occurs when evicting VRAM to system memory during the pm notifier. If system fills up then the shrinker kicks in. But if that eviction from VRAM to system doesn't bump LRU / update timestamps then that is not a problem.

For hibernation I'm not sure whether whether we actually see backup shrinking, since it requires __GFP_FS and __GFP_IO for writeback, and I think those are turned off during hibernation shrinking.

Quoted 814 lines
Quoted 813 lines
Quoted 807 lines
Assisted-by LLM

---
 drivers/gpu/drm/xe/Kconfig.profile   |  15 +++ drivers/gpu/drm/xe/xe_bo.c           |  83 ++++++++++++++ drivers/gpu/drm/xe/xe_bo.h           |   5 + drivers/gpu/drm/xe/xe_bo_types.h     |   8 ++ drivers/gpu/drm/xe/xe_device_sysfs.c |  35 ++++++ drivers/gpu/drm/xe/xe_pagefault.c    |   2 +- drivers/gpu/drm/xe/xe_shrinker.c     | 164
+++++++++++++++++++++++++--
 drivers/gpu/drm/xe/xe_shrinker.h     |   3 + drivers/gpu/drm/xe/xe_vm.c           |   4 +- drivers/gpu/drm/xe/xe_vm_types.h     |   8 ++

 10 files changed, 316 insertions(+), 11 deletions(-)
drivers/gpu/drm/xe/Kconfig.profile +0 -0
index 23045ed2aa94..dd3985e502b8 100644
@@ -74,6 +74,7 @@ config DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT

    to apply to applicable user. For elevated user, all above
MIN
    and MAX values will apply when this configuration is enable to
    apply limitation. By default limitation is applied. +
 config DRM_XE_SHRINKER_NON_PURGEABLE_SEEKS
  int "Default seeks value of the non-purgeable bo shrinker"
  default 8

drivers/gpu/drm/xe/Kconfig.profile +0 -0
@@ -86,3 +87,17 @@ config DRM_XE_SHRINKER_NON_PURGEABLE_SEEKS
  	  reclaim pressure on non-purgeable buffer objects,

which
need
    GPU idling and writeback to be reclaimed, in favour of purgeable
    ones and other kernel caches.

drivers/gpu/drm/xe/Kconfig.profile +7 -0
+
+config DRM_XE_SHRINKER_MIN_AGE_MS
+	int "Default minimum BO age before shrinker backup (ms)"
+	default 0
+	range 0 1000000
+	help
+	  Default for the per-device shrinker_min_age_ms sysfs

attribute. The

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  shrinker won't back up a BO that was moved into TT, or

bumped on the

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  LRU by an exec, less than this many milliseconds ago.

BOs
already

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  evicted to system memory are not part of a working set

and
are

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  never protected. This applies at every reclaim

priority: a
working

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  set kept younger than this is never backed up and can

cause OOM.

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  Only set if that risk is preferred over thrashing a

hot
working

drivers/gpu/drm/xe/Kconfig.profile +1 -0
+	  set. 0 disables.
drivers/gpu/drm/xe/xe_bo.c +0 -0
index 42a6aa1a2e4a..a4c0c6284a24 100644
@@ -1357,9 +1357,92 @@ static int xe_bo_move(struct

ttm_buffer_object
*ttm_bo, bool evict,
  xe_tt_unmap_sg(xe, ttm_bo->ttm);
  }

drivers/gpu/drm/xe/xe_bo.c +2 -0
+	/*
+	 * ttm_resource_alloc() already placed the new resource

at
the tail of

drivers/gpu/drm/xe/xe_bo.c +1 -0
+	 * its LRU, or of @bo's bulk move, so only record when

that
happened.

drivers/gpu/drm/xe/xe_bo.c +2 -0
+	 */
+	if (!ret && ttm_bo->resource && ttm_bo->resource-
Quoted 1 line

mem_type

== XE_PL_TT)

drivers/gpu/drm/xe/xe_bo.c +2 -0
+		WRITE_ONCE(bo->lru_stamp, jiffies);
+

  return ret;
 }

+/**
+ * xe_bo_bump_lru_locked() - Bump a BO on the LRU and stamp its last
use
+ * @bo: The buffer object, reserved by the caller.
+ *
+ * Move @bo to the tail of its LRU and record the time for the shrinker's
+ * minimum age gate. Only meaningful for BOs outside a bulk move,
since a
+ * BO in one is anchored inside its range and is bumped, and aged,
with it.
+ * The caller must hold the device LRU lock.
+ */

drivers/gpu/drm/xe/xe_bo.c +8 -0
+void xe_bo_bump_lru_locked(struct xe_bo *bo)
+{
+	WRITE_ONCE(bo->lru_stamp, jiffies);
+	ttm_bo_move_to_lru_tail(&bo->ttm);
+}
+
+/**
+ * xe_bo_shrink_backup_candidate() - Whether the shrinker may

back
up a BO
+ * @bo: The TTM buffer object, reserved by the caller.
+ *
+ * A BO is a backup candidate if backing it up is the only way to
reclaim it.
+ * BOs advised DONTNEED, which sit at XE_BO_PRIORITY_LOW, and purgeable ones
+ * are not: their pages are simply dropped, which is cheap, and they
are
+ * accounted to the purgeable shrinker. Neither are the BOs xe_bo_shrink()
+ * hands to xe_bo_shrink_purge() outright: ghost BOs, which aren't
xe BOs,
+ * and BOs already freed and waiting to be reaped. Nor are BOs whose
tt
+ * isn't TTM_TT_FLAG_EXTERNAL_MAPPABLE, which xe_bo_shrink() rejects.
+ *
+ * Return: true if @bo would be backed up by a non-purge shrink pass.
+ */

drivers/gpu/drm/xe/xe_bo.c +5 -0
+bool xe_bo_shrink_backup_candidate(struct ttm_buffer_object *bo)
+{
+	struct xe_ttm_tt *xe_tt;
+
+	if (!xe_bo_is_xe_bo(bo) || !kref_read(&bo-
Quoted 1 line

base.refcount) ||

!bo->ttm ||

drivers/gpu/drm/xe/xe_bo.c +1 -0
+	    !(bo->ttm->page_flags &

TTM_TT_FLAG_EXTERNAL_MAPPABLE)

Quoted 1 line
Quoted 1 line
drivers/gpu/drm/xe/xe_bo.c +10 -0
+	    bo->priority <= XE_BO_PRIORITY_LOW)
+		return false;
+
+	xe_tt = container_of(bo->ttm, struct xe_ttm_tt, ttm);
+
+	return !xe_tt->purgeable;
+}
+
+/**
+ * xe_bo_shrink_too_young() - Whether a BO was used too recently

to
shrink
+ * @bo: The TTM buffer object, reserved by the caller.
+ * @min_age: Minimum age in jiffies. 0 disables the check.
+ *
+ * The age is taken from whatever owns @bo's LRU position:
&xe_vm.lru_stamp
+ * if @bo rides along with a VM's bulk move, its own &xe_bo.lru_stamp if not.
+ *
+ * BOs that the shrink walk would not back up anyway are never considered
+ * young, see xe_bo_shrink_backup_candidate(). Neither are BOs in
+ * XE_PL_SYSTEM: they are not GPU mapped, hence not part of a working set,
+ * and must be moved back to TT, refreshing the stamp, before use.
+ *
+ * Return: true if @bo was touched less than @min_age jiffies ago.
+ */
+bool xe_bo_shrink_too_young(struct ttm_buffer_object *bo, unsigned
long min_age)

drivers/gpu/drm/xe/xe_bo.c +5 -0
+{
+	struct xe_bo *xe_bo;
+	unsigned long stamp;
+
+	if (!min_age || bo->resource->mem_type == XE_PL_SYSTEM

||

drivers/gpu/drm/xe/xe_bo.c +12 -0
+	    !xe_bo_shrink_backup_candidate(bo))
+		return false;
+
+	xe_bo = ttm_to_xe_bo(bo);
+	if (bo->bulk_move && xe_bo->vm)
+		stamp = READ_ONCE(xe_bo->vm->lru_stamp);
+	else
+		stamp = READ_ONCE(xe_bo->lru_stamp);
+
+	return stamp && time_before(jiffies, stamp + min_age);
+}
+

 static long xe_bo_shrink_purge(struct ttm_operation_ctx *ctx, struct ttm_buffer_object *bo, unsigned long *scanned)

drivers/gpu/drm/xe/xe_bo.h +0 -0
index 77b3a02e9b8e..65d4c638e8d8 100644
@@ -623,6 +623,11 @@ struct xe_bo_shrink_flags {
  	u32 writeback : 1;
  };

drivers/gpu/drm/xe/xe_bo.h +3 -0
+void xe_bo_bump_lru_locked(struct xe_bo *bo);
+
+bool xe_bo_shrink_backup_candidate(struct ttm_buffer_object

*bo);
+bool xe_bo_shrink_too_young(struct ttm_buffer_object *bo, unsigned
long min_age);
+
 long xe_bo_shrink(struct ttm_operation_ctx *ctx, struct ttm_buffer_object *bo,
    const struct xe_bo_shrink_flags flags, unsigned long *scanned);

drivers/gpu/drm/xe/xe_bo_types.h +0 -0
index 0265fb314c77..f63b668c7134 100644
@@ -49,6 +49,14 @@ struct xe_bo {
  	u32 flags;
  	/** @vm: VM this BO is attached to, for extobj this will

be
NULL */
  struct xe_vm *vm;

drivers/gpu/drm/xe/xe_bo_types.h +2 -0
+	/**
+	 * @lru_stamp: jiffies at the last LRU bump, done on a

move
into TT

drivers/gpu/drm/xe/xe_bo_types.h +1 -0
+	 * and at exec time. Only describes the LRU position of

a BO
outside

drivers/gpu/drm/xe/xe_bo_types.h +1 -0
+	 * a bulk move; BOs in one are aged by &xe_vm.lru_stamp

instead.

drivers/gpu/drm/xe/xe_bo_types.h +1 -0
+	 * Consulted by the shrinker's minimum age gate.

Accessed
with

drivers/gpu/drm/xe/xe_bo_types.h +3 -0
+	 * READ_ONCE()/WRITE_ONCE().
+	 */
+	unsigned long lru_stamp;

  /**
  * @q: Queue this BO is attached to, mostly for LRC BO, NULL
otherwise.
  * Protected by the BO dma_resv: readers must hold it across
both the

drivers/gpu/drm/xe/xe_device_sysfs.c +0 -0
index ff5d25dd867c..26b1f71ed522 100644
@@ -38,6 +38,12 @@
   * 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.
+ *
+ * shrinker_min_age_ms - Report/change the minimum time, in ms, since a BO was
+ * last moved to TT or bumped on the LRU by an exec before the shrinker may
+ * back it up. BOs evicted to system memory are never protected. Defaults to
+ * CONFIG_DRM_XE_SHRINKER_MIN_AGE_MS, 0 disables. This applies at
every
+ * reclaim priority, so a non-zero value can lead to OOM. */

 static ssize_t

drivers/gpu/drm/xe/xe_device_sysfs.c +0 -0
@@ -331,8 +337,37 @@ shrinker_non_purgeable_seeks_store(struct

device
*dev,

 static DEVICE_ATTR_RW(shrinker_non_purgeable_seeks);

drivers/gpu/drm/xe/xe_device_sysfs.c +2 -0
+static ssize_t
+shrinker_min_age_ms_show(struct device *dev, struct

device_attribute
*attr,

drivers/gpu/drm/xe/xe_device_sysfs.c +3 -0
+			 char *buf)
+{
+	struct xe_device *xe =

pdev_to_xe_device(to_pci_dev(dev));

drivers/gpu/drm/xe/xe_device_sysfs.c +2 -0
+
+	return sysfs_emit(buf, "%u\n",

xe_shrinker_min_age_ms(xe-

Quoted 1 line

mem.shrinker));

drivers/gpu/drm/xe/xe_device_sysfs.c +4 -0
+}
+
+static ssize_t
+shrinker_min_age_ms_store(struct device *dev, struct

device_attribute *attr,

drivers/gpu/drm/xe/xe_device_sysfs.c +3 -0
+			  const char *buff, size_t count)
+{
+	struct xe_device *xe =

pdev_to_xe_device(to_pci_dev(dev));

drivers/gpu/drm/xe/xe_device_sysfs.c +14 -0
+	unsigned int ms;
+	int ret;
+
+	ret = kstrtouint(buff, 0, &ms);
+	if (ret)
+		return ret;
+
+	xe_shrinker_set_min_age_ms(xe->mem.shrinker, ms);
+
+	return count;
+}
+
+static DEVICE_ATTR_RW(shrinker_min_age_ms);
+

 static struct attribute *shrinker_attrs[] = { &dev_attr_shrinker_non_purgeable_seeks.attr,

drivers/gpu/drm/xe/xe_device_sysfs.c +1 -0
+	&dev_attr_shrinker_min_age_ms.attr,

  NULL
 };

drivers/gpu/drm/xe/xe_pagefault.c +0 -0
index 6828f81df50e..895866d639f8 100644
@@ -226,7 +226,7 @@ static int xe_pagefault_handle_vma(struct

xe_gt
*gt, struct xe_vma *vma,

  if (bo) { scoped_guard(spinlock, &vm->xe-

Quoted 1 line

ttm.lru_lock)

-

					ttm_bo_move_to_lru_tail(&bo-
Quoted 1 line

ttm);

drivers/gpu/drm/xe/xe_pagefault.c +1 -0
+					xe_bo_bump_lru_locked(bo

);
  }
  }
  xe_validation_ctx_fini(&ctx);

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
index c86455ea08d1..64e5e684f591 100644
@@ -39,6 +39,8 @@
   * @shrink: Pointer to the mm shrinker handling non-purgeable

(shrinkable) objects.
  * @purge_shrink: Pointer to the mm shrinker handling purgeable objects.
  * @pm_worker: Worker to wake up the device if required.
+ * @min_age_ms: Minimum BO age before backup, in ms. 0 disables. Defaults to
+ * CONFIG_DRM_XE_SHRINKER_MIN_AGE_MS, overridable through sysfs. */
 struct xe_shrinker {
  struct xe_device *xe;

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
@@ -50,6 +52,7 @@ struct xe_shrinker {
  	struct shrinker *shrink;
  	struct shrinker *purge_shrink;
  	struct work_struct pm_worker;
+	unsigned int min_age_ms;
  };


 static struct xe_shrinker *to_xe_shrinker(struct shrinker *shrink)

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -104,6 +107,7 @@ static void xe_shrinker_runtime_pm_put(struct

xe_shrinker *shrinker, bool runtim
 static int __xe_shrinker_walk(struct xe_shrinker *shrinker, struct ttm_operation_ctx *ctx, const struct xe_bo_shrink_flags flags,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			      unsigned long min_age,

        unsigned long to_scan, unsigned long
*scanned,
        unsigned long *freed) {

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -136,6 +140,16 @@ static int __xe_shrinker_walk(struct

xe_shrinker
*shrinker,
  if (flags.purge && ttm_bo->priority > XE_BO_PRIORITY_LOW)
  break;

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+			/*
+			 * Each LRU priority is roughly age

ordered,
so the

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			 * rest of this priority is most likely

young too.

drivers/gpu/drm/xe/xe_shrinker.c +3 -0
+			 * Move on to the next priority.
+			 */
+			if (xe_bo_shrink_too_young(ttm_bo,

min_age))
{

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+				ttm_bo_lru_cursor_skip_priority(

&cur
s);

drivers/gpu/drm/xe/xe_shrinker.c +3 -0
+				continue;
+			}
+

  if (!ttm_bo_shrink_suitable(ttm_bo, ctx))
  continue;

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -171,6 +185,7 @@ static int __xe_shrinker_walk(struct

xe_shrinker
*shrinker,
 static int xe_shrinker_walk(struct xe_shrinker *shrinker, struct ttm_operation_ctx *ctx, const struct xe_bo_shrink_flags flags,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			    unsigned long min_age,

      unsigned long to_scan, unsigned long *scanned,
      unsigned long *freed)
 {

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -180,26 +195,126 @@ static int xe_shrinker_walk(struct

xe_shrinker
*shrinker,

  swap(no_wait_gpu, ctx->no_wait_gpu);
  save_flags.writeback = false;

drivers/gpu/drm/xe/xe_shrinker.c +0 -1
-	ret = __xe_shrinker_walk(shrinker, ctx, save_flags,

to_scan,
scanned,

drivers/gpu/drm/xe/xe_shrinker.c +1 -1
-				 freed);
+	ret = __xe_shrinker_walk(shrinker, ctx, save_flags,

min_age,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+				 to_scan, scanned, freed);

  swap(no_wait_gpu, ctx->no_wait_gpu);
  if (ret || *scanned >= to_scan)
  return ret;

  if (!ctx->no_wait_gpu) {

drivers/gpu/drm/xe/xe_shrinker.c +0 -1
-		ret = __xe_shrinker_walk(shrinker, ctx,

save_flags,
to_scan, scanned,

drivers/gpu/drm/xe/xe_shrinker.c +1 -1
-					 freed);
+		ret = __xe_shrinker_walk(shrinker, ctx,

save_flags,
min_age,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+					 to_scan, scanned,

freed);
  if (ret || *scanned >= to_scan)
  return ret;
  }

  if (flags.writeback)

drivers/gpu/drm/xe/xe_shrinker.c +0 -1
-		ret = __xe_shrinker_walk(shrinker, ctx, flags,

to_scan, scanned,

drivers/gpu/drm/xe/xe_shrinker.c +1 -1
-					 freed);
+		ret = __xe_shrinker_walk(shrinker, ctx, flags,

min_age,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+					 to_scan, scanned,

freed);

  return ret;
 }

+/**
+ * DOC: Shrinker minimum age
+ *
+ * The per-device shrinker_min_age_ms sysfs attribute, defaulting to
+ * CONFIG_DRM_XE_SHRINKER_MIN_AGE_MS, protects recently used BOs from backup.
+ * A BO's age is taken from whatever owns its position on the LRU,
and is
+ * stamped wherever that position is updated: the VM-wide stamp for
a BO
+ * riding along with a VM's bulk move, bumped on exec in xe_vm_bump_lru(),
+ * its own stamp otherwise, bumped there as well and on a move into
TT in
+ * xe_bo_move(). BOs in XE_PL_SYSTEM are never young: they are not
GPU
+ * mapped, so not part of a working set, and will be stamped again
when
+ * moved back to TT for use.
+ *
+ * The gate is applied per LRU priority, each of which is roughly
age
+ * ordered. xe_shrinker_count() snoops the first shrinkable BO of
each
+ * priority on each TT-backed LRU. Only if all of them are young does it stop
+ * reporting shrinkable pages; anything else, including reaching no
verdict
+ * at all, lets it report. The backup walk in xe_shrinker_scan() skips to the
+ * next priority at the first young BO, as a backstop since the count snoop
+ * is only a sample. A hot priority thus doesn't shield colder BOs
in another
+ * priority. BOs that aren't backed up anyway have no say either
way: those
+ * in XE_PL_SYSTEM are never young, and purgeable and DONTNEED ones,
which
+ * belong to the purgeable shrinker, are ignored by the snoop entirely.
+ *
+ * The gate is hard and applies at every reclaim priority. A working
set kept
+ * younger than the delay is never backed up, which can lead to OOM.
This is
+ * intended for users who prefer that risk over thrashing a hot working set,
+ * hence it is disabled by default.
+ */
+static unsigned long xe_shrinker_min_age(struct xe_shrinker *shrinker)

drivers/gpu/drm/xe/xe_shrinker.c +7 -0
+{
+	unsigned int ms = READ_ONCE(shrinker->min_age_ms);
+
+	return ms ? msecs_to_jiffies(ms) : 0;
+}
+
+/* Max shrink-unsuitable BOs to skip per LRU before giving up

the
snoop. */

drivers/gpu/drm/xe/xe_shrinker.c +4 -0
+#define XE_SHRINKER_SNOOP_MAX	16
+
+/*
+ * Whether the first BO of every priority on every TT-backed LRU

that this
+ * shrinker would back up is younger than @min_age. BOs are trylocked through
+ * the reserved LRU walker since their tt may be torn down while still on the
+ * LRU. Contended BOs are skipped by the walker, and may be all of
them. If no
+ * verdict can be reached, because nothing was inspected or the snoop budget
+ * ran out, report not young and leave it to the scan side check.
+ */

drivers/gpu/drm/xe/xe_shrinker.c +14 -0
+static bool xe_shrinker_lru_young(struct xe_shrinker *shrinker,
+				  unsigned long min_age)
+{
+	struct ttm_operation_ctx ctx = {
+		.interruptible = false,
+		.no_wait_gpu = false,
+	};
+	struct xe_device *xe = shrinker->xe;
+	unsigned int mem_type;
+	bool young = false;
+
+	for (mem_type = XE_PL_SYSTEM; mem_type <= XE_PL_TT;
++mem_type) {
+		struct ttm_resource_manager *man =

ttm_manager_type(&xe->ttm, mem_type);

drivers/gpu/drm/xe/xe_shrinker.c +12 -0
+		struct ttm_bo_lru_cursor curs;
+		struct ttm_buffer_object *ttm_bo;
+		struct ttm_lru_walk_arg arg = {
+			.ctx = &ctx,
+			.trylock_only = true,
+		};
+		unsigned int budget = XE_SHRINKER_SNOOP_MAX;
+
+		if (!man || !man->use_tt)
+			continue;
+
+		ttm_bo_lru_for_each_reserved_guarded(&curs, man,

&arg, ttm_bo) {

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+			/*
+			 * Nothing in the DONTNEED band is

backed
up, and it

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			 * is accounted to the purgeable

shrinker,
so it has

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			 * no say here. Skip the whole band in

one
go.

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+			 */
+			if (ttm_bo->priority <=

XE_BO_PRIORITY_LOW)
{

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+				ttm_bo_lru_cursor_skip_priority(

&cur
s);

drivers/gpu/drm/xe/xe_shrinker.c +4 -0
+				continue;
+			}
+
+			if (!ttm_bo_shrink_suitable(ttm_bo,

&ctx) ||

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			   

!xe_bo_shrink_backup_candidate(ttm_bo))
{

drivers/gpu/drm/xe/xe_shrinker.c +6 -0
+				if (!--budget)
+					return false;
+				continue;
+			}
+
+			if (!xe_bo_shrink_too_young(ttm_bo,

min_age))

drivers/gpu/drm/xe/xe_shrinker.c +10 -0
+				return false;
+
+			young = true;
+			ttm_bo_lru_cursor_skip_priority(&curs);
+		}
+	}
+
+	return young;
+}
+

 static unsigned long xe_shrinker_count_purgeable(struct shrinker *shrink, struct shrink_control *sc)
 {

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -239,7 +354,7 @@ static unsigned long

 xe_shrinker_count(struct shrinker *shrink, struct shrink_control *sc)
 {
  struct xe_shrinker *shrinker = to_xe_shrinker(shrink);

drivers/gpu/drm/xe/xe_shrinker.c +1 -1
-	unsigned long num_pages;
+	unsigned long num_pages, min_age;

  bool can_backup = !!(sc->gfp_mask & __GFP_FS);
  if (!can_backup)

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -263,6 +378,10 @@ xe_shrinker_count(struct shrinker *shrink,
 struct shrink_control *sc)


  write_unlock(&shrinker->lock);

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+	min_age = xe_shrinker_min_age(shrinker);
+	if (num_pages && min_age &&

xe_shrinker_lru_young(shrinker,
min_age))

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+		return SHRINK_EMPTY;
+

  return num_pages ? num_pages : SHRINK_EMPTY; }

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -297,7 +416,8 @@ static unsigned long
 xe_shrinker_scan_purgeable(struct shrinker *shrink,
  		.purge = true,
  	};

drivers/gpu/drm/xe/xe_shrinker.c +0 -1
-	xe_shrinker_walk(shrinker, &ctx, shrink_flags,

nr_to_scan,
&nr_scanned, &freed);

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+	xe_shrinker_walk(shrinker, &ctx, shrink_flags, 0,

nr_to_scan, &nr_scanned,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			 &freed);


  sc->nr_scanned = nr_scanned;

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -322,7 +442,9 @@ static unsigned long xe_shrinker_scan(struct

shrinker *shrink, struct shrink_con
  /* Might need runtime PM to access backed-up or CCS- compressed data. */
  runtime_pm = xe_shrinker_runtime_pm_get(shrinker);

drivers/gpu/drm/xe/xe_shrinker.c +0 -1
-	xe_shrinker_walk(shrinker, &ctx, shrink_flags,

nr_to_scan,
&nr_scanned, &freed);

drivers/gpu/drm/xe/xe_shrinker.c +2 -0
+	xe_shrinker_walk(shrinker, &ctx, shrink_flags,
+			 xe_shrinker_min_age(shrinker),

nr_to_scan,
&nr_scanned,

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+			 &freed);


  sc->nr_scanned = nr_scanned; xe_shrinker_runtime_pm_put(shrinker, runtime_pm);

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -387,6 +509,29 @@ int

xe_shrinker_set_non_purgeable_seeks(struct
xe_shrinker *shrinker,
  return 0;
 }

+/**
+ * xe_shrinker_min_age_ms() - Get the shrinker minimum BO age
+ * @shrinker: Pointer to the struct xe_shrinker.
+ *
+ * Return: Minimum age, in ms, a BO must reach before it may be backed up.
+ */
+unsigned int xe_shrinker_min_age_ms(struct xe_shrinker *shrinker)

drivers/gpu/drm/xe/xe_shrinker.c +6 -0
+{
+	return READ_ONCE(shrinker->min_age_ms);
+}
+
+/**
+ * xe_shrinker_set_min_age_ms() - Set the shrinker minimum BO

age
+ * @shrinker: Pointer to the struct xe_shrinker.
+ * @ms: Minimum age, in ms. 0 disables the gate.
+ *
+ * See DOC: Shrinker minimum age. A non-zero value can lead to OOM.
+ */
+void xe_shrinker_set_min_age_ms(struct xe_shrinker *shrinker, unsigned int ms)

drivers/gpu/drm/xe/xe_shrinker.c +4 -0
+{
+	WRITE_ONCE(shrinker->min_age_ms, ms);
+}
+

 /**
  * xe_shrinker_create() - Create an xe per-device shrinker
  * @xe: Pointer to the xe device.

drivers/gpu/drm/xe/xe_shrinker.c +0 -0
@@ -415,6 +560,7 @@ int xe_shrinker_create(struct xe_device *xe)


  INIT_WORK(&shrinker->pm_worker, xe_shrinker_pm); shrinker->xe = xe;

drivers/gpu/drm/xe/xe_shrinker.c +1 -0
+	shrinker->min_age_ms =

CONFIG_DRM_XE_SHRINKER_MIN_AGE_MS;
  rwlock_init(&shrinker->lock);

  shrinker->purge_shrink->count_objects =
xe_shrinker_count_purgeable;

drivers/gpu/drm/xe/xe_shrinker.h +0 -0
index 4b3c73689619..586d7772bd58 100644
@@ -18,4 +18,7 @@ int xe_shrinker_non_purgeable_seeks(struct
 xe_shrinker *shrinker);

 int xe_shrinker_set_non_purgeable_seeks(struct xe_shrinker *shrinker,
  unsigned int seeks);
+unsigned int xe_shrinker_min_age_ms(struct xe_shrinker *shrinker);
+void xe_shrinker_set_min_age_ms(struct xe_shrinker *shrinker, unsigned int ms);
+
 #endif

drivers/gpu/drm/xe/xe_vm.c +0 -0
index 86c3b4fd232f..583c55b7f97d 100644
@@ -463,13 +463,15 @@ void xe_vm_bump_lru(struct xe_vm *vm,

struct
drm_exec *exec)
  spinlock_t *lru_lock = &vm->xe->ttm.lru_lock; struct drm_gem_object *obj;

drivers/gpu/drm/xe/xe_vm.c +2 -0
+	WRITE_ONCE(vm->lru_stamp, jiffies);
+

  spin_lock(lru_lock); ttm_lru_bulk_move_tail(&vm->lru_bulk_move); drm_exec_for_each_locked_object(exec, obj) { if (!drm_gpuvm_is_extobj(&vm->gpuvm, obj)) continue;

drivers/gpu/drm/xe/xe_vm.c +0 -1
-		ttm_bo_move_to_lru_tail(&gem_to_xe_bo(obj)-
Quoted 1 line

ttm);

drivers/gpu/drm/xe/xe_vm.c +1 -0
+		xe_bo_bump_lru_locked(gem_to_xe_bo(obj));

  cond_resched_lock(lru_lock);
  }
  spin_unlock(lru_lock);

drivers/gpu/drm/xe/xe_vm_types.h +0 -0
index fb9305124679..046505a285e9 100644
@@ -267,6 +267,14 @@ struct xe_vm {
  	/** @lru_bulk_move: Bulk LRU move list for this VM's BOs
 */
  	struct ttm_lru_bulk_move lru_bulk_move;

drivers/gpu/drm/xe/xe_vm_types.h +2 -0
+	/**
+	 * @lru_stamp: jiffies at the last xe_vm_bump_lru(),

which
is where

drivers/gpu/drm/xe/xe_vm_types.h +1 -0
+	 * @lru_bulk_move is moved to the LRU tail. Ages every

BO in
that

drivers/gpu/drm/xe/xe_vm_types.h +1 -0
+	 * bulk move for the shrinker's minimum age gate.

Accessed
with

drivers/gpu/drm/xe/xe_vm_types.h

Quoted 3 lines
drivers/gpu/drm/xe/xe_vm_types.h +3 -0
+	 * READ_ONCE()/WRITE_ONCE().
+	 */
+	unsigned long lru_stamp;

Isn't the bo resv / vm resv always held then this is accessed?

Quoted 6 lines
Quoted 1 line

xe_bo_shrink_too_young is the lockless read side.

Hm. To me it looks like all accesses have the bo resv held, eliminating the need for READ_ONCE() / WRITE_ONCE(), and xe_bo_shrink_too_young() also requires resv?

I think you are right, let me drop the READ_ONCE/WRITE_ONCE + add lock annotations to xe_bo_shrink_too_young.

Quoted 5 lines

Also another thing that came up is that during a pagefault, for a vm bo, the code timestamps the bo (which IMO is correct), but the shrinker reads the vm timestamp and never picks up the bo timestamp. I believe the shrinker should pick the younger of the two.

In the case of page faults bo->bulk_move will be NULL so BO's timestamp is always read.

Matt

Quoted 16 lines

Thanks,
Thomas

Quoted 12 lines

Matt

Quoted 9 lines

Thanks,
Thomas

Quoted 4 lines

+
  u64 size;

  struct xe_pt *pt_root[XE_MAX_TILES_PER_DEVICE];