* [PATCH v5 00/12] TTM shrinker helpers and xe buffer object shrinker
@ 2024-06-18 7:18 Thomas Hellström
2024-06-18 7:18 ` [PATCH v5 01/12] drm/ttm: Allow TTM LRU list nodes of different types Thomas Hellström
` (19 more replies)
0 siblings, 20 replies; 36+ messages in thread
From: Thomas Hellström @ 2024-06-18 7:18 UTC (permalink / raw)
To: intel-xe
Cc: Thomas Hellström, Somalapuram Amaranath,
Christian König, Matthew Brost, dri-devel
This series implements TTM shrinker / eviction helpers and an xe bo
shrinker. It builds on two previous series, *and obsoletes these*. First
https://www.mail-archive.com/dri-devel@lists.freedesktop.org/msg484425.html
Second the previous TTM shrinker series
https://lore.kernel.org/linux-mm/b7491378-defd-4f1c-31e2-29e4c77e2d67@amd.com/T/
Where the comment about layering
https://lore.kernel.org/linux-mm/b7491378-defd-4f1c-31e2-29e4c77e2d67@amd.com/T/#ma918844aa8a6efe8768fdcda0c6590d5c93850c9
now addressed, and this version also implements shmem objects for backup
rather than direct swap-cache insertions, which was used in the previuos
series. It turns out that with per-page backup / shrinking, shmem objects
appears to work just as well as direct swap-cache insertions with the
added benefit that was introduced in the previous TTM shrinker series to
avoid running out of swap entries isn't really needed.
Patch 1-4 implements restartable LRU list iteration.
Patch 5 implements a LRU walker + resv locking helper
Patch 6 moves TTM swapping over to the walker.
Patch 7 moves TTM eviction over to the walker.
Patch 8 could in theory be skipped but introduces a possibility to easily
add or test multiple backup backends, like the direct swap-cache
insertion or even files into fast dedicated nvme storage for for example.
Patch 9 introduces helpers in the ttm_pool code for page-by-page shrinking
and recovery. It avoids having to temporarily allocate a huge amount of
memory to be able to shrink a buffer object. It also introduces the
possibility to immediately write-back pages if needed, since that tends
to be a bit delayed when left to kswapd.
Patch 10 Adds a simple error injection to the above code to help increase
test coverage.
Patch 11 Implements an xe bo shrinker and a common helper in TTM for
shrinking.
Patch 12-21 are really a separate POC series, for introducing drm_exec locking
in TTM. The patch touches both drm_exec and dma-buf and is for now marked as
an RFC:
Patch 12 Increases (removes) the XE_PL_TT watermark.
v2:
- Squash obsolete revision history in the patch commit messages.
- Fix a couple of review comments by Christian
- Don't store the mem_type in the TTM managers but in the
resource cursor.
- Rename introduced TTM *back_up* function names to *backup*
- Add ttm pool recovery fault injection.
- Shrinker xe kunit test
- Various bugfixes
v3:
- Address some review comments from Matthew Brost and Christian König.
- Use the restartable LRU walk for TTM swapping and eviction.
- Provide a POC drm_exec locking implementation for exhaustive
eviction. (Christian König).
v4:
- Remove the RFC exhaustive eviction part. While the path to exhaustive
eviction is pretty clear and demonstrated in v3, there is still some
drm_exec work that needs to be agreed and implemented.
- Add shrinker power management. On some hw we need to wake when shrinking.
- Fix the lru walker helper for -EALREADY errors.
- Add drm/xe: Increase the XE_PL_TT watermark.
v5:
- Update also TTM kunit tests
- Handle ghost- and zombie objects in the shrinker.
- A couple of compile- and UAF fixes reported by Kernel Build Robot and
Dan Carpenter.
Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: <dri-devel@lists.freedesktop.org>
Thomas Hellström (12):
drm/ttm: Allow TTM LRU list nodes of different types
drm/ttm: Slightly clean up LRU list iteration
drm/ttm: Use LRU hitches
drm/ttm, drm/amdgpu, drm/xe: Consider hitch moves within bulk sublist
moves
drm/ttm: Provide a generic LRU walker helper
drm/ttm: Use the LRU walker helper for swapping
drm/ttm: Use the LRU walker for eviction
drm/ttm: Add a virtual base class for graphics memory backup
drm/ttm/pool: Provide a helper to shrink pages
drm/ttm: Use fault-injection to test error paths
drm/ttm, drm/xe: Add a shrinker for xe bos
drm/xe: Increase the XE_PL_TT watermark
drivers/gpu/drm/Kconfig | 10 +
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 +
drivers/gpu/drm/ttm/Makefile | 2 +-
drivers/gpu/drm/ttm/tests/ttm_bo_test.c | 6 +-
drivers/gpu/drm/ttm/tests/ttm_resource_test.c | 2 +-
drivers/gpu/drm/ttm/ttm_backup_shmem.c | 139 ++++++
drivers/gpu/drm/ttm/ttm_bo.c | 463 ++++++++----------
drivers/gpu/drm/ttm/ttm_bo_util.c | 212 ++++++++
drivers/gpu/drm/ttm/ttm_device.c | 29 +-
drivers/gpu/drm/ttm/ttm_pool.c | 412 +++++++++++++++-
drivers/gpu/drm/ttm/ttm_resource.c | 264 ++++++++--
drivers/gpu/drm/ttm/ttm_tt.c | 37 ++
drivers/gpu/drm/xe/Makefile | 1 +
drivers/gpu/drm/xe/tests/xe_bo.c | 118 +++++
drivers/gpu/drm/xe/tests/xe_bo_test.c | 1 +
drivers/gpu/drm/xe/tests/xe_bo_test.h | 1 +
drivers/gpu/drm/xe/xe_bo.c | 155 +++++-
drivers/gpu/drm/xe/xe_bo.h | 26 +
drivers/gpu/drm/xe/xe_device.c | 8 +
drivers/gpu/drm/xe/xe_device_types.h | 2 +
drivers/gpu/drm/xe/xe_shrinker.c | 287 +++++++++++
drivers/gpu/drm/xe/xe_shrinker.h | 18 +
drivers/gpu/drm/xe/xe_ttm_sys_mgr.c | 3 +-
drivers/gpu/drm/xe/xe_vm.c | 4 +
include/drm/ttm/ttm_backup.h | 136 +++++
include/drm/ttm/ttm_bo.h | 48 +-
include/drm/ttm/ttm_pool.h | 5 +
include/drm/ttm/ttm_resource.h | 99 +++-
include/drm/ttm/ttm_tt.h | 20 +
29 files changed, 2133 insertions(+), 379 deletions(-)
create mode 100644 drivers/gpu/drm/ttm/ttm_backup_shmem.c
create mode 100644 drivers/gpu/drm/xe/xe_shrinker.c
create mode 100644 drivers/gpu/drm/xe/xe_shrinker.h
create mode 100644 include/drm/ttm/ttm_backup.h
--
2.44.0
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v5 01/12] drm/ttm: Allow TTM LRU list nodes of different types
2024-06-18 7:18 [PATCH v5 00/12] TTM shrinker helpers and xe buffer object shrinker Thomas Hellström
@ 2024-06-18 7:18 ` Thomas Hellström
2024-06-18 7:18 ` [PATCH v5 02/12] drm/ttm: Slightly clean up LRU list iteration Thomas Hellström
` (18 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Thomas Hellström @ 2024-06-18 7:18 UTC (permalink / raw)
To: intel-xe
Cc: Thomas Hellström, Christian König,
Somalapuram Amaranath, Matthew Brost, dri-devel
To be able to handle list unlocking while traversing the LRU
list, we want the iterators not only to point to the next
position of the list traversal, but to insert themselves as
list nodes at that point to work around the fact that the
next node might otherwise disappear from the list while
the iterator is pointing to it.
These list nodes need to be easily distinguishable from other
list nodes so that others traversing the list can skip
over them.
So declare a struct ttm_lru_item, with a struct list_head member
and a type enum. This will slightly increase the size of a
struct ttm_resource.
Changes in previous series:
- Update enum ttm_lru_item_type documentation.
v3:
- Introduce ttm_lru_first_res_or_null()
(Christian König, Thomas Hellström)
v5:
- Update also the TTM test code (Xe CI).
Cc: Christian König <christian.koenig@amd.com>
Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: <dri-devel@lists.freedesktop.org>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
---
drivers/gpu/drm/ttm/tests/ttm_bo_test.c | 6 +-
drivers/gpu/drm/ttm/tests/ttm_resource_test.c | 2 +-
drivers/gpu/drm/ttm/ttm_device.c | 4 +-
drivers/gpu/drm/ttm/ttm_resource.c | 89 +++++++++++++++----
include/drm/ttm/ttm_resource.h | 54 ++++++++++-
5 files changed, 129 insertions(+), 26 deletions(-)
diff --git a/drivers/gpu/drm/ttm/tests/ttm_bo_test.c b/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
index 1f8a4f8adc92..ddbb895feaa2 100644
--- a/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
+++ b/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
@@ -265,7 +265,7 @@ static void ttm_bo_unreserve_basic(struct kunit *test)
man = ttm_manager_type(priv->ttm_dev, mem_type);
KUNIT_ASSERT_EQ(test,
- list_is_last(&res1->lru, &man->lru[bo->priority]), 1);
+ list_is_last(&res1->lru.link, &man->lru[bo->priority]), 1);
ttm_resource_free(bo, &res2);
ttm_resource_free(bo, &res1);
@@ -302,11 +302,11 @@ static void ttm_bo_unreserve_pinned(struct kunit *test)
err = ttm_resource_alloc(bo, place, &res2);
KUNIT_ASSERT_EQ(test, err, 0);
KUNIT_ASSERT_EQ(test,
- list_is_last(&res2->lru, &priv->ttm_dev->pinned), 1);
+ list_is_last(&res2->lru.link, &priv->ttm_dev->pinned), 1);
ttm_bo_unreserve(bo);
KUNIT_ASSERT_EQ(test,
- list_is_last(&res1->lru, &priv->ttm_dev->pinned), 1);
+ list_is_last(&res1->lru.link, &priv->ttm_dev->pinned), 1);
ttm_resource_free(bo, &res1);
ttm_resource_free(bo, &res2);
diff --git a/drivers/gpu/drm/ttm/tests/ttm_resource_test.c b/drivers/gpu/drm/ttm/tests/ttm_resource_test.c
index 029e1f094bb0..681ac8b746ef 100644
--- a/drivers/gpu/drm/ttm/tests/ttm_resource_test.c
+++ b/drivers/gpu/drm/ttm/tests/ttm_resource_test.c
@@ -198,7 +198,7 @@ static void ttm_resource_fini_basic(struct kunit *test)
ttm_resource_init(bo, place, res);
ttm_resource_fini(man, res);
- KUNIT_ASSERT_TRUE(test, list_empty(&res->lru));
+ KUNIT_ASSERT_TRUE(test, list_empty(&res->lru.link));
KUNIT_ASSERT_EQ(test, man->usage, 0);
}
diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c
index 434cf0258000..09411978a13a 100644
--- a/drivers/gpu/drm/ttm/ttm_device.c
+++ b/drivers/gpu/drm/ttm/ttm_device.c
@@ -274,14 +274,14 @@ static void ttm_device_clear_lru_dma_mappings(struct ttm_device *bdev,
struct ttm_resource *res;
spin_lock(&bdev->lru_lock);
- while ((res = list_first_entry_or_null(list, typeof(*res), lru))) {
+ while ((res = ttm_lru_first_res_or_null(list))) {
struct ttm_buffer_object *bo = res->bo;
/* Take ref against racing releases once lru_lock is unlocked */
if (!ttm_bo_get_unless_zero(bo))
continue;
- list_del_init(&res->lru);
+ list_del_init(&bo->resource->lru.link);
spin_unlock(&bdev->lru_lock);
if (bo->ttm)
diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c
index 4a66b851b67d..db9a7a3717c4 100644
--- a/drivers/gpu/drm/ttm/ttm_resource.c
+++ b/drivers/gpu/drm/ttm/ttm_resource.c
@@ -70,8 +70,8 @@ void ttm_lru_bulk_move_tail(struct ttm_lru_bulk_move *bulk)
dma_resv_assert_held(pos->last->bo->base.resv);
man = ttm_manager_type(pos->first->bo->bdev, i);
- list_bulk_move_tail(&man->lru[j], &pos->first->lru,
- &pos->last->lru);
+ list_bulk_move_tail(&man->lru[j], &pos->first->lru.link,
+ &pos->last->lru.link);
}
}
}
@@ -84,14 +84,38 @@ ttm_lru_bulk_move_pos(struct ttm_lru_bulk_move *bulk, struct ttm_resource *res)
return &bulk->pos[res->mem_type][res->bo->priority];
}
+/* Return the previous resource on the list (skip over non-resource list items) */
+static struct ttm_resource *ttm_lru_prev_res(struct ttm_resource *cur)
+{
+ struct ttm_lru_item *lru = &cur->lru;
+
+ do {
+ lru = list_prev_entry(lru, link);
+ } while (!ttm_lru_item_is_res(lru));
+
+ return ttm_lru_item_to_res(lru);
+}
+
+/* Return the next resource on the list (skip over non-resource list items) */
+static struct ttm_resource *ttm_lru_next_res(struct ttm_resource *cur)
+{
+ struct ttm_lru_item *lru = &cur->lru;
+
+ do {
+ lru = list_next_entry(lru, link);
+ } while (!ttm_lru_item_is_res(lru));
+
+ return ttm_lru_item_to_res(lru);
+}
+
/* Move the resource to the tail of the bulk move range */
static void ttm_lru_bulk_move_pos_tail(struct ttm_lru_bulk_move_pos *pos,
struct ttm_resource *res)
{
if (pos->last != res) {
if (pos->first == res)
- pos->first = list_next_entry(res, lru);
- list_move(&res->lru, &pos->last->lru);
+ pos->first = ttm_lru_next_res(res);
+ list_move(&res->lru.link, &pos->last->lru.link);
pos->last = res;
}
}
@@ -122,11 +146,11 @@ static void ttm_lru_bulk_move_del(struct ttm_lru_bulk_move *bulk,
pos->first = NULL;
pos->last = NULL;
} else if (pos->first == res) {
- pos->first = list_next_entry(res, lru);
+ pos->first = ttm_lru_next_res(res);
} else if (pos->last == res) {
- pos->last = list_prev_entry(res, lru);
+ pos->last = ttm_lru_prev_res(res);
} else {
- list_move(&res->lru, &pos->last->lru);
+ list_move(&res->lru.link, &pos->last->lru.link);
}
}
@@ -155,7 +179,7 @@ void ttm_resource_move_to_lru_tail(struct ttm_resource *res)
lockdep_assert_held(&bo->bdev->lru_lock);
if (bo->pin_count) {
- list_move_tail(&res->lru, &bdev->pinned);
+ list_move_tail(&res->lru.link, &bdev->pinned);
} else if (bo->bulk_move) {
struct ttm_lru_bulk_move_pos *pos =
@@ -166,7 +190,7 @@ void ttm_resource_move_to_lru_tail(struct ttm_resource *res)
struct ttm_resource_manager *man;
man = ttm_manager_type(bdev, res->mem_type);
- list_move_tail(&res->lru, &man->lru[bo->priority]);
+ list_move_tail(&res->lru.link, &man->lru[bo->priority]);
}
}
@@ -197,9 +221,9 @@ void ttm_resource_init(struct ttm_buffer_object *bo,
man = ttm_manager_type(bo->bdev, place->mem_type);
spin_lock(&bo->bdev->lru_lock);
if (bo->pin_count)
- list_add_tail(&res->lru, &bo->bdev->pinned);
+ list_add_tail(&res->lru.link, &bo->bdev->pinned);
else
- list_add_tail(&res->lru, &man->lru[bo->priority]);
+ list_add_tail(&res->lru.link, &man->lru[bo->priority]);
man->usage += res->size;
spin_unlock(&bo->bdev->lru_lock);
}
@@ -221,7 +245,7 @@ void ttm_resource_fini(struct ttm_resource_manager *man,
struct ttm_device *bdev = man->bdev;
spin_lock(&bdev->lru_lock);
- list_del_init(&res->lru);
+ list_del_init(&res->lru.link);
man->usage -= res->size;
spin_unlock(&bdev->lru_lock);
}
@@ -472,14 +496,16 @@ struct ttm_resource *
ttm_resource_manager_first(struct ttm_resource_manager *man,
struct ttm_resource_cursor *cursor)
{
- struct ttm_resource *res;
+ struct ttm_lru_item *lru;
lockdep_assert_held(&man->bdev->lru_lock);
for (cursor->priority = 0; cursor->priority < TTM_MAX_BO_PRIORITY;
++cursor->priority)
- list_for_each_entry(res, &man->lru[cursor->priority], lru)
- return res;
+ list_for_each_entry(lru, &man->lru[cursor->priority], link) {
+ if (ttm_lru_item_is_res(lru))
+ return ttm_lru_item_to_res(lru);
+ }
return NULL;
}
@@ -498,15 +524,40 @@ ttm_resource_manager_next(struct ttm_resource_manager *man,
struct ttm_resource_cursor *cursor,
struct ttm_resource *res)
{
+ struct ttm_lru_item *lru = &res->lru;
+
lockdep_assert_held(&man->bdev->lru_lock);
- list_for_each_entry_continue(res, &man->lru[cursor->priority], lru)
- return res;
+ list_for_each_entry_continue(lru, &man->lru[cursor->priority], link) {
+ if (ttm_lru_item_is_res(lru))
+ return ttm_lru_item_to_res(lru);
+ }
for (++cursor->priority; cursor->priority < TTM_MAX_BO_PRIORITY;
++cursor->priority)
- list_for_each_entry(res, &man->lru[cursor->priority], lru)
- return res;
+ list_for_each_entry(lru, &man->lru[cursor->priority], link) {
+ if (ttm_lru_item_is_res(lru))
+ ttm_lru_item_to_res(lru);
+ }
+
+ return NULL;
+}
+
+/**
+ * ttm_lru_first_res_or_null() - Return the first resource on an lru list
+ * @head: The list head of the lru list.
+ *
+ * Return: Pointer to the first resource on the lru list or NULL if
+ * there is none.
+ */
+struct ttm_resource *ttm_lru_first_res_or_null(struct list_head *head)
+{
+ struct ttm_lru_item *lru;
+
+ list_for_each_entry(lru, head, link) {
+ if (ttm_lru_item_is_res(lru))
+ return ttm_lru_item_to_res(lru);
+ }
return NULL;
}
diff --git a/include/drm/ttm/ttm_resource.h b/include/drm/ttm/ttm_resource.h
index 69769355139f..1511d91e290d 100644
--- a/include/drm/ttm/ttm_resource.h
+++ b/include/drm/ttm/ttm_resource.h
@@ -49,6 +49,43 @@ struct io_mapping;
struct sg_table;
struct scatterlist;
+/**
+ * enum ttm_lru_item_type - enumerate ttm_lru_item subclasses
+ */
+enum ttm_lru_item_type {
+ /** @TTM_LRU_RESOURCE: The resource subclass */
+ TTM_LRU_RESOURCE,
+ /** @TTM_LRU_HITCH: The iterator hitch subclass */
+ TTM_LRU_HITCH
+};
+
+/**
+ * struct ttm_lru_item - The TTM lru list node base class
+ * @link: The list link
+ * @type: The subclass type
+ */
+struct ttm_lru_item {
+ struct list_head link;
+ enum ttm_lru_item_type type;
+};
+
+/**
+ * ttm_lru_item_init() - initialize a struct ttm_lru_item
+ * @item: The item to initialize
+ * @type: The subclass type
+ */
+static inline void ttm_lru_item_init(struct ttm_lru_item *item,
+ enum ttm_lru_item_type type)
+{
+ item->type = type;
+ INIT_LIST_HEAD(&item->link);
+}
+
+static inline bool ttm_lru_item_is_res(const struct ttm_lru_item *item)
+{
+ return item->type == TTM_LRU_RESOURCE;
+}
+
struct ttm_resource_manager_func {
/**
* struct ttm_resource_manager_func member alloc
@@ -217,9 +254,21 @@ struct ttm_resource {
/**
* @lru: Least recently used list, see &ttm_resource_manager.lru
*/
- struct list_head lru;
+ struct ttm_lru_item lru;
};
+/**
+ * ttm_lru_item_to_res() - Downcast a struct ttm_lru_item to a struct ttm_resource
+ * @item: The struct ttm_lru_item to downcast
+ *
+ * Return: Pointer to the embedding struct ttm_resource
+ */
+static inline struct ttm_resource *
+ttm_lru_item_to_res(struct ttm_lru_item *item)
+{
+ return container_of(item, struct ttm_resource, lru);
+}
+
/**
* struct ttm_resource_cursor
*
@@ -393,6 +442,9 @@ ttm_resource_manager_next(struct ttm_resource_manager *man,
struct ttm_resource_cursor *cursor,
struct ttm_resource *res);
+struct ttm_resource *
+ttm_lru_first_res_or_null(struct list_head *head);
+
/**
* ttm_resource_manager_for_each_res - iterate over all resources
* @man: the resource manager
--
2.44.0
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH v5 02/12] drm/ttm: Slightly clean up LRU list iteration
2024-06-18 7:18 [PATCH v5 00/12] TTM shrinker helpers and xe buffer object shrinker Thomas Hellström
2024-06-18 7:18 ` [PATCH v5 01/12] drm/ttm: Allow TTM LRU list nodes of different types Thomas Hellström
@ 2024-06-18 7:18 ` Thomas Hellström
2024-06-18 7:18 ` [PATCH v5 03/12] drm/ttm: Use LRU hitches Thomas Hellström
` (17 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Thomas Hellström @ 2024-06-18 7:18 UTC (permalink / raw)
To: intel-xe
Cc: Thomas Hellström, Christian König,
Somalapuram Amaranath, Matthew Brost, dri-devel
To make the transition to using lru hitches easier,
simplify the ttm_resource_manager_next() interface to only take
the cursor and reuse ttm_resource_manager_next() functionality
from ttm_resource_manager_first().
Cc: Christian König <christian.koenig@amd.com>
Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: <dri-devel@lists.freedesktop.org>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
---
drivers/gpu/drm/ttm/ttm_resource.c | 48 +++++++++++++-----------------
include/drm/ttm/ttm_resource.h | 10 ++++---
2 files changed, 27 insertions(+), 31 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c
index db9a7a3717c4..8bfbddddc0e8 100644
--- a/drivers/gpu/drm/ttm/ttm_resource.c
+++ b/drivers/gpu/drm/ttm/ttm_resource.c
@@ -496,50 +496,44 @@ struct ttm_resource *
ttm_resource_manager_first(struct ttm_resource_manager *man,
struct ttm_resource_cursor *cursor)
{
- struct ttm_lru_item *lru;
-
lockdep_assert_held(&man->bdev->lru_lock);
- for (cursor->priority = 0; cursor->priority < TTM_MAX_BO_PRIORITY;
- ++cursor->priority)
- list_for_each_entry(lru, &man->lru[cursor->priority], link) {
- if (ttm_lru_item_is_res(lru))
- return ttm_lru_item_to_res(lru);
- }
-
- return NULL;
+ cursor->priority = 0;
+ cursor->man = man;
+ cursor->cur = &man->lru[cursor->priority];
+ return ttm_resource_manager_next(cursor);
}
/**
* ttm_resource_manager_next
*
- * @man: resource manager to iterate over
* @cursor: cursor to record the position
- * @res: the current resource pointer
*
- * Returns the next resource from the resource manager.
+ * Return: the next resource from the resource manager.
*/
struct ttm_resource *
-ttm_resource_manager_next(struct ttm_resource_manager *man,
- struct ttm_resource_cursor *cursor,
- struct ttm_resource *res)
+ttm_resource_manager_next(struct ttm_resource_cursor *cursor)
{
- struct ttm_lru_item *lru = &res->lru;
+ struct ttm_resource_manager *man = cursor->man;
+ struct ttm_lru_item *lru;
lockdep_assert_held(&man->bdev->lru_lock);
- list_for_each_entry_continue(lru, &man->lru[cursor->priority], link) {
- if (ttm_lru_item_is_res(lru))
- return ttm_lru_item_to_res(lru);
- }
-
- for (++cursor->priority; cursor->priority < TTM_MAX_BO_PRIORITY;
- ++cursor->priority)
- list_for_each_entry(lru, &man->lru[cursor->priority], link) {
- if (ttm_lru_item_is_res(lru))
- ttm_lru_item_to_res(lru);
+ for (;;) {
+ lru = list_entry(cursor->cur, typeof(*lru), link);
+ list_for_each_entry_continue(lru, &man->lru[cursor->priority], link) {
+ if (ttm_lru_item_is_res(lru)) {
+ cursor->cur = &lru->link;
+ return ttm_lru_item_to_res(lru);
+ }
}
+ if (++cursor->priority >= TTM_MAX_BO_PRIORITY)
+ break;
+
+ cursor->cur = &man->lru[cursor->priority];
+ }
+
return NULL;
}
diff --git a/include/drm/ttm/ttm_resource.h b/include/drm/ttm/ttm_resource.h
index 1511d91e290d..7d81fd5b5b83 100644
--- a/include/drm/ttm/ttm_resource.h
+++ b/include/drm/ttm/ttm_resource.h
@@ -272,11 +272,15 @@ ttm_lru_item_to_res(struct ttm_lru_item *item)
/**
* struct ttm_resource_cursor
*
+ * @man: The resource manager currently being iterated over.
+ * @cur: The list head the cursor currently points to.
* @priority: the current priority
*
* Cursor to iterate over the resources in a manager.
*/
struct ttm_resource_cursor {
+ struct ttm_resource_manager *man;
+ struct list_head *cur;
unsigned int priority;
};
@@ -438,9 +442,7 @@ struct ttm_resource *
ttm_resource_manager_first(struct ttm_resource_manager *man,
struct ttm_resource_cursor *cursor);
struct ttm_resource *
-ttm_resource_manager_next(struct ttm_resource_manager *man,
- struct ttm_resource_cursor *cursor,
- struct ttm_resource *res);
+ttm_resource_manager_next(struct ttm_resource_cursor *cursor);
struct ttm_resource *
ttm_lru_first_res_or_null(struct list_head *head);
@@ -455,7 +457,7 @@ ttm_lru_first_res_or_null(struct list_head *head);
*/
#define ttm_resource_manager_for_each_res(man, cursor, res) \
for (res = ttm_resource_manager_first(man, cursor); res; \
- res = ttm_resource_manager_next(man, cursor, res))
+ res = ttm_resource_manager_next(cursor))
struct ttm_kmap_iter *
ttm_kmap_iter_iomap_init(struct ttm_kmap_iter_iomap *iter_io,
--
2.44.0
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH v5 03/12] drm/ttm: Use LRU hitches
2024-06-18 7:18 [PATCH v5 00/12] TTM shrinker helpers and xe buffer object shrinker Thomas Hellström
2024-06-18 7:18 ` [PATCH v5 01/12] drm/ttm: Allow TTM LRU list nodes of different types Thomas Hellström
2024-06-18 7:18 ` [PATCH v5 02/12] drm/ttm: Slightly clean up LRU list iteration Thomas Hellström
@ 2024-06-18 7:18 ` Thomas Hellström
2024-06-18 7:18 ` [PATCH v5 04/12] drm/ttm, drm/amdgpu, drm/xe: Consider hitch moves within bulk sublist moves Thomas Hellström
` (16 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Thomas Hellström @ 2024-06-18 7:18 UTC (permalink / raw)
To: intel-xe
Cc: Thomas Hellström, Christian König,
Somalapuram Amaranath, Matthew Brost, dri-devel
Have iterators insert themselves into the list they are iterating
over using hitch list nodes. Since only the iterator owner
can remove these list nodes from the list, it's safe to unlock
the list and when continuing, use them as a starting point. Due to
the way LRU bumping works in TTM, newly added items will not be
missed, and bumped items will be iterated over a second time before
reaching the end of the list.
The exception is list with bulk move sublists. When bumping a
sublist, a hitch that is part of that sublist will also be moved
and we might miss items if restarting from it. This will be
addressed in a later patch.
Changes in previous series:
- Updated ttm_resource_cursor_fini() documentation.
v2:
- Don't reorder ttm_resource_manager_first() and _next().
(Christian König).
- Use list_add instead of list_move
(Christian König)
v3:
- Split into two patches, one cleanup, one new functionality
(Christian König)
- use ttm_resource_cursor_fini_locked() instead of open-coding
(Matthew Brost)
Cc: Christian König <christian.koenig@amd.com>
Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: <dri-devel@lists.freedesktop.org>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
---
drivers/gpu/drm/ttm/ttm_bo.c | 1 +
drivers/gpu/drm/ttm/ttm_device.c | 9 +++--
drivers/gpu/drm/ttm/ttm_resource.c | 56 +++++++++++++++++++++++++-----
include/drm/ttm/ttm_resource.h | 9 +++--
4 files changed, 62 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 6396dece0db1..43eda720657f 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -621,6 +621,7 @@ int ttm_mem_evict_first(struct ttm_device *bdev,
if (locked)
dma_resv_unlock(res->bo->base.resv);
}
+ ttm_resource_cursor_fini_locked(&cursor);
if (!bo) {
if (busy_bo && !ttm_bo_get_unless_zero(busy_bo))
diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c
index 09411978a13a..f9e9b1ec8c8a 100644
--- a/drivers/gpu/drm/ttm/ttm_device.c
+++ b/drivers/gpu/drm/ttm/ttm_device.c
@@ -170,12 +170,17 @@ int ttm_device_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx,
num_pages = PFN_UP(bo->base.size);
ret = ttm_bo_swapout(bo, ctx, gfp_flags);
/* ttm_bo_swapout has dropped the lru_lock */
- if (!ret)
+ if (!ret) {
+ ttm_resource_cursor_fini(&cursor);
return num_pages;
- if (ret != -EBUSY)
+ }
+ if (ret != -EBUSY) {
+ ttm_resource_cursor_fini(&cursor);
return ret;
+ }
}
}
+ ttm_resource_cursor_fini_locked(&cursor);
spin_unlock(&bdev->lru_lock);
return 0;
}
diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c
index 8bfbddddc0e8..9c8b6499edfb 100644
--- a/drivers/gpu/drm/ttm/ttm_resource.c
+++ b/drivers/gpu/drm/ttm/ttm_resource.c
@@ -33,6 +33,37 @@
#include <drm/drm_util.h>
+/**
+ * ttm_resource_cursor_fini_locked() - Finalize the LRU list cursor usage
+ * @cursor: The struct ttm_resource_cursor to finalize.
+ *
+ * The function pulls the LRU list cursor off any lists it was previusly
+ * attached to. Needs to be called with the LRU lock held. The function
+ * can be called multiple times after eachother.
+ */
+void ttm_resource_cursor_fini_locked(struct ttm_resource_cursor *cursor)
+{
+ lockdep_assert_held(&cursor->man->bdev->lru_lock);
+ list_del_init(&cursor->hitch.link);
+}
+
+/**
+ * ttm_resource_cursor_fini() - Finalize the LRU list cursor usage
+ * @cursor: The struct ttm_resource_cursor to finalize.
+ *
+ * The function pulls the LRU list cursor off any lists it was previusly
+ * attached to. Needs to be called without the LRU list lock held. The
+ * function can be called multiple times after eachother.
+ */
+void ttm_resource_cursor_fini(struct ttm_resource_cursor *cursor)
+{
+ spinlock_t *lru_lock = &cursor->man->bdev->lru_lock;
+
+ spin_lock(lru_lock);
+ ttm_resource_cursor_fini_locked(cursor);
+ spin_unlock(lru_lock);
+}
+
/**
* ttm_lru_bulk_move_init - initialize a bulk move structure
* @bulk: the structure to init
@@ -485,12 +516,15 @@ void ttm_resource_manager_debug(struct ttm_resource_manager *man,
EXPORT_SYMBOL(ttm_resource_manager_debug);
/**
- * ttm_resource_manager_first
- *
+ * ttm_resource_manager_first() - Start iterating over the resources
+ * of a resource manager
* @man: resource manager to iterate over
* @cursor: cursor to record the position
*
- * Returns the first resource from the resource manager.
+ * Initializes the cursor and starts iterating. When done iterating,
+ * the caller must explicitly call ttm_resource_cursor_fini().
+ *
+ * Return: The first resource from the resource manager.
*/
struct ttm_resource *
ttm_resource_manager_first(struct ttm_resource_manager *man,
@@ -500,13 +534,15 @@ ttm_resource_manager_first(struct ttm_resource_manager *man,
cursor->priority = 0;
cursor->man = man;
- cursor->cur = &man->lru[cursor->priority];
+ ttm_lru_item_init(&cursor->hitch, TTM_LRU_HITCH);
+ list_add(&cursor->hitch.link, &man->lru[cursor->priority]);
+
return ttm_resource_manager_next(cursor);
}
/**
- * ttm_resource_manager_next
- *
+ * ttm_resource_manager_next() - Continue iterating over the resource manager
+ * resources
* @cursor: cursor to record the position
*
* Return: the next resource from the resource manager.
@@ -520,10 +556,10 @@ ttm_resource_manager_next(struct ttm_resource_cursor *cursor)
lockdep_assert_held(&man->bdev->lru_lock);
for (;;) {
- lru = list_entry(cursor->cur, typeof(*lru), link);
+ lru = &cursor->hitch;
list_for_each_entry_continue(lru, &man->lru[cursor->priority], link) {
if (ttm_lru_item_is_res(lru)) {
- cursor->cur = &lru->link;
+ list_move(&cursor->hitch.link, &lru->link);
return ttm_lru_item_to_res(lru);
}
}
@@ -531,9 +567,11 @@ ttm_resource_manager_next(struct ttm_resource_cursor *cursor)
if (++cursor->priority >= TTM_MAX_BO_PRIORITY)
break;
- cursor->cur = &man->lru[cursor->priority];
+ list_move(&cursor->hitch.link, &man->lru[cursor->priority]);
}
+ ttm_resource_cursor_fini_locked(cursor);
+
return NULL;
}
diff --git a/include/drm/ttm/ttm_resource.h b/include/drm/ttm/ttm_resource.h
index 7d81fd5b5b83..8fac781f641e 100644
--- a/include/drm/ttm/ttm_resource.h
+++ b/include/drm/ttm/ttm_resource.h
@@ -273,17 +273,22 @@ ttm_lru_item_to_res(struct ttm_lru_item *item)
* struct ttm_resource_cursor
*
* @man: The resource manager currently being iterated over.
- * @cur: The list head the cursor currently points to.
+ * @hitch: A hitch list node inserted before the next resource
+ * to iterate over.
* @priority: the current priority
*
* Cursor to iterate over the resources in a manager.
*/
struct ttm_resource_cursor {
struct ttm_resource_manager *man;
- struct list_head *cur;
+ struct ttm_lru_item hitch;
unsigned int priority;
};
+void ttm_resource_cursor_fini_locked(struct ttm_resource_cursor *cursor);
+
+void ttm_resource_cursor_fini(struct ttm_resource_cursor *cursor);
+
/**
* struct ttm_lru_bulk_move_pos
*
--
2.44.0
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH v5 04/12] drm/ttm, drm/amdgpu, drm/xe: Consider hitch moves within bulk sublist moves
2024-06-18 7:18 [PATCH v5 00/12] TTM shrinker helpers and xe buffer object shrinker Thomas Hellström
` (2 preceding siblings ...)
2024-06-18 7:18 ` [PATCH v5 03/12] drm/ttm: Use LRU hitches Thomas Hellström
@ 2024-06-18 7:18 ` Thomas Hellström
2024-06-19 3:37 ` Matthew Brost
2024-06-18 7:18 ` [PATCH v5 05/12] drm/ttm: Provide a generic LRU walker helper Thomas Hellström
` (15 subsequent siblings)
19 siblings, 1 reply; 36+ messages in thread
From: Thomas Hellström @ 2024-06-18 7:18 UTC (permalink / raw)
To: intel-xe
Cc: Thomas Hellström, Christian König,
Somalapuram Amaranath, Matthew Brost, dri-devel
To address the problem with hitches moving when bulk move
sublists are lru-bumped, register the list cursors with the
ttm_lru_bulk_move structure when traversing its list, and
when lru-bumping the list, move the cursor hitch to the tail.
This also means it's mandatory for drivers to call
ttm_lru_bulk_move_init() and ttm_lru_bulk_move_fini() when
initializing and finalizing the bulk move structure, so add
those calls to the amdgpu- and xe driver.
Compared to v1 this is slightly more code but less fragile
and hopefully easier to understand.
Changes in previous series:
- Completely rework the functionality
- Avoid a NULL pointer dereference assigning manager->mem_type
- Remove some leftover code causing build problems
v2:
- For hitch bulk tail moves, store the mem_type in the cursor
instead of with the manager.
v3:
- Remove leftover mem_type member from change in v2.
Cc: Christian König <christian.koenig@amd.com>
Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: <dri-devel@lists.freedesktop.org>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++
drivers/gpu/drm/ttm/ttm_resource.c | 89 ++++++++++++++++++++++++++
drivers/gpu/drm/xe/xe_vm.c | 4 ++
include/drm/ttm/ttm_resource.h | 56 ++++++++++------
4 files changed, 132 insertions(+), 21 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 3abfa66d72a2..97743993d711 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -2420,6 +2420,8 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm,
if (r)
return r;
+ ttm_lru_bulk_move_init(&vm->lru_bulk_move);
+
vm->is_compute_context = false;
vm->use_cpu_for_update = !!(adev->vm_manager.vm_update_mode &
@@ -2484,6 +2486,7 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm,
error_free_delayed:
dma_fence_put(vm->last_tlb_flush);
dma_fence_put(vm->last_unlocked);
+ ttm_lru_bulk_move_fini(&adev->mman.bdev, &vm->lru_bulk_move);
amdgpu_vm_fini_entities(vm);
return r;
@@ -2640,6 +2643,7 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm)
}
}
+ ttm_lru_bulk_move_fini(&adev->mman.bdev, &vm->lru_bulk_move);
}
/**
diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c
index 9c8b6499edfb..a03090683e79 100644
--- a/drivers/gpu/drm/ttm/ttm_resource.c
+++ b/drivers/gpu/drm/ttm/ttm_resource.c
@@ -33,6 +33,49 @@
#include <drm/drm_util.h>
+/* Detach the cursor from the bulk move list*/
+static void
+ttm_resource_cursor_clear_bulk(struct ttm_resource_cursor *cursor)
+{
+ cursor->bulk = NULL;
+ list_del_init(&cursor->bulk_link);
+}
+
+/* Move the cursor to the end of the bulk move list it's in */
+static void ttm_resource_cursor_move_bulk_tail(struct ttm_lru_bulk_move *bulk,
+ struct ttm_resource_cursor *cursor)
+{
+ struct ttm_lru_bulk_move_pos *pos;
+
+ if (WARN_ON_ONCE(bulk != cursor->bulk)) {
+ list_del_init(&cursor->bulk_link);
+ return;
+ }
+
+ pos = &bulk->pos[cursor->mem_type][cursor->priority];
+ if (pos)
+ list_move(&cursor->hitch.link, &pos->last->lru.link);
+ ttm_resource_cursor_clear_bulk(cursor);
+}
+
+/* Move all cursors attached to a bulk move to its end */
+static void ttm_bulk_move_adjust_cursors(struct ttm_lru_bulk_move *bulk)
+{
+ struct ttm_resource_cursor *cursor, *next;
+
+ list_for_each_entry_safe(cursor, next, &bulk->cursor_list, bulk_link)
+ ttm_resource_cursor_move_bulk_tail(bulk, cursor);
+}
+
+/* Remove a cursor from an empty bulk move list */
+static void ttm_bulk_move_drop_cursors(struct ttm_lru_bulk_move *bulk)
+{
+ struct ttm_resource_cursor *cursor, *next;
+
+ list_for_each_entry_safe(cursor, next, &bulk->cursor_list, bulk_link)
+ ttm_resource_cursor_clear_bulk(cursor);
+}
+
/**
* ttm_resource_cursor_fini_locked() - Finalize the LRU list cursor usage
* @cursor: The struct ttm_resource_cursor to finalize.
@@ -45,6 +88,7 @@ void ttm_resource_cursor_fini_locked(struct ttm_resource_cursor *cursor)
{
lockdep_assert_held(&cursor->man->bdev->lru_lock);
list_del_init(&cursor->hitch.link);
+ ttm_resource_cursor_clear_bulk(cursor);
}
/**
@@ -73,9 +117,27 @@ void ttm_resource_cursor_fini(struct ttm_resource_cursor *cursor)
void ttm_lru_bulk_move_init(struct ttm_lru_bulk_move *bulk)
{
memset(bulk, 0, sizeof(*bulk));
+ INIT_LIST_HEAD(&bulk->cursor_list);
}
EXPORT_SYMBOL(ttm_lru_bulk_move_init);
+/**
+ * ttm_lru_bulk_move_fini - finalize a bulk move structure
+ * @bdev: The struct ttm_device
+ * @bulk: the structure to finalize
+ *
+ * Sanity checks that bulk moves don't have any
+ * resources left and hence no cursors attached.
+ */
+void ttm_lru_bulk_move_fini(struct ttm_device *bdev,
+ struct ttm_lru_bulk_move *bulk)
+{
+ spin_lock(&bdev->lru_lock);
+ ttm_bulk_move_drop_cursors(bulk);
+ spin_unlock(&bdev->lru_lock);
+}
+EXPORT_SYMBOL(ttm_lru_bulk_move_fini);
+
/**
* ttm_lru_bulk_move_tail - bulk move range of resources to the LRU tail.
*
@@ -88,6 +150,7 @@ void ttm_lru_bulk_move_tail(struct ttm_lru_bulk_move *bulk)
{
unsigned i, j;
+ ttm_bulk_move_adjust_cursors(bulk);
for (i = 0; i < TTM_NUM_MEM_TYPES; ++i) {
for (j = 0; j < TTM_MAX_BO_PRIORITY; ++j) {
struct ttm_lru_bulk_move_pos *pos = &bulk->pos[i][j];
@@ -515,6 +578,29 @@ void ttm_resource_manager_debug(struct ttm_resource_manager *man,
}
EXPORT_SYMBOL(ttm_resource_manager_debug);
+static void
+ttm_resource_cursor_check_bulk(struct ttm_resource_cursor *cursor,
+ struct ttm_lru_item *next_lru)
+{
+ struct ttm_resource *next = ttm_lru_item_to_res(next_lru);
+ struct ttm_lru_bulk_move *bulk = NULL;
+ struct ttm_buffer_object *bo = next->bo;
+
+ lockdep_assert_held(&cursor->man->bdev->lru_lock);
+ if (bo && bo->resource == next)
+ bulk = bo->bulk_move;
+
+ if (cursor->bulk != bulk) {
+ if (bulk) {
+ list_move_tail(&cursor->bulk_link, &bulk->cursor_list);
+ cursor->mem_type = next->mem_type;
+ } else {
+ list_del_init(&cursor->bulk_link);
+ }
+ cursor->bulk = bulk;
+ }
+}
+
/**
* ttm_resource_manager_first() - Start iterating over the resources
* of a resource manager
@@ -535,6 +621,7 @@ ttm_resource_manager_first(struct ttm_resource_manager *man,
cursor->priority = 0;
cursor->man = man;
ttm_lru_item_init(&cursor->hitch, TTM_LRU_HITCH);
+ INIT_LIST_HEAD(&cursor->bulk_link);
list_add(&cursor->hitch.link, &man->lru[cursor->priority]);
return ttm_resource_manager_next(cursor);
@@ -559,6 +646,7 @@ ttm_resource_manager_next(struct ttm_resource_cursor *cursor)
lru = &cursor->hitch;
list_for_each_entry_continue(lru, &man->lru[cursor->priority], link) {
if (ttm_lru_item_is_res(lru)) {
+ ttm_resource_cursor_check_bulk(cursor, lru);
list_move(&cursor->hitch.link, &lru->link);
return ttm_lru_item_to_res(lru);
}
@@ -568,6 +656,7 @@ ttm_resource_manager_next(struct ttm_resource_cursor *cursor)
break;
list_move(&cursor->hitch.link, &man->lru[cursor->priority]);
+ ttm_resource_cursor_clear_bulk(cursor);
}
ttm_resource_cursor_fini_locked(cursor);
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index 61d4d95a5377..226da3c74f9c 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -1339,6 +1339,8 @@ struct xe_vm *xe_vm_create(struct xe_device *xe, u32 flags)
INIT_WORK(&vm->destroy_work, vm_destroy_work_func);
+ ttm_lru_bulk_move_init(&vm->lru_bulk_move);
+
INIT_LIST_HEAD(&vm->preempt.exec_queues);
vm->preempt.min_run_period_ms = 10; /* FIXME: Wire up to uAPI */
@@ -1462,6 +1464,7 @@ struct xe_vm *xe_vm_create(struct xe_device *xe, u32 flags)
mutex_destroy(&vm->snap_mutex);
for_each_tile(tile, xe, id)
xe_range_fence_tree_fini(&vm->rftree[id]);
+ ttm_lru_bulk_move_fini(&xe->ttm, &vm->lru_bulk_move);
kfree(vm);
if (flags & XE_VM_FLAG_LR_MODE)
xe_pm_runtime_put(xe);
@@ -1605,6 +1608,7 @@ static void vm_destroy_work_func(struct work_struct *w)
XE_WARN_ON(vm->pt_root[id]);
trace_xe_vm_free(vm);
+ ttm_lru_bulk_move_fini(&xe->ttm, &vm->lru_bulk_move);
kfree(vm);
}
diff --git a/include/drm/ttm/ttm_resource.h b/include/drm/ttm/ttm_resource.h
index 8fac781f641e..571abb4861a6 100644
--- a/include/drm/ttm/ttm_resource.h
+++ b/include/drm/ttm/ttm_resource.h
@@ -269,26 +269,6 @@ ttm_lru_item_to_res(struct ttm_lru_item *item)
return container_of(item, struct ttm_resource, lru);
}
-/**
- * struct ttm_resource_cursor
- *
- * @man: The resource manager currently being iterated over.
- * @hitch: A hitch list node inserted before the next resource
- * to iterate over.
- * @priority: the current priority
- *
- * Cursor to iterate over the resources in a manager.
- */
-struct ttm_resource_cursor {
- struct ttm_resource_manager *man;
- struct ttm_lru_item hitch;
- unsigned int priority;
-};
-
-void ttm_resource_cursor_fini_locked(struct ttm_resource_cursor *cursor);
-
-void ttm_resource_cursor_fini(struct ttm_resource_cursor *cursor);
-
/**
* struct ttm_lru_bulk_move_pos
*
@@ -304,8 +284,9 @@ struct ttm_lru_bulk_move_pos {
/**
* struct ttm_lru_bulk_move
- *
* @pos: first/last lru entry for resources in the each domain/priority
+ * @cursor_list: The list of cursors currently traversing any of
+ * the sublists of @pos. Protected by the ttm device's lru_lock.
*
* Container for the current bulk move state. Should be used with
* ttm_lru_bulk_move_init() and ttm_bo_set_bulk_move().
@@ -315,8 +296,39 @@ struct ttm_lru_bulk_move_pos {
*/
struct ttm_lru_bulk_move {
struct ttm_lru_bulk_move_pos pos[TTM_NUM_MEM_TYPES][TTM_MAX_BO_PRIORITY];
+ struct list_head cursor_list;
};
+/**
+ * struct ttm_resource_cursor
+ * @man: The resource manager currently being iterated over
+ * @hitch: A hitch list node inserted before the next resource
+ * to iterate over.
+ * @bulk_link: A list link for the list of cursors traversing the
+ * bulk sublist of @bulk. Protected by the ttm device's lru_lock.
+ * @bulk: Pointer to struct ttm_lru_bulk_move whose subrange @hitch is
+ * inserted to. NULL if none. Never dereference this pointer since
+ * the struct ttm_lru_bulk_move object pointed to might have been
+ * freed. The pointer is only for comparison.
+ * @mem_type: The memory type of the LRU list being traversed.
+ * This field is valid iff @bulk != NULL.
+ * @priority: the current priority
+ *
+ * Cursor to iterate over the resources in a manager.
+ */
+struct ttm_resource_cursor {
+ struct ttm_resource_manager *man;
+ struct ttm_lru_item hitch;
+ struct list_head bulk_link;
+ struct ttm_lru_bulk_move *bulk;
+ unsigned int mem_type;
+ unsigned int priority;
+};
+
+void ttm_resource_cursor_fini_locked(struct ttm_resource_cursor *cursor);
+
+void ttm_resource_cursor_fini(struct ttm_resource_cursor *cursor);
+
/**
* struct ttm_kmap_iter_iomap - Specialization for a struct io_mapping +
* struct sg_table backed struct ttm_resource.
@@ -405,6 +417,8 @@ ttm_resource_manager_cleanup(struct ttm_resource_manager *man)
void ttm_lru_bulk_move_init(struct ttm_lru_bulk_move *bulk);
void ttm_lru_bulk_move_tail(struct ttm_lru_bulk_move *bulk);
+void ttm_lru_bulk_move_fini(struct ttm_device *bdev,
+ struct ttm_lru_bulk_move *bulk);
void ttm_resource_add_bulk_move(struct ttm_resource *res,
struct ttm_buffer_object *bo);
--
2.44.0
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH v5 05/12] drm/ttm: Provide a generic LRU walker helper
2024-06-18 7:18 [PATCH v5 00/12] TTM shrinker helpers and xe buffer object shrinker Thomas Hellström
` (3 preceding siblings ...)
2024-06-18 7:18 ` [PATCH v5 04/12] drm/ttm, drm/amdgpu, drm/xe: Consider hitch moves within bulk sublist moves Thomas Hellström
@ 2024-06-18 7:18 ` Thomas Hellström
2024-06-18 22:11 ` Matthew Brost
2024-06-18 7:18 ` [PATCH v5 06/12] drm/ttm: Use the LRU walker helper for swapping Thomas Hellström
` (14 subsequent siblings)
19 siblings, 1 reply; 36+ messages in thread
From: Thomas Hellström @ 2024-06-18 7:18 UTC (permalink / raw)
To: intel-xe
Cc: Thomas Hellström, Christian König,
Somalapuram Amaranath, Matthew Brost, dri-devel
Provide a generic LRU walker in TTM, in the spirit of drm_gem_lru_scan()
but building on the restartable TTM LRU functionality.
The LRU walker optionally supports locking objects as part of
a ww mutex locking transaction, to mimic to some extent the
current functionality in ttm. However any -EDEADLK return
is converted to -ENOMEM, so that the driver will need to back
off and possibly retry without being able to keep the
ticket.
v3:
- Move the helper to core ttm.
- Remove the drm_exec usage from it for now, it will be
reintroduced later in the series.
v4:
- Handle the -EALREADY case if ticketlocking.
Cc: Christian König <christian.koenig@amd.com>
Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: <dri-devel@lists.freedesktop.org>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
---
drivers/gpu/drm/ttm/ttm_bo_util.c | 145 ++++++++++++++++++++++++++++++
include/drm/ttm/ttm_bo.h | 32 +++++++
2 files changed, 177 insertions(+)
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index 0b3f4267130c..45fcaf6f8644 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -768,3 +768,148 @@ int ttm_bo_pipeline_gutting(struct ttm_buffer_object *bo)
ttm_tt_destroy(bo->bdev, ttm);
return ret;
}
+
+static bool ttm_lru_walk_trylock(struct ttm_lru_walk *walk,
+ struct ttm_buffer_object *bo,
+ bool *needs_unlock)
+{
+ struct ttm_operation_ctx *ctx = walk->ctx;
+
+ *needs_unlock = false;
+
+ if (dma_resv_trylock(bo->base.resv)) {
+ *needs_unlock = true;
+ return true;
+ }
+
+ if (bo->base.resv == ctx->resv && ctx->allow_res_evict) {
+ dma_resv_assert_held(bo->base.resv);
+ return true;
+ }
+
+ return false;
+}
+
+static int ttm_lru_walk_ticketlock(struct ttm_lru_walk *walk,
+ struct ttm_buffer_object *bo,
+ bool *needs_unlock)
+{
+ struct dma_resv *resv = bo->base.resv;
+ int ret;
+
+ if (walk->ctx->interruptible)
+ ret = dma_resv_lock_interruptible(resv, walk->ticket);
+ else
+ ret = dma_resv_lock(resv, walk->ticket);
+
+ if (!ret) {
+ *needs_unlock = true;
+ /* Only a single ticketlock per loop. */
+ walk->ticket = NULL;
+ } else if (ret == -EDEADLK) {
+ /* Caller needs to exit the ww transaction. */
+ ret = -ENOSPC;
+ }
+
+ return ret;
+}
+
+static void ttm_lru_walk_unlock(struct ttm_buffer_object *bo, bool locked)
+{
+ if (locked)
+ dma_resv_unlock(bo->base.resv);
+}
+
+/**
+ * ttm_lru_walk_for_evict() - Perform a LRU list walk, with actions taken on
+ * valid items.
+ * @walk: describe the walks and actions taken
+ * @bdev: The TTM device.
+ * @man: The struct ttm_resource manager whose LRU lists we're walking.
+ * @target: The end condition for the walk.
+ *
+ * The LRU lists of @man are walk, and for each struct ttm_resource encountered,
+ * the corresponding ttm_buffer_object is locked and taken a reference on, and
+ * the LRU lock is dropped. the LRU lock may be dropped before locking and, in
+ * that case, it's verified that the item actually remains on the LRU list after
+ * the lock, and that the buffer object didn't switch resource in between.
+ *
+ * With a locked object, the actions indicated by @walk->process_bo are
+ * performed, and after that, the bo is unlocked, the refcount dropped and the
+ * next struct ttm_resource is processed. Here, the walker relies on
+ * TTM's restartable LRU list implementation.
+ *
+ * Typically @walk->process_bo() would return the number of pages evicted,
+ * swapped or shrunken, so that when the total exceeds @target, or when the
+ * LRU list has been walked in full, iteration is terminated. It's also terminated
+ * on error. Note that the definition of @target is done by the caller, it
+ * could have a different meaning than the number of pages.
+ *
+ * Note that the way dma_resv individualization is done, locking needs to be done
+ * either with the LRU lock held (trylocking only) or with a reference on the
+ * object.
+ *
+ * Return: The progress made towards target or negative error code on error.
+ */
+long ttm_lru_walk_for_evict(struct ttm_lru_walk *walk, struct ttm_device *bdev,
+ struct ttm_resource_manager *man, long target)
+{
+ struct ttm_resource_cursor cursor;
+ struct ttm_resource *res;
+ long sofar = 0;
+ long lret;
+
+ spin_lock(&bdev->lru_lock);
+ ttm_resource_manager_for_each_res(man, &cursor, res) {
+ struct ttm_buffer_object *bo = res->bo;
+ bool bo_needs_unlock = false;
+ bool bo_locked = false;
+ int mem_type;
+
+ if (!bo || bo->resource != res)
+ continue;
+
+ if (ttm_lru_walk_trylock(walk, bo, &bo_needs_unlock))
+ bo_locked = true;
+ else if ((!walk->ticket) || walk->ctx->no_wait_gpu ||
+ walk->trylock_only)
+ continue;
+
+ if (!ttm_bo_get_unless_zero(bo)) {
+ ttm_lru_walk_unlock(bo, bo_needs_unlock);
+ continue;
+ }
+
+ mem_type = res->mem_type;
+ spin_unlock(&bdev->lru_lock);
+
+ lret = 0;
+ if (!bo_locked && walk->ticket)
+ lret = ttm_lru_walk_ticketlock(walk, bo, &bo_needs_unlock);
+
+ /*
+ * Note that in between the release of the lru lock and the
+ * ticketlock, the bo may have switched resource,
+ * and also memory type, since the resource may have been
+ * freed and allocated again with a different memory type.
+ * In that case, just skip it.
+ */
+ if (!lret && bo->resource == res && res->mem_type == mem_type)
+ lret = walk->ops->process_bo(walk, bo);
+
+ ttm_lru_walk_unlock(bo, bo_needs_unlock);
+ ttm_bo_put(bo);
+ if (lret == -EBUSY || lret == -EALREADY)
+ lret = 0;
+ sofar = (lret < 0) ? lret : sofar + lret;
+ if (sofar < 0 || sofar >= target)
+ goto out;
+
+ cond_resched();
+ spin_lock(&bdev->lru_lock);
+ }
+ spin_unlock(&bdev->lru_lock);
+out:
+ ttm_resource_cursor_fini(&cursor);
+ return sofar;
+}
diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h
index 6ccf96c91f3a..8b032298d66e 100644
--- a/include/drm/ttm/ttm_bo.h
+++ b/include/drm/ttm/ttm_bo.h
@@ -190,6 +190,38 @@ struct ttm_operation_ctx {
uint64_t bytes_moved;
};
+struct ttm_lru_walk;
+
+/** struct ttm_lru_walk_ops - Operations for a LRU walk. */
+struct ttm_lru_walk_ops {
+ /**
+ * process_bo - Process this bo.
+ * @walk: struct ttm_lru_walk describing the walk.
+ * @bo: A locked and referenced buffer object.
+ *
+ * Return: Negative error code on error, Number of processed pages on
+ * success. 0 also indicates success.
+ */
+ long (*process_bo)(struct ttm_lru_walk *walk, struct ttm_buffer_object *bo);
+};
+
+/**
+ * struct ttm_lru_walk - Structure describing a LRU walk.
+ */
+struct ttm_lru_walk {
+ /** @ops: Pointer to the ops structure. */
+ const struct ttm_lru_walk_ops *ops;
+ /** @ctx: Pointer to the struct ttm_operation_ctx. */
+ struct ttm_operation_ctx *ctx;
+ /** @ticket: The struct ww_acquire_ctx if any. */
+ struct ww_acquire_ctx *ticket;
+ /** @tryock_only: Only use trylock for locking. */
+ bool trylock_only;
+};
+
+long ttm_lru_walk_for_evict(struct ttm_lru_walk *walk, struct ttm_device *bdev,
+ struct ttm_resource_manager *man, long target);
+
/**
* ttm_bo_get - reference a struct ttm_buffer_object
*
--
2.44.0
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH v5 06/12] drm/ttm: Use the LRU walker helper for swapping
2024-06-18 7:18 [PATCH v5 00/12] TTM shrinker helpers and xe buffer object shrinker Thomas Hellström
` (4 preceding siblings ...)
2024-06-18 7:18 ` [PATCH v5 05/12] drm/ttm: Provide a generic LRU walker helper Thomas Hellström
@ 2024-06-18 7:18 ` Thomas Hellström
2024-06-19 4:23 ` Matthew Brost
2024-06-18 7:18 ` [PATCH v5 07/12] drm/ttm: Use the LRU walker for eviction Thomas Hellström
` (13 subsequent siblings)
19 siblings, 1 reply; 36+ messages in thread
From: Thomas Hellström @ 2024-06-18 7:18 UTC (permalink / raw)
To: intel-xe
Cc: Thomas Hellström, Christian König,
Somalapuram Amaranath, Matthew Brost, dri-devel
Rework the TTM swapping to use the LRU walker helper.
This helps fixing up the ttm_bo_swapout() interface
to be consistent about not requiring any locking.
For now mimic the current behaviour of using trylock
only. We could be using ticket-locks here but defer
that until it's deemed necessary. The TTM swapout
functionality is a bit weird anyway since it
alternates between memory types without exhausting
TTM_PL_SYSTEM first.
Cc: Christian König <christian.koenig@amd.com>
Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: <dri-devel@lists.freedesktop.org>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
---
drivers/gpu/drm/ttm/ttm_bo.c | 112 +++++++++++++++++++++----------
drivers/gpu/drm/ttm/ttm_device.c | 30 ++-------
include/drm/ttm/ttm_bo.h | 5 +-
3 files changed, 83 insertions(+), 64 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 43eda720657f..63a91b77f7da 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -1118,11 +1118,23 @@ int ttm_bo_wait_ctx(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx)
}
EXPORT_SYMBOL(ttm_bo_wait_ctx);
-int ttm_bo_swapout(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx,
- gfp_t gfp_flags)
+/**
+ * struct ttm_bo_swapout_walk - Parameters for the swapout walk
+ */
+struct ttm_bo_swapout_walk {
+ /** @walk: The walk base parameters. */
+ struct ttm_lru_walk walk;
+ /** @gfp_flags: The gfp flags to use for ttm_tt_swapout() */
+ gfp_t gfp_flags;
+};
+
+static long
+ttm_bo_swapout_cb(struct ttm_lru_walk *walk, struct ttm_buffer_object *bo)
{
- struct ttm_place place;
- bool locked;
+ struct ttm_place place = {.mem_type = bo->resource->mem_type};
+ struct ttm_bo_swapout_walk *swapout_walk =
+ container_of(walk, typeof(*swapout_walk), walk);
+ struct ttm_operation_ctx *ctx = walk->ctx;
long ret;
/*
@@ -1131,28 +1143,29 @@ int ttm_bo_swapout(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx,
* The driver may use the fact that we're moving from SYSTEM
* as an indication that we're about to swap out.
*/
- memset(&place, 0, sizeof(place));
- place.mem_type = bo->resource->mem_type;
- if (!ttm_bo_evict_swapout_allowable(bo, ctx, &place, &locked, NULL))
- return -EBUSY;
+ if (!bo->bdev->funcs->eviction_valuable(bo, &place)) {
+ ret = -EBUSY;
+ goto out;
+ }
if (!bo->ttm || !ttm_tt_is_populated(bo->ttm) ||
bo->ttm->page_flags & TTM_TT_FLAG_EXTERNAL ||
- bo->ttm->page_flags & TTM_TT_FLAG_SWAPPED ||
- !ttm_bo_get_unless_zero(bo)) {
- if (locked)
- dma_resv_unlock(bo->base.resv);
- return -EBUSY;
+ bo->ttm->page_flags & TTM_TT_FLAG_SWAPPED) {
+ ret = -EBUSY;
+ goto out;
}
if (bo->deleted) {
- ret = ttm_bo_cleanup_refs(bo, false, false, locked);
- ttm_bo_put(bo);
- return ret == -EBUSY ? -ENOSPC : ret;
- }
+ pgoff_t num_pages = bo->ttm->num_pages;
- /* TODO: Cleanup the locking */
- spin_unlock(&bo->bdev->lru_lock);
+ ret = ttm_bo_wait_ctx(bo, ctx);
+ if (ret)
+ goto out;
+
+ ttm_bo_cleanup_memtype_use(bo);
+ ret = num_pages;
+ goto out;
+ }
/*
* Move to system cached
@@ -1164,12 +1177,13 @@ int ttm_bo_swapout(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx,
memset(&hop, 0, sizeof(hop));
place.mem_type = TTM_PL_SYSTEM;
ret = ttm_resource_alloc(bo, &place, &evict_mem);
- if (unlikely(ret))
+ if (ret)
goto out;
ret = ttm_bo_handle_move_mem(bo, evict_mem, true, ctx, &hop);
- if (unlikely(ret != 0)) {
- WARN(ret == -EMULTIHOP, "Unexpected multihop in swaput - likely driver bug.\n");
+ if (ret) {
+ WARN(ret == -EMULTIHOP,
+ "Unexpected multihop in swapout - likely driver bug.\n");
ttm_resource_free(bo, &evict_mem);
goto out;
}
@@ -1179,30 +1193,54 @@ int ttm_bo_swapout(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx,
* Make sure BO is idle.
*/
ret = ttm_bo_wait_ctx(bo, ctx);
- if (unlikely(ret != 0))
+ if (ret)
goto out;
ttm_bo_unmap_virtual(bo);
-
- /*
- * Swap out. Buffer will be swapped in again as soon as
- * anyone tries to access a ttm page.
- */
if (bo->bdev->funcs->swap_notify)
bo->bdev->funcs->swap_notify(bo);
if (ttm_tt_is_populated(bo->ttm))
- ret = ttm_tt_swapout(bo->bdev, bo->ttm, gfp_flags);
+ ret = ttm_tt_swapout(bo->bdev, bo->ttm, swapout_walk->gfp_flags);
out:
+ /* Consider some error codes fatal. Others may continue the walk. */
+ if (ret == -ENOMEM || ret == -EINTR || ret == -ERESTARTSYS ||
+ ret == -EAGAIN || ret > 0)
+ return ret;
- /*
- * Unreserve without putting on LRU to avoid swapping out an
- * already swapped buffer.
- */
- if (locked)
- dma_resv_unlock(bo->base.resv);
- ttm_bo_put(bo);
- return ret == -EBUSY ? -ENOSPC : ret;
+ return 0;
+}
+
+const struct ttm_lru_walk_ops ttm_swap_ops = {
+ .process_bo = ttm_bo_swapout_cb,
+};
+
+/**
+ * ttm_bo_swapout() - Swap out buffer objects on the LRU list to shmem.
+ * @bdev: The ttm device.
+ * @ctx: The ttm_operation_ctx governing the swapout operation.
+ * @man: The resource manager whose resources / buffer objects are
+ * goint to be swapped out.
+ * @gfp_flags: The gfp flags used for shmem page allocations.
+ * @target: The desired number of pages to swap out.
+ *
+ * Return: The number of pages actually swapped out, or negative error code
+ * on error.
+ */
+long ttm_bo_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx,
+ struct ttm_resource_manager *man, gfp_t gfp_flags,
+ pgoff_t target)
+{
+ struct ttm_bo_swapout_walk swapout_walk = {
+ .walk = {
+ .ops = &ttm_swap_ops,
+ .ctx = ctx,
+ .trylock_only = true,
+ },
+ .gfp_flags = gfp_flags,
+ };
+
+ return ttm_lru_walk_for_evict(&swapout_walk.walk, bdev, man, target);
}
void ttm_bo_tt_destroy(struct ttm_buffer_object *bo)
diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c
index f9e9b1ec8c8a..ee575d8a54c0 100644
--- a/drivers/gpu/drm/ttm/ttm_device.c
+++ b/drivers/gpu/drm/ttm/ttm_device.c
@@ -148,40 +148,20 @@ int ttm_global_swapout(struct ttm_operation_ctx *ctx, gfp_t gfp_flags)
int ttm_device_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx,
gfp_t gfp_flags)
{
- struct ttm_resource_cursor cursor;
struct ttm_resource_manager *man;
- struct ttm_resource *res;
unsigned i;
- int ret;
+ long lret;
- spin_lock(&bdev->lru_lock);
for (i = TTM_PL_SYSTEM; i < TTM_NUM_MEM_TYPES; ++i) {
man = ttm_manager_type(bdev, i);
if (!man || !man->use_tt)
continue;
- ttm_resource_manager_for_each_res(man, &cursor, res) {
- struct ttm_buffer_object *bo = res->bo;
- uint32_t num_pages;
-
- if (!bo || bo->resource != res)
- continue;
-
- num_pages = PFN_UP(bo->base.size);
- ret = ttm_bo_swapout(bo, ctx, gfp_flags);
- /* ttm_bo_swapout has dropped the lru_lock */
- if (!ret) {
- ttm_resource_cursor_fini(&cursor);
- return num_pages;
- }
- if (ret != -EBUSY) {
- ttm_resource_cursor_fini(&cursor);
- return ret;
- }
- }
+ lret = ttm_bo_swapout(bdev, ctx, man, gfp_flags, 1);
+ /* Can be both positive (num_pages) and negative (error) */
+ if (lret)
+ return lret;
}
- ttm_resource_cursor_fini_locked(&cursor);
- spin_unlock(&bdev->lru_lock);
return 0;
}
EXPORT_SYMBOL(ttm_device_swapout);
diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h
index 8b032298d66e..472a55b69afb 100644
--- a/include/drm/ttm/ttm_bo.h
+++ b/include/drm/ttm/ttm_bo.h
@@ -410,8 +410,9 @@ void ttm_bo_kunmap(struct ttm_bo_kmap_obj *map);
int ttm_bo_vmap(struct ttm_buffer_object *bo, struct iosys_map *map);
void ttm_bo_vunmap(struct ttm_buffer_object *bo, struct iosys_map *map);
int ttm_bo_mmap_obj(struct vm_area_struct *vma, struct ttm_buffer_object *bo);
-int ttm_bo_swapout(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx,
- gfp_t gfp_flags);
+long ttm_bo_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx,
+ struct ttm_resource_manager *man, gfp_t gfp_flags,
+ pgoff_t target);
void ttm_bo_pin(struct ttm_buffer_object *bo);
void ttm_bo_unpin(struct ttm_buffer_object *bo);
int ttm_mem_evict_first(struct ttm_device *bdev,
--
2.44.0
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH v5 07/12] drm/ttm: Use the LRU walker for eviction
2024-06-18 7:18 [PATCH v5 00/12] TTM shrinker helpers and xe buffer object shrinker Thomas Hellström
` (5 preceding siblings ...)
2024-06-18 7:18 ` [PATCH v5 06/12] drm/ttm: Use the LRU walker helper for swapping Thomas Hellström
@ 2024-06-18 7:18 ` Thomas Hellström
2024-06-19 22:52 ` Matthew Brost
2024-06-19 23:33 ` Matthew Brost
2024-06-18 7:18 ` [PATCH v5 08/12] drm/ttm: Add a virtual base class for graphics memory backup Thomas Hellström
` (12 subsequent siblings)
19 siblings, 2 replies; 36+ messages in thread
From: Thomas Hellström @ 2024-06-18 7:18 UTC (permalink / raw)
To: intel-xe
Cc: Thomas Hellström, Christian König,
Somalapuram Amaranath, Matthew Brost, dri-devel
Use the LRU walker for eviction. This helps
removing a lot of code with weird locking
semantics.
The functionality is slightly changed so that
when trylocked buffer objects are exhausted, we
continue to interleave walks with ticket-locks while
there is still progress made. The list walks are
not restarted in-between evictions.
Also provide a separate ttm_bo_evict_first()
function for its single user. The context of that
user allows sleeping dma_resv locks.
Cc: Christian König <christian.koenig@amd.com>
Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: <dri-devel@lists.freedesktop.org>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
---
drivers/gpu/drm/ttm/ttm_bo.c | 350 ++++++++++++-----------------
drivers/gpu/drm/ttm/ttm_resource.c | 20 +-
include/drm/ttm/ttm_bo.h | 8 +-
3 files changed, 145 insertions(+), 233 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 63a91b77f7da..316afe19a325 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -224,80 +224,6 @@ static void ttm_bo_flush_all_fences(struct ttm_buffer_object *bo)
dma_resv_iter_end(&cursor);
}
-/**
- * ttm_bo_cleanup_refs
- * If bo idle, remove from lru lists, and unref.
- * If not idle, block if possible.
- *
- * Must be called with lru_lock and reservation held, this function
- * will drop the lru lock and optionally the reservation lock before returning.
- *
- * @bo: The buffer object to clean-up
- * @interruptible: Any sleeps should occur interruptibly.
- * @no_wait_gpu: Never wait for gpu. Return -EBUSY instead.
- * @unlock_resv: Unlock the reservation lock as well.
- */
-
-static int ttm_bo_cleanup_refs(struct ttm_buffer_object *bo,
- bool interruptible, bool no_wait_gpu,
- bool unlock_resv)
-{
- struct dma_resv *resv = &bo->base._resv;
- int ret;
-
- if (dma_resv_test_signaled(resv, DMA_RESV_USAGE_BOOKKEEP))
- ret = 0;
- else
- ret = -EBUSY;
-
- if (ret && !no_wait_gpu) {
- long lret;
-
- if (unlock_resv)
- dma_resv_unlock(bo->base.resv);
- spin_unlock(&bo->bdev->lru_lock);
-
- lret = dma_resv_wait_timeout(resv, DMA_RESV_USAGE_BOOKKEEP,
- interruptible,
- 30 * HZ);
-
- if (lret < 0)
- return lret;
- else if (lret == 0)
- return -EBUSY;
-
- spin_lock(&bo->bdev->lru_lock);
- if (unlock_resv && !dma_resv_trylock(bo->base.resv)) {
- /*
- * We raced, and lost, someone else holds the reservation now,
- * and is probably busy in ttm_bo_cleanup_memtype_use.
- *
- * Even if it's not the case, because we finished waiting any
- * delayed destruction would succeed, so just return success
- * here.
- */
- spin_unlock(&bo->bdev->lru_lock);
- return 0;
- }
- ret = 0;
- }
-
- if (ret) {
- if (unlock_resv)
- dma_resv_unlock(bo->base.resv);
- spin_unlock(&bo->bdev->lru_lock);
- return ret;
- }
-
- spin_unlock(&bo->bdev->lru_lock);
- ttm_bo_cleanup_memtype_use(bo);
-
- if (unlock_resv)
- dma_resv_unlock(bo->base.resv);
-
- return 0;
-}
-
/*
* Block for the dma_resv object to become idle, lock the buffer and clean up
* the resource and tt object.
@@ -505,151 +431,154 @@ bool ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
}
EXPORT_SYMBOL(ttm_bo_eviction_valuable);
-/*
- * Check the target bo is allowable to be evicted or swapout, including cases:
- *
- * a. if share same reservation object with ctx->resv, have assumption
- * reservation objects should already be locked, so not lock again and
- * return true directly when either the opreation allow_reserved_eviction
- * or the target bo already is in delayed free list;
+/**
+ * ttm_bo_evict_first() - Evict the first bo on the manager's LRU list.
+ * @bdev: The ttm device.
+ * @man: The manager whose bo to evict.
+ * @ctx: The TTM operation ctx governing the eviction.
*
- * b. Otherwise, trylock it.
+ * Return: 0 if successful or the resource disappeared. Negative error code on error.
*/
-static bool ttm_bo_evict_swapout_allowable(struct ttm_buffer_object *bo,
- struct ttm_operation_ctx *ctx,
- const struct ttm_place *place,
- bool *locked, bool *busy)
+int ttm_bo_evict_first(struct ttm_device *bdev, struct ttm_resource_manager *man,
+ struct ttm_operation_ctx *ctx)
{
- bool ret = false;
+ struct ttm_resource_cursor cursor;
+ struct ttm_buffer_object *bo;
+ struct ttm_resource *res;
+ unsigned int mem_type;
+ int ret = 0;
- if (bo->pin_count) {
- *locked = false;
- if (busy)
- *busy = false;
- return false;
+ spin_lock(&bdev->lru_lock);
+ res = ttm_resource_manager_first(man, &cursor);
+ if (!res) {
+ ret = -ENOENT;
+ goto out_no_ref;
}
+ bo = res->bo;
+ if (!ttm_bo_get_unless_zero(bo))
+ goto out_no_ref;
+ mem_type = res->mem_type;
+ spin_unlock(&bdev->lru_lock);
+ ret = ttm_bo_reserve(bo, ctx->interruptible, ctx->no_wait_gpu, NULL);
+ if (ret)
+ goto out_no_lock;
+ if (bo->resource != res || res->mem_type != mem_type)
+ goto out_bad_res;
- if (bo->base.resv == ctx->resv) {
- dma_resv_assert_held(bo->base.resv);
- if (ctx->allow_res_evict)
- ret = true;
- *locked = false;
- if (busy)
- *busy = false;
+ if (bo->deleted) {
+ ret = ttm_bo_wait_ctx(bo, ctx);
+ if (ret)
+ ttm_bo_cleanup_memtype_use(bo);
} else {
- ret = dma_resv_trylock(bo->base.resv);
- *locked = ret;
- if (busy)
- *busy = !ret;
- }
-
- if (ret && place && (bo->resource->mem_type != place->mem_type ||
- !bo->bdev->funcs->eviction_valuable(bo, place))) {
- ret = false;
- if (*locked) {
- dma_resv_unlock(bo->base.resv);
- *locked = false;
- }
+ ret = ttm_bo_evict(bo, ctx);
}
-
+out_bad_res:
+ dma_resv_unlock(bo->base.resv);
+out_no_lock:
+ ttm_bo_put(bo);
+ ttm_resource_cursor_fini(&cursor);
return ret;
+
+out_no_ref:
+ ttm_resource_cursor_fini_locked(&cursor);
+ spin_unlock(&bdev->lru_lock);
+ return -ENOENT;
}
/**
- * ttm_mem_evict_wait_busy - wait for a busy BO to become available
- *
- * @busy_bo: BO which couldn't be locked with trylock
- * @ctx: operation context
- * @ticket: acquire ticket
- *
- * Try to lock a busy buffer object to avoid failing eviction.
+ * struct ttm_bo_evict_walk - Parameters for the evict walk.
*/
-static int ttm_mem_evict_wait_busy(struct ttm_buffer_object *busy_bo,
- struct ttm_operation_ctx *ctx,
- struct ww_acquire_ctx *ticket)
-{
- int r;
-
- if (!busy_bo || !ticket)
- return -EBUSY;
-
- if (ctx->interruptible)
- r = dma_resv_lock_interruptible(busy_bo->base.resv,
- ticket);
- else
- r = dma_resv_lock(busy_bo->base.resv, ticket);
-
- /*
- * TODO: It would be better to keep the BO locked until allocation is at
- * least tried one more time, but that would mean a much larger rework
- * of TTM.
- */
- if (!r)
- dma_resv_unlock(busy_bo->base.resv);
-
- return r == -EDEADLK ? -EBUSY : r;
-}
+struct ttm_bo_evict_walk {
+ /** @walk: The walk base parameters. */
+ struct ttm_lru_walk walk;
+ /** @place: The place passed to the resource allocation. */
+ const struct ttm_place *place;
+ /** @evictor: The buffer object we're trying to make room for. */
+ struct ttm_buffer_object *evictor;
+ /** @res: The allocated resource if any. */
+ struct ttm_resource **res;
+ /** @evicted: The number of evicted pages. */
+ unsigned long evicted;
+};
-int ttm_mem_evict_first(struct ttm_device *bdev,
- struct ttm_resource_manager *man,
- const struct ttm_place *place,
- struct ttm_operation_ctx *ctx,
- struct ww_acquire_ctx *ticket)
+static long ttm_bo_evict_cb(struct ttm_lru_walk *walk, struct ttm_buffer_object *bo)
{
- struct ttm_buffer_object *bo = NULL, *busy_bo = NULL;
- struct ttm_resource_cursor cursor;
- struct ttm_resource *res;
- bool locked = false;
- int ret;
+ struct ttm_bo_evict_walk *evict_walk =
+ container_of(walk, typeof(*evict_walk), walk);
+ long lret;
- spin_lock(&bdev->lru_lock);
- ttm_resource_manager_for_each_res(man, &cursor, res) {
- bool busy;
-
- if (!ttm_bo_evict_swapout_allowable(res->bo, ctx, place,
- &locked, &busy)) {
- if (busy && !busy_bo && ticket !=
- dma_resv_locking_ctx(res->bo->base.resv))
- busy_bo = res->bo;
- continue;
- }
+ if (!bo->bdev->funcs->eviction_valuable(bo, evict_walk->place))
+ return 0;
- if (ttm_bo_get_unless_zero(res->bo)) {
- bo = res->bo;
- break;
- }
- if (locked)
- dma_resv_unlock(res->bo->base.resv);
+ if (bo->deleted) {
+ lret = ttm_bo_wait_ctx(bo, walk->ctx);
+ if (!lret)
+ ttm_bo_cleanup_memtype_use(bo);
+ } else {
+ lret = ttm_bo_evict(bo, walk->ctx);
}
- ttm_resource_cursor_fini_locked(&cursor);
- if (!bo) {
- if (busy_bo && !ttm_bo_get_unless_zero(busy_bo))
- busy_bo = NULL;
- spin_unlock(&bdev->lru_lock);
- ret = ttm_mem_evict_wait_busy(busy_bo, ctx, ticket);
- if (busy_bo)
- ttm_bo_put(busy_bo);
- return ret;
- }
+ if (lret)
+ goto out;
- if (bo->deleted) {
- ret = ttm_bo_cleanup_refs(bo, ctx->interruptible,
- ctx->no_wait_gpu, locked);
- ttm_bo_put(bo);
- return ret;
- }
+ evict_walk->evicted++;
+ if (evict_walk->res)
+ lret = ttm_resource_alloc(evict_walk->evictor, evict_walk->place,
+ evict_walk->res);
+ if (lret == 0)
+ return 1;
+out:
+ /* Errors that should terminate the walk. */
+ if (lret == -ENOMEM || lret == -EINTR || lret == -ERESTARTSYS ||
+ lret == -EAGAIN)
+ return lret;
- spin_unlock(&bdev->lru_lock);
+ return 0;
+}
- ret = ttm_bo_evict(bo, ctx);
- if (locked)
- ttm_bo_unreserve(bo);
- else
- ttm_bo_move_to_lru_tail_unlocked(bo);
+static const struct ttm_lru_walk_ops ttm_evict_walk_ops = {
+ .process_bo = ttm_bo_evict_cb,
+};
- ttm_bo_put(bo);
- return ret;
+static int ttm_bo_evict_alloc(struct ttm_device *bdev,
+ struct ttm_resource_manager *man,
+ const struct ttm_place *place,
+ struct ttm_buffer_object *evictor,
+ struct ttm_operation_ctx *ctx,
+ struct ww_acquire_ctx *ticket,
+ struct ttm_resource **res)
+{
+ struct ttm_bo_evict_walk evict_walk = {
+ .walk = {
+ .ops = &ttm_evict_walk_ops,
+ .ctx = ctx,
+ .ticket = ticket,
+ },
+ .place = place,
+ .evictor = evictor,
+ .res = res,
+ };
+ long lret;
+
+ evict_walk.walk.trylock_only = true;
+ lret = ttm_lru_walk_for_evict(&evict_walk.walk, bdev, man, 1);
+ if (lret || !ticket)
+ goto out;
+
+ /* If ticket-locking, repeat while making progress. */
+ evict_walk.walk.trylock_only = false;
+ do {
+ /* The walk may clear the evict_walk.walk.ticket field */
+ evict_walk.walk.ticket = ticket;
+ evict_walk.evicted = 0;
+ lret = ttm_lru_walk_for_evict(&evict_walk.walk, bdev, man, 1);
+ } while (!lret && evict_walk.evicted);
+out:
+ if (lret < 0)
+ return lret;
+ if (lret == 0)
+ return -EBUSY;
+ return 0;
}
/**
@@ -760,6 +689,7 @@ static int ttm_bo_alloc_resource(struct ttm_buffer_object *bo,
for (i = 0; i < placement->num_placement; ++i) {
const struct ttm_place *place = &placement->placement[i];
struct ttm_resource_manager *man;
+ bool may_evict;
man = ttm_manager_type(bdev, place->mem_type);
if (!man || !ttm_resource_manager_used(man))
@@ -769,22 +699,21 @@ static int ttm_bo_alloc_resource(struct ttm_buffer_object *bo,
TTM_PL_FLAG_FALLBACK))
continue;
- do {
- ret = ttm_resource_alloc(bo, place, res);
- if (unlikely(ret && ret != -ENOSPC))
+ may_evict = (force_space && place->mem_type != TTM_PL_SYSTEM);
+ ret = ttm_resource_alloc(bo, place, res);
+ if (ret) {
+ if (ret != -ENOSPC)
return ret;
- if (likely(!ret) || !force_space)
- break;
-
- ret = ttm_mem_evict_first(bdev, man, place, ctx,
- ticket);
- if (unlikely(ret == -EBUSY))
- break;
- if (unlikely(ret))
+ if (!may_evict)
+ continue;
+
+ ret = ttm_bo_evict_alloc(bdev, man, place, bo, ctx,
+ ticket, res);
+ if (ret == -EBUSY)
+ continue;
+ if (ret)
return ret;
- } while (1);
- if (ret)
- continue;
+ }
ret = ttm_bo_add_move_fence(bo, man, ctx->no_wait_gpu);
if (unlikely(ret)) {
@@ -796,7 +725,6 @@ static int ttm_bo_alloc_resource(struct ttm_buffer_object *bo,
}
return 0;
}
-
return -ENOSPC;
}
diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c
index a03090683e79..6d0c66fc36e3 100644
--- a/drivers/gpu/drm/ttm/ttm_resource.c
+++ b/drivers/gpu/drm/ttm/ttm_resource.c
@@ -508,24 +508,10 @@ int ttm_resource_manager_evict_all(struct ttm_device *bdev,
};
struct dma_fence *fence;
int ret;
- unsigned i;
-
- /*
- * Can't use standard list traversal since we're unlocking.
- */
- spin_lock(&bdev->lru_lock);
- for (i = 0; i < TTM_MAX_BO_PRIORITY; ++i) {
- while (!list_empty(&man->lru[i])) {
- spin_unlock(&bdev->lru_lock);
- ret = ttm_mem_evict_first(bdev, man, NULL, &ctx,
- NULL);
- if (ret)
- return ret;
- spin_lock(&bdev->lru_lock);
- }
- }
- spin_unlock(&bdev->lru_lock);
+ do {
+ ret = ttm_bo_evict_first(bdev, man, &ctx);
+ } while (!ret);
spin_lock(&man->move_lock);
fence = dma_fence_get(man->move);
diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h
index 472a55b69afb..148f49f625e4 100644
--- a/include/drm/ttm/ttm_bo.h
+++ b/include/drm/ttm/ttm_bo.h
@@ -415,11 +415,9 @@ long ttm_bo_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx,
pgoff_t target);
void ttm_bo_pin(struct ttm_buffer_object *bo);
void ttm_bo_unpin(struct ttm_buffer_object *bo);
-int ttm_mem_evict_first(struct ttm_device *bdev,
- struct ttm_resource_manager *man,
- const struct ttm_place *place,
- struct ttm_operation_ctx *ctx,
- struct ww_acquire_ctx *ticket);
+int ttm_bo_evict_first(struct ttm_device *bdev,
+ struct ttm_resource_manager *man,
+ struct ttm_operation_ctx *ctx);
vm_fault_t ttm_bo_vm_reserve(struct ttm_buffer_object *bo,
struct vm_fault *vmf);
vm_fault_t ttm_bo_vm_fault_reserved(struct vm_fault *vmf,
--
2.44.0
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH v5 08/12] drm/ttm: Add a virtual base class for graphics memory backup
2024-06-18 7:18 [PATCH v5 00/12] TTM shrinker helpers and xe buffer object shrinker Thomas Hellström
` (6 preceding siblings ...)
2024-06-18 7:18 ` [PATCH v5 07/12] drm/ttm: Use the LRU walker for eviction Thomas Hellström
@ 2024-06-18 7:18 ` Thomas Hellström
2024-06-20 15:17 ` Matthew Brost
2024-06-18 7:18 ` [PATCH v5 09/12] drm/ttm/pool: Provide a helper to shrink pages Thomas Hellström
` (11 subsequent siblings)
19 siblings, 1 reply; 36+ messages in thread
From: Thomas Hellström @ 2024-06-18 7:18 UTC (permalink / raw)
To: intel-xe
Cc: Thomas Hellström, Christian König,
Somalapuram Amaranath, Matthew Brost, dri-devel
Initially intended for experimenting with different backup
solutions (shmem vs direct swap cache insertion), abstract
the backup destination using a virtual base class.
Also provide a sample implementation for shmem.
While when settling on a preferred backup solution, one could
perhaps skip the abstraction, this functionality may actually
come in handy for configurable dedicated graphics memory
backup to fast nvme files or similar, whithout affecting
swap-space. Could indeed be useful for VRAM backup on S4 and
other cases.
v5:
- Fix a UAF. (kernel test robot, Dan Carptenter)
Cc: Christian König <christian.koenig@amd.com>
Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: <dri-devel@lists.freedesktop.org>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
---
drivers/gpu/drm/ttm/Makefile | 2 +-
drivers/gpu/drm/ttm/ttm_backup_shmem.c | 139 +++++++++++++++++++++++++
include/drm/ttm/ttm_backup.h | 136 ++++++++++++++++++++++++
3 files changed, 276 insertions(+), 1 deletion(-)
create mode 100644 drivers/gpu/drm/ttm/ttm_backup_shmem.c
create mode 100644 include/drm/ttm/ttm_backup.h
diff --git a/drivers/gpu/drm/ttm/Makefile b/drivers/gpu/drm/ttm/Makefile
index dad298127226..5e980dd90e41 100644
--- a/drivers/gpu/drm/ttm/Makefile
+++ b/drivers/gpu/drm/ttm/Makefile
@@ -4,7 +4,7 @@
ttm-y := ttm_tt.o ttm_bo.o ttm_bo_util.o ttm_bo_vm.o ttm_module.o \
ttm_execbuf_util.o ttm_range_manager.o ttm_resource.o ttm_pool.o \
- ttm_device.o ttm_sys_manager.o
+ ttm_device.o ttm_sys_manager.o ttm_backup_shmem.o
ttm-$(CONFIG_AGP) += ttm_agp_backend.o
obj-$(CONFIG_DRM_TTM) += ttm.o
diff --git a/drivers/gpu/drm/ttm/ttm_backup_shmem.c b/drivers/gpu/drm/ttm/ttm_backup_shmem.c
new file mode 100644
index 000000000000..f5bc47734d71
--- /dev/null
+++ b/drivers/gpu/drm/ttm/ttm_backup_shmem.c
@@ -0,0 +1,139 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2024 Intel Corporation
+ */
+
+#include <drm/ttm/ttm_backup.h>
+#include <linux/page-flags.h>
+
+/**
+ * struct ttm_backup_shmem - A shmem based ttm_backup subclass.
+ * @backup: The base struct ttm_backup
+ * @filp: The associated shmem object
+ */
+struct ttm_backup_shmem {
+ struct ttm_backup backup;
+ struct file *filp;
+};
+
+static struct ttm_backup_shmem *to_backup_shmem(struct ttm_backup *backup)
+{
+ return container_of(backup, struct ttm_backup_shmem, backup);
+}
+
+static void ttm_backup_shmem_drop(struct ttm_backup *backup, unsigned long handle)
+{
+ handle -= 1;
+ shmem_truncate_range(file_inode(to_backup_shmem(backup)->filp), handle,
+ handle + 1);
+}
+
+static int ttm_backup_shmem_copy_page(struct ttm_backup *backup, struct page *dst,
+ unsigned long handle, bool killable)
+{
+ struct file *filp = to_backup_shmem(backup)->filp;
+ struct address_space *mapping = filp->f_mapping;
+ struct folio *from_folio;
+
+ handle -= 1;
+ from_folio = shmem_read_folio(mapping, handle);
+ if (IS_ERR(from_folio))
+ return PTR_ERR(from_folio);
+
+ /* Note: Use drm_memcpy_from_wc? */
+ copy_highpage(dst, folio_file_page(from_folio, handle));
+ folio_put(from_folio);
+
+ return 0;
+}
+
+static unsigned long
+ttm_backup_shmem_backup_page(struct ttm_backup *backup, struct page *page,
+ bool writeback, pgoff_t i, gfp_t page_gfp,
+ gfp_t alloc_gfp)
+{
+ struct file *filp = to_backup_shmem(backup)->filp;
+ struct address_space *mapping = filp->f_mapping;
+ unsigned long handle = 0;
+ struct folio *to_folio;
+ int ret;
+
+ to_folio = shmem_read_folio_gfp(mapping, i, alloc_gfp);
+ if (IS_ERR(to_folio))
+ return handle;
+
+ folio_mark_accessed(to_folio);
+ folio_lock(to_folio);
+ folio_mark_dirty(to_folio);
+ copy_highpage(folio_file_page(to_folio, i), page);
+ handle = i + 1;
+
+ if (writeback && !folio_mapped(to_folio) && folio_clear_dirty_for_io(to_folio)) {
+ struct writeback_control wbc = {
+ .sync_mode = WB_SYNC_NONE,
+ .nr_to_write = SWAP_CLUSTER_MAX,
+ .range_start = 0,
+ .range_end = LLONG_MAX,
+ .for_reclaim = 1,
+ };
+ folio_set_reclaim(to_folio);
+ ret = mapping->a_ops->writepage(folio_page(to_folio, 0), &wbc);
+ if (!folio_test_writeback(to_folio))
+ folio_clear_reclaim(to_folio);
+ /* If writepage succeeds, it unlocks the folio */
+ if (ret)
+ folio_unlock(to_folio);
+ } else {
+ folio_unlock(to_folio);
+ }
+
+ folio_put(to_folio);
+
+ return handle;
+}
+
+static void ttm_backup_shmem_fini(struct ttm_backup *backup)
+{
+ struct ttm_backup_shmem *sbackup = to_backup_shmem(backup);
+
+ fput(sbackup->filp);
+ kfree(sbackup);
+}
+
+static const struct ttm_backup_ops ttm_backup_shmem_ops = {
+ .drop = ttm_backup_shmem_drop,
+ .copy_backed_up_page = ttm_backup_shmem_copy_page,
+ .backup_page = ttm_backup_shmem_backup_page,
+ .fini = ttm_backup_shmem_fini,
+};
+
+/**
+ * ttm_backup_shmem_create() - Create a shmem-based struct backup.
+ * @size: The maximum size (in bytes) to back up.
+ *
+ * Create a backup utilizing shmem objects.
+ *
+ * Return: A pointer to a struct ttm_backup on success,
+ * an error pointer on error.
+ */
+struct ttm_backup *ttm_backup_shmem_create(loff_t size)
+{
+ struct ttm_backup_shmem *sbackup =
+ kzalloc(sizeof(*sbackup), GFP_KERNEL | __GFP_ACCOUNT);
+ struct file *filp;
+
+ if (!sbackup)
+ return ERR_PTR(-ENOMEM);
+
+ filp = shmem_file_setup("ttm shmem backup", size, 0);
+ if (IS_ERR(filp)) {
+ kfree(sbackup);
+ return ERR_CAST(filp);
+ }
+
+ sbackup->filp = filp;
+ sbackup->backup.ops = &ttm_backup_shmem_ops;
+
+ return &sbackup->backup;
+}
+EXPORT_SYMBOL_GPL(ttm_backup_shmem_create);
diff --git a/include/drm/ttm/ttm_backup.h b/include/drm/ttm/ttm_backup.h
new file mode 100644
index 000000000000..88e8b97a6fdc
--- /dev/null
+++ b/include/drm/ttm/ttm_backup.h
@@ -0,0 +1,136 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2024 Intel Corporation
+ */
+
+#ifndef _TTM_BACKUP_H_
+#define _TTM_BACKUP_H_
+
+#include <linux/mm_types.h>
+#include <linux/shmem_fs.h>
+
+struct ttm_backup;
+
+/**
+ * ttm_backup_handle_to_page_ptr() - Convert handle to struct page pointer
+ * @handle: The handle to convert.
+ *
+ * Converts an opaque handle received from the
+ * struct ttm_backoup_ops::backup_page() function to an (invalid)
+ * struct page pointer suitable for a struct page array.
+ *
+ * Return: An (invalid) struct page pointer.
+ */
+static inline struct page *
+ttm_backup_handle_to_page_ptr(unsigned long handle)
+{
+ return (struct page *)(handle << 1 | 1);
+}
+
+/**
+ * ttm_backup_page_ptr_is_handle() - Whether a struct page pointer is a handle
+ * @page: The struct page pointer to check.
+ *
+ * Return: true if the struct page pointer is a handld returned from
+ * ttm_backup_handle_to_page_ptr(). False otherwise.
+ */
+static inline bool ttm_backup_page_ptr_is_handle(const struct page *page)
+{
+ return (unsigned long)page & 1;
+}
+
+/**
+ * ttm_backup_page_ptr_to_handle() - Convert a struct page pointer to a handle
+ * @page: The struct page pointer to convert
+ *
+ * Return: The handle that was previously used in
+ * ttm_backup_handle_to_page_ptr() to obtain a struct page pointer, suitable
+ * for use as argument in the struct ttm_backup_ops drop() or
+ * copy_backed_up_page() functions.
+ */
+static inline unsigned long
+ttm_backup_page_ptr_to_handle(const struct page *page)
+{
+ WARN_ON(!ttm_backup_page_ptr_is_handle(page));
+ return (unsigned long)page >> 1;
+}
+
+/** struct ttm_backup_ops - A struct ttm_backup backend operations */
+struct ttm_backup_ops {
+ /**
+ * drop - release memory associated with a handle
+ * @backup: The struct backup pointer used to obtain the handle
+ * @handle: The handle obtained from the @backup_page function.
+ */
+ void (*drop)(struct ttm_backup *backup, unsigned long handle);
+
+ /**
+ * copy_backed_up_page - Copy the contents of a previously backed
+ * up page
+ * @backup: The struct backup pointer used to back up the page.
+ * @dst: The struct page to copy into.
+ * @handle: The handle returned when the page was backed up.
+ * @intr: Try to perform waits interruptable or at least killable.
+ *
+ * Return: 0 on success, Negative error code on failure, notably
+ * -EINTR if @intr was set to true and a signal is pending.
+ */
+ int (*copy_backed_up_page)(struct ttm_backup *backup, struct page *dst,
+ unsigned long handle, bool intr);
+
+ /**
+ * backup_page - Backup a page
+ * @backup: The struct backup pointer to use.
+ * @page: The page to back up.
+ * @writeback: Whether to perform immediate writeback of the page.
+ * This may have performance implications.
+ * @i: A unique integer for each page and each struct backup.
+ * This is a hint allowing the backup backend to avoid managing
+ * its address space separately.
+ * @page_gfp: The gfp value used when the page was allocated.
+ * This is used for accounting purposes.
+ * @alloc_gfp: The gpf to be used when the backend needs to allocaete
+ * memory.
+ *
+ * Return: A handle on success. 0 on failure.
+ * (This is following the swp_entry_t convention).
+ *
+ * Note: This function could be extended to back up a folio and
+ * backends would then split the folio internally if needed.
+ * Drawback is that the caller would then have to keep track of
+ */
+ unsigned long (*backup_page)(struct ttm_backup *backup, struct page *page,
+ bool writeback, pgoff_t i, gfp_t page_gfp,
+ gfp_t alloc_gfp);
+ /**
+ * fini - Free the struct backup resources after last use.
+ * @backup: Pointer to the struct backup whose resources to free.
+ *
+ * After a call to @fini, it's illegal to use the @backup pointer.
+ */
+ void (*fini)(struct ttm_backup *backup);
+};
+
+/**
+ * struct ttm_backup - Abstract a backup backend.
+ * @ops: The operations as described above.
+ *
+ * The struct ttm_backup is intended to be subclassed by the
+ * backend implementation.
+ */
+struct ttm_backup {
+ const struct ttm_backup_ops *ops;
+};
+
+/**
+ * ttm_backup_shmem_create() - Create a shmem-based struct backup.
+ * @size: The maximum size (in bytes) to back up.
+ *
+ * Create a backup utilizing shmem objects.
+ *
+ * Return: A pointer to a struct ttm_backup on success,
+ * an error pointer on error.
+ */
+struct ttm_backup *ttm_backup_shmem_create(loff_t size);
+
+#endif
--
2.44.0
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH v5 09/12] drm/ttm/pool: Provide a helper to shrink pages
2024-06-18 7:18 [PATCH v5 00/12] TTM shrinker helpers and xe buffer object shrinker Thomas Hellström
` (7 preceding siblings ...)
2024-06-18 7:18 ` [PATCH v5 08/12] drm/ttm: Add a virtual base class for graphics memory backup Thomas Hellström
@ 2024-06-18 7:18 ` Thomas Hellström
2024-06-18 7:18 ` [PATCH v5 10/12] drm/ttm: Use fault-injection to test error paths Thomas Hellström
` (10 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Thomas Hellström @ 2024-06-18 7:18 UTC (permalink / raw)
To: intel-xe
Cc: Thomas Hellström, Christian König,
Somalapuram Amaranath, Matthew Brost, dri-devel
Provide a helper to shrink ttm_tt page-vectors on a per-page
basis. A ttm_backup backend could then in theory get away with
allocating a single temporary page for each struct ttm_tt.
This is accomplished by splitting larger pages before trying to
back them up.
In the future we could allow ttm_backup to handle backing up
large pages as well, but currently there's no benefit in
doing that, since the shmem backup backend would have to
split those anyway to avoid allocating too much temporary
memory, and if the backend instead inserts pages into the
swap-cache, those are split on reclaim by the core.
Due to potential backup- and recover errors, allow partially swapped
out struct ttm_tt's, although mark them as swapped out stopping them
from being swapped out a second time. More details in the ttm_pool.c
DOC section.
v2:
- A couple of cleanups and error fixes in ttm_pool_back_up_tt.
- s/back_up/backup/
- Add a writeback parameter to the exported interface.
Cc: Christian König <christian.koenig@amd.com>
Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: <dri-devel@lists.freedesktop.org>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
---
drivers/gpu/drm/ttm/ttm_pool.c | 397 +++++++++++++++++++++++++++++++--
drivers/gpu/drm/ttm/ttm_tt.c | 37 +++
include/drm/ttm/ttm_pool.h | 5 +
include/drm/ttm/ttm_tt.h | 20 ++
4 files changed, 446 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
index 6e1fd6985ffc..38e50cf81b0a 100644
--- a/drivers/gpu/drm/ttm/ttm_pool.c
+++ b/drivers/gpu/drm/ttm/ttm_pool.c
@@ -41,6 +41,7 @@
#include <asm/set_memory.h>
#endif
+#include <drm/ttm/ttm_backup.h>
#include <drm/ttm/ttm_pool.h>
#include <drm/ttm/ttm_tt.h>
#include <drm/ttm/ttm_bo.h>
@@ -58,6 +59,32 @@ struct ttm_pool_dma {
unsigned long vaddr;
};
+/**
+ * struct ttm_pool_tt_restore - State representing restore from backup
+ * @alloced_pages: Total number of already allocated pages for the ttm_tt.
+ * @restored_pages: Number of (sub) pages restored from swap for this
+ * chunk of 1 << @order pages.
+ * @first_page: The ttm page ptr representing for @old_pages[0].
+ * @caching_divide: Page pointer where subsequent pages are cached.
+ * @old_pages: Backup copy of page pointers that were replaced by the new
+ * page allocation.
+ * @pool: The pool used for page allocation while restoring.
+ * @order: The order of the last page allocated while restoring.
+ *
+ * Recovery from backup might fail when we've recovered less than the
+ * full ttm_tt. In order not to loose any data (yet), keep information
+ * around that allows us to restart a failed ttm backup recovery.
+ */
+struct ttm_pool_tt_restore {
+ pgoff_t alloced_pages;
+ pgoff_t restored_pages;
+ struct page **first_page;
+ struct page **caching_divide;
+ struct ttm_pool *pool;
+ unsigned int order;
+ struct page *old_pages[];
+};
+
static unsigned long page_pool_size;
MODULE_PARM_DESC(page_pool_size, "Number of pages in the WC/UC/DMA pool");
@@ -354,11 +381,102 @@ static unsigned int ttm_pool_page_order(struct ttm_pool *pool, struct page *p)
return p->private;
}
+/*
+ * To be able to insert single pages into backup directly,
+ * we need to split multi-order page allocations and make them look
+ * like single-page allocations.
+ */
+static void ttm_pool_split_for_swap(struct ttm_pool *pool, struct page *p)
+{
+ unsigned int order = ttm_pool_page_order(pool, p);
+ pgoff_t nr;
+
+ if (!order)
+ return;
+
+ split_page(p, order);
+ nr = 1UL << order;
+ while (nr--)
+ (p++)->private = 0;
+}
+
+/**
+ * DOC: Partial backup and restoration of a struct ttm_tt.
+ *
+ * Swapout using ttm_backup::ops::backup_page() and swapin using
+ * ttm_backup::ops::copy_backed_up_page() may fail.
+ * The former most likely due to lack of swap-space or memory, the latter due
+ * to lack of memory or because of signal interruption during waits.
+ *
+ * Backupfailure is easily handled by using a ttm_tt pages vector that holds
+ * both swap entries and page pointers. This has to be taken into account when
+ * restoring such a ttm_tt from backup, and when freeing it while backed up.
+ * When restoring, for simplicity, new pages are actually allocated from the
+ * pool and the contents of any old pages are copied in and then the old pages
+ * are released.
+ *
+ * For restoration failures, the struct ttm_pool_tt_restore holds sufficient state
+ * to be able to resume an interrupted restore, and that structure is freed once
+ * the restoration is complete. If the struct ttm_tt is destroyed while there
+ * is a valid struct ttm_pool_tt_restore attached, that is also properly taken
+ * care of.
+ */
+
+static bool ttm_pool_restore_valid(const struct ttm_pool_tt_restore *restore)
+{
+ return restore && restore->restored_pages < (1 << restore->order);
+}
+
+static int ttm_pool_restore_tt(struct ttm_pool_tt_restore *restore,
+ struct ttm_backup *backup,
+ struct ttm_operation_ctx *ctx)
+{
+ unsigned int i, nr = 1 << restore->order;
+ int ret = 0;
+
+ if (!ttm_pool_restore_valid(restore))
+ return 0;
+
+ for (i = restore->restored_pages; i < nr; ++i) {
+ struct page *p = restore->old_pages[i];
+
+ if (ttm_backup_page_ptr_is_handle(p)) {
+ unsigned long handle = ttm_backup_page_ptr_to_handle(p);
+
+ if (handle == 0)
+ continue;
+
+ ret = backup->ops->copy_backed_up_page
+ (backup, restore->first_page[i],
+ handle, ctx->interruptible);
+ if (ret)
+ break;
+
+ backup->ops->drop(backup, handle);
+ } else if (p) {
+ /*
+ * We could probably avoid splitting the old page
+ * using clever logic, but ATM we don't care.
+ */
+ ttm_pool_split_for_swap(restore->pool, p);
+ copy_highpage(restore->first_page[i], p);
+ __free_pages(p, 0);
+ }
+
+ restore->restored_pages++;
+ restore->old_pages[i] = NULL;
+ cond_resched();
+ }
+
+ return ret;
+}
+
/* Called when we got a page, either from a pool or newly allocated */
static int ttm_pool_page_allocated(struct ttm_pool *pool, unsigned int order,
struct page *p, dma_addr_t **dma_addr,
unsigned long *num_pages,
- struct page ***pages)
+ struct page ***pages,
+ struct ttm_pool_tt_restore *restore)
{
unsigned int i;
int r;
@@ -369,6 +487,16 @@ static int ttm_pool_page_allocated(struct ttm_pool *pool, unsigned int order,
return r;
}
+ if (restore) {
+ memcpy(restore->old_pages, *pages,
+ (1 << order) * sizeof(*restore->old_pages));
+ memset(*pages, 0, (1 << order) * sizeof(**pages));
+ restore->order = order;
+ restore->restored_pages = 0;
+ restore->first_page = *pages;
+ restore->alloced_pages += 1UL << order;
+ }
+
*num_pages -= 1 << order;
for (i = 1 << order; i; --i, ++(*pages), ++p)
**pages = p;
@@ -394,22 +522,39 @@ static void ttm_pool_free_range(struct ttm_pool *pool, struct ttm_tt *tt,
pgoff_t start_page, pgoff_t end_page)
{
struct page **pages = &tt->pages[start_page];
+ struct ttm_backup *backup = tt->backup;
unsigned int order;
pgoff_t i, nr;
for (i = start_page; i < end_page; i += nr, pages += nr) {
struct ttm_pool_type *pt = NULL;
+ struct page *p = *pages;
+
+ if (ttm_backup_page_ptr_is_handle(p)) {
+ unsigned long handle = ttm_backup_page_ptr_to_handle(p);
+
+ nr = 1;
+ if (handle != 0)
+ backup->ops->drop(backup, handle);
+ continue;
+ }
+
+ if (pool) {
+ order = ttm_pool_page_order(pool, p);
+ nr = (1UL << order);
+ if (tt->dma_address)
+ ttm_pool_unmap(pool, tt->dma_address[i], nr);
- order = ttm_pool_page_order(pool, *pages);
- nr = (1UL << order);
- if (tt->dma_address)
- ttm_pool_unmap(pool, tt->dma_address[i], nr);
+ pt = ttm_pool_select_type(pool, caching, order);
+ } else {
+ order = p->private;
+ nr = (1UL << order);
+ }
- pt = ttm_pool_select_type(pool, caching, order);
if (pt)
- ttm_pool_type_give(pt, *pages);
+ ttm_pool_type_give(pt, p);
else
- ttm_pool_free_page(pool, caching, order, *pages);
+ ttm_pool_free_page(pool, caching, order, p);
}
}
@@ -453,9 +598,37 @@ int ttm_pool_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
else
gfp_flags |= GFP_HIGHUSER;
- for (order = min_t(unsigned int, MAX_PAGE_ORDER, __fls(num_pages));
- num_pages;
- order = min_t(unsigned int, order, __fls(num_pages))) {
+ order = min_t(unsigned int, MAX_PAGE_ORDER, __fls(num_pages));
+
+ if (tt->page_flags & TTM_TT_FLAG_PRIV_BACKED_UP) {
+ if (!tt->restore) {
+ gfp_t gfp = GFP_KERNEL | __GFP_NOWARN;
+
+ if (ctx->gfp_retry_mayfail)
+ gfp |= __GFP_RETRY_MAYFAIL;
+
+ tt->restore =
+ kvzalloc(struct_size(tt->restore, old_pages,
+ (size_t)1 << order), gfp);
+ /* RFC: Possibly loop on -ENOMEM and reduce order. */
+ if (!tt->restore)
+ return -ENOMEM;
+ } else if (ttm_pool_restore_valid(tt->restore)) {
+ struct ttm_pool_tt_restore *restore = tt->restore;
+
+ num_pages -= restore->alloced_pages;
+ order = min_t(unsigned int, order, __fls(num_pages));
+ pages += restore->alloced_pages;
+ r = ttm_pool_restore_tt(restore, tt->backup, ctx);
+ if (r)
+ return r;
+ caching = restore->caching_divide;
+ }
+
+ tt->restore->pool = pool;
+ }
+
+ for (; num_pages; order = min_t(unsigned int, order, __fls(num_pages))) {
struct ttm_pool_type *pt;
page_caching = tt->caching;
@@ -472,11 +645,19 @@ int ttm_pool_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
r = ttm_pool_page_allocated(pool, order, p,
&dma_addr,
&num_pages,
- &pages);
+ &pages,
+ tt->restore);
if (r)
goto error_free_page;
caching = pages;
+ if (ttm_pool_restore_valid(tt->restore)) {
+ r = ttm_pool_restore_tt(tt->restore, tt->backup,
+ ctx);
+ if (r)
+ goto error_free_all;
+ }
+
if (num_pages < (1 << order))
break;
@@ -496,9 +677,17 @@ int ttm_pool_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
caching = pages;
}
r = ttm_pool_page_allocated(pool, order, p, &dma_addr,
- &num_pages, &pages);
+ &num_pages, &pages,
+ tt->restore);
if (r)
goto error_free_page;
+
+ if (ttm_pool_restore_valid(tt->restore)) {
+ r = ttm_pool_restore_tt(tt->restore, tt->backup, ctx);
+ if (r)
+ goto error_free_all;
+ }
+
if (PageHighMem(p))
caching = pages;
}
@@ -517,12 +706,26 @@ int ttm_pool_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
if (r)
goto error_free_all;
+ if (tt->restore) {
+ kvfree(tt->restore);
+ tt->restore = NULL;
+ }
+
+ if (tt->page_flags & TTM_TT_FLAG_PRIV_BACKED_UP)
+ tt->page_flags &= ~(TTM_TT_FLAG_PRIV_BACKED_UP |
+ TTM_TT_FLAG_SWAPPED);
+
return 0;
error_free_page:
ttm_pool_free_page(pool, page_caching, order, p);
error_free_all:
+ if (tt->page_flags & TTM_TT_FLAG_PRIV_BACKED_UP) {
+ tt->restore->caching_divide = caching;
+ return r;
+ }
+
num_pages = tt->num_pages - num_pages;
caching_divide = caching - tt->pages;
ttm_pool_free_range(pool, tt, tt->caching, 0, caching_divide);
@@ -549,6 +752,174 @@ void ttm_pool_free(struct ttm_pool *pool, struct ttm_tt *tt)
}
EXPORT_SYMBOL(ttm_pool_free);
+/**
+ * ttm_pool_release_backed_up() - Release content of a swapped-out struct ttm_tt
+ * @tt: The struct ttm_tt.
+ *
+ * Release handles with associated content or any remaining pages of
+ * a backed-up struct ttm_tt.
+ */
+void ttm_pool_release_backed_up(struct ttm_tt *tt)
+{
+ struct ttm_backup *backup = tt->backup;
+ struct ttm_pool_tt_restore *restore;
+ pgoff_t i, start_page = 0;
+ unsigned long handle;
+
+ if (!(tt->page_flags & TTM_TT_FLAG_PRIV_BACKED_UP))
+ return;
+
+ restore = tt->restore;
+
+ if (ttm_pool_restore_valid(restore)) {
+ pgoff_t nr = 1UL << restore->order;
+
+ for (i = restore->restored_pages; i < nr; ++i) {
+ struct page *p = restore->old_pages[i];
+
+ if (ttm_backup_page_ptr_is_handle(p)) {
+ handle = ttm_backup_page_ptr_to_handle(p);
+ if (handle == 0)
+ continue;
+
+ backup->ops->drop(backup, handle);
+ } else if (p) {
+ ttm_pool_split_for_swap(restore->pool, p);
+ __free_pages(p, 0);
+ }
+ }
+ }
+
+ if (restore) {
+ pgoff_t mid = restore->caching_divide - tt->pages;
+
+ start_page = restore->alloced_pages;
+ /* Pages that might be dma-mapped and non-cached */
+ ttm_pool_free_range(restore->pool, tt, tt->caching,
+ 0, mid);
+ /* Pages that might be dma-mapped but cached */
+ ttm_pool_free_range(restore->pool, tt, ttm_cached,
+ mid, restore->alloced_pages);
+ }
+
+ /* Shrunken pages. Cached and not dma-mapped. */
+ ttm_pool_free_range(NULL, tt, ttm_cached, start_page, tt->num_pages);
+
+ if (restore) {
+ kvfree(restore);
+ tt->restore = NULL;
+ }
+
+ tt->page_flags &= ~(TTM_TT_FLAG_PRIV_BACKED_UP | TTM_TT_FLAG_SWAPPED);
+}
+
+/**
+ * ttm_pool_backup_tt() - Back up or purge a struct ttm_tt
+ * @pool: The pool used when allocating the struct ttm_tt.
+ * @ttm: The struct ttm_tt.
+ * @purge: Don't back up but release pages directly to system.
+ * @writeback: If !@purge, Try to write out directly to the
+ * underlying persistent media.
+ *
+ * Back up or purge a struct ttm_tt. If @purge is true, then
+ * all pages will be freed directly to the system rather than to the pool
+ * they were allocated from, making the function behave similarly to
+ * ttm_pool_free(). If @purge is false the pages will be backed up instead,
+ * exchanged for handles.
+ * A subsequent call to ttm_pool_alloc() will then read back the content and
+ * a subsequent call to ttm_pool_release_shrunken() will drop it.
+ * If backup of a page fails for whatever reason, @ttm will still be
+ * partially backed up, retaining those pages for which backup fails.
+ *
+ * Return: Number of pages actually backed up or freed, or negative
+ * error code on error.
+ */
+long ttm_pool_backup_tt(struct ttm_pool *pool, struct ttm_tt *ttm, bool purge,
+ bool writeback)
+{
+ struct ttm_backup *backup = ttm->backup;
+ struct page *page;
+ unsigned long handle;
+ gfp_t alloc_gfp;
+ gfp_t gfp;
+ int ret = 0;
+ pgoff_t shrunken = 0;
+ pgoff_t i, num_pages;
+
+ if ((!get_nr_swap_pages() && !purge) ||
+ pool->use_dma_alloc ||
+ (ttm->page_flags & TTM_TT_FLAG_PRIV_BACKED_UP))
+ return -EBUSY;
+
+#ifdef CONFIG_X86
+ /* Anything returned to the system needs to be cached. */
+ if (ttm->caching != ttm_cached)
+ set_pages_array_wb(ttm->pages, ttm->num_pages);
+#endif
+
+ if (ttm->dma_address || purge) {
+ for (i = 0; i < ttm->num_pages; i += num_pages) {
+ unsigned int order;
+
+ page = ttm->pages[i];
+ if (unlikely(!page)) {
+ num_pages = 1;
+ continue;
+ }
+
+ order = ttm_pool_page_order(pool, page);
+ num_pages = 1UL << order;
+ if (ttm->dma_address)
+ ttm_pool_unmap(pool, ttm->dma_address[i],
+ num_pages);
+ if (purge) {
+ shrunken += num_pages;
+ page->private = 0;
+ __free_pages(page, order);
+ memset(ttm->pages + i, 0,
+ num_pages * sizeof(*ttm->pages));
+ }
+ }
+ }
+
+ if (purge)
+ return shrunken;
+
+ if (pool->use_dma32)
+ gfp = GFP_DMA32;
+ else
+ gfp = GFP_HIGHUSER;
+
+ alloc_gfp = GFP_KERNEL | __GFP_HIGH | __GFP_NOWARN | __GFP_RETRY_MAYFAIL;
+
+ for (i = 0; i < ttm->num_pages; ++i) {
+ page = ttm->pages[i];
+ if (unlikely(!page))
+ continue;
+
+ ttm_pool_split_for_swap(pool, page);
+
+ handle = backup->ops->backup_page(backup, page, writeback, i,
+ gfp, alloc_gfp);
+ if (handle) {
+ ttm->pages[i] = ttm_backup_handle_to_page_ptr(handle);
+ put_page(page);
+ shrunken++;
+ } else {
+ /* We allow partially shrunken tts */
+ ret = -ENOMEM;
+ break;
+ }
+ cond_resched();
+ }
+
+ if (shrunken)
+ ttm->page_flags |= (TTM_TT_FLAG_PRIV_BACKED_UP |
+ TTM_TT_FLAG_SWAPPED);
+
+ return shrunken ? shrunken : ret;
+}
+
/**
* ttm_pool_init - Initialize a pool
*
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index 7b00ddf0ce49..bc994b8e7e73 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -40,6 +40,7 @@
#include <drm/drm_cache.h>
#include <drm/drm_device.h>
#include <drm/drm_util.h>
+#include <drm/ttm/ttm_backup.h>
#include <drm/ttm/ttm_bo.h>
#include <drm/ttm/ttm_tt.h>
@@ -158,6 +159,7 @@ static void ttm_tt_init_fields(struct ttm_tt *ttm,
ttm->swap_storage = NULL;
ttm->sg = bo->sg;
ttm->caching = caching;
+ ttm->restore = NULL;
}
int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
@@ -182,6 +184,12 @@ void ttm_tt_fini(struct ttm_tt *ttm)
fput(ttm->swap_storage);
ttm->swap_storage = NULL;
+ ttm_pool_release_backed_up(ttm);
+ if (ttm->backup) {
+ ttm->backup->ops->fini(ttm->backup);
+ ttm->backup = NULL;
+ }
+
if (ttm->pages)
kvfree(ttm->pages);
else
@@ -252,6 +260,35 @@ int ttm_tt_swapin(struct ttm_tt *ttm)
return ret;
}
+/**
+ * ttm_tt_backup() - Helper to back up a struct ttm_tt.
+ * @bdev: The TTM device.
+ * @tt: The struct ttm_tt.
+ * @purge: Don't back up but release pages directly to system,
+ * bypassing any pooling.
+ * @writeback: If !@purge, try to write out directly to the
+ * underlying persistent media.
+ *
+ * Helper for a TTM driver to use from the bo_shrink() method to shrink
+ * a struct ttm_tt, after it has done the necessary unbinding. This function
+ * will update the page accounting and call ttm_pool_shrink_tt to free pages
+ * or move them to the swap cache.
+ *
+ * Return: Number of pages freed or swapped out, or negative error code on
+ * error.
+ */
+long ttm_tt_backup(struct ttm_device *bdev, struct ttm_tt *tt, bool purge,
+ bool writeback)
+{
+ long ret = ttm_pool_backup_tt(&bdev->pool, tt, purge, writeback);
+
+ if (ret > 0)
+ tt->page_flags &= ~TTM_TT_FLAG_PRIV_POPULATED;
+
+ return ret;
+}
+EXPORT_SYMBOL(ttm_tt_backup);
+
/**
* ttm_tt_swapout - swap out tt object
*
diff --git a/include/drm/ttm/ttm_pool.h b/include/drm/ttm/ttm_pool.h
index 160d954a261e..4e4db369952b 100644
--- a/include/drm/ttm/ttm_pool.h
+++ b/include/drm/ttm/ttm_pool.h
@@ -89,6 +89,11 @@ void ttm_pool_fini(struct ttm_pool *pool);
int ttm_pool_debugfs(struct ttm_pool *pool, struct seq_file *m);
+void ttm_pool_release_backed_up(struct ttm_tt *tt);
+
+long ttm_pool_backup_tt(struct ttm_pool *pool, struct ttm_tt *ttm,
+ bool purge, bool writeback);
+
int ttm_pool_mgr_init(unsigned long num_pages);
void ttm_pool_mgr_fini(void);
diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h
index 2b9d856ff388..6b990f1e7dd0 100644
--- a/include/drm/ttm/ttm_tt.h
+++ b/include/drm/ttm/ttm_tt.h
@@ -32,11 +32,13 @@
#include <drm/ttm/ttm_caching.h>
#include <drm/ttm/ttm_kmap_iter.h>
+struct ttm_backup;
struct ttm_device;
struct ttm_tt;
struct ttm_resource;
struct ttm_buffer_object;
struct ttm_operation_ctx;
+struct ttm_pool_tt_restore;
/**
* struct ttm_tt - This is a structure holding the pages, caching- and aperture
@@ -85,6 +87,9 @@ struct ttm_tt {
* fault handling abuses the DMA api a bit and dma_map_attrs can't be
* used to assure pgprot always matches.
*
+ * TTM_TT_FLAG_PRIV_BACKED_UP: TTM internal only. This is set if the
+ * struct ttm_tt has been (possibly partially) backed up.
+ *
* TTM_TT_FLAG_PRIV_POPULATED: TTM internal only. DO NOT USE. This is
* set by TTM after ttm_tt_populate() has successfully returned, and is
* then unset when TTM calls ttm_tt_unpopulate().
@@ -96,6 +101,7 @@ struct ttm_tt {
#define TTM_TT_FLAG_DECRYPTED BIT(4)
#define TTM_TT_FLAG_PRIV_POPULATED BIT(5)
+#define TTM_TT_FLAG_PRIV_BACKED_UP BIT(6)
uint32_t page_flags;
/** @num_pages: Number of pages in the page array. */
uint32_t num_pages;
@@ -105,11 +111,21 @@ struct ttm_tt {
dma_addr_t *dma_address;
/** @swap_storage: Pointer to shmem struct file for swap storage. */
struct file *swap_storage;
+ /**
+ * @backup: Pointer to backup struct for backed up tts.
+ * RFC: Could possibly be unified with @swap_storage.
+ */
+ struct ttm_backup *backup;
/**
* @caching: The current caching state of the pages, see enum
* ttm_caching.
*/
enum ttm_caching caching;
+ /**
+ * @restore: Partial restoration from backup state.
+ * RFC: Incorporate in struct ttm_backup?
+ */
+ struct ttm_pool_tt_restore *restore;
};
/**
@@ -230,6 +246,10 @@ void ttm_tt_mgr_init(unsigned long num_pages, unsigned long num_dma32_pages);
struct ttm_kmap_iter *ttm_kmap_iter_tt_init(struct ttm_kmap_iter_tt *iter_tt,
struct ttm_tt *tt);
unsigned long ttm_tt_pages_limit(void);
+
+long ttm_tt_backup(struct ttm_device *bdev, struct ttm_tt *tt, bool purge,
+ bool writeback);
+
#if IS_ENABLED(CONFIG_AGP)
#include <linux/agp_backend.h>
--
2.44.0
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH v5 10/12] drm/ttm: Use fault-injection to test error paths
2024-06-18 7:18 [PATCH v5 00/12] TTM shrinker helpers and xe buffer object shrinker Thomas Hellström
` (8 preceding siblings ...)
2024-06-18 7:18 ` [PATCH v5 09/12] drm/ttm/pool: Provide a helper to shrink pages Thomas Hellström
@ 2024-06-18 7:18 ` Thomas Hellström
2024-06-18 7:18 ` [PATCH v5 11/12] drm/ttm, drm/xe: Add a shrinker for xe bos Thomas Hellström
` (9 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Thomas Hellström @ 2024-06-18 7:18 UTC (permalink / raw)
To: intel-xe
Cc: Thomas Hellström, Christian König,
Somalapuram Amaranath, Matthew Brost, dri-devel
Use fault-injection to test partial TTM swapout and interrupted swapin.
Return -EINTR for swapin to test the callers ability to handle and
restart the swapin, and on swapout perform a partial swapout to test that
the swapin and release_shrunken functionality.
Cc: Christian König <christian.koenig@amd.com>
Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: <dri-devel@lists.freedesktop.org>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
---
drivers/gpu/drm/Kconfig | 10 ++++++++++
drivers/gpu/drm/ttm/ttm_pool.c | 17 ++++++++++++++++-
2 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 981f43d4ca8c..5f010ec31002 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -272,6 +272,16 @@ config DRM_GPUVM
GPU-VM representation providing helpers to manage a GPUs virtual
address space
+config DRM_TTM_BACKUP_FAULT_INJECT
+ bool "Enable fault injection during TTM backup"
+ depends on DRM_TTM
+ default n
+ help
+ Inject recoverable failures during TTM backup and recovery of
+ backed-up objects. For DRM driver developers only.
+
+ If in doubt, choose N.
+
config DRM_BUDDY
tristate
depends on DRM
diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
index 38e50cf81b0a..d32a1f2e5e50 100644
--- a/drivers/gpu/drm/ttm/ttm_pool.c
+++ b/drivers/gpu/drm/ttm/ttm_pool.c
@@ -431,6 +431,7 @@ static int ttm_pool_restore_tt(struct ttm_pool_tt_restore *restore,
struct ttm_backup *backup,
struct ttm_operation_ctx *ctx)
{
+ static unsigned long __maybe_unused swappedin;
unsigned int i, nr = 1 << restore->order;
int ret = 0;
@@ -446,6 +447,13 @@ static int ttm_pool_restore_tt(struct ttm_pool_tt_restore *restore,
if (handle == 0)
continue;
+ if (IS_ENABLED(CONFIG_DRM_TTM_BACKUP_FAULT_INJECT) &&
+ ctx->interruptible &&
+ ++swappedin % 100 == 0) {
+ ret = -EINTR;
+ break;
+ }
+
ret = backup->ops->copy_backed_up_page
(backup, restore->first_page[i],
handle, ctx->interruptible);
@@ -892,7 +900,14 @@ long ttm_pool_backup_tt(struct ttm_pool *pool, struct ttm_tt *ttm, bool purge,
alloc_gfp = GFP_KERNEL | __GFP_HIGH | __GFP_NOWARN | __GFP_RETRY_MAYFAIL;
- for (i = 0; i < ttm->num_pages; ++i) {
+ num_pages = ttm->num_pages;
+
+ /* Pretend doing fault injection by shrinking only half of the pages. */
+
+ if (IS_ENABLED(CONFIG_DRM_TTM_BACKUP_FAULT_INJECT))
+ num_pages = DIV_ROUND_UP(num_pages, 2);
+
+ for (i = 0; i < num_pages; ++i) {
page = ttm->pages[i];
if (unlikely(!page))
continue;
--
2.44.0
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH v5 11/12] drm/ttm, drm/xe: Add a shrinker for xe bos
2024-06-18 7:18 [PATCH v5 00/12] TTM shrinker helpers and xe buffer object shrinker Thomas Hellström
` (9 preceding siblings ...)
2024-06-18 7:18 ` [PATCH v5 10/12] drm/ttm: Use fault-injection to test error paths Thomas Hellström
@ 2024-06-18 7:18 ` Thomas Hellström
2024-06-18 7:18 ` [PATCH v5 12/12] drm/xe: Increase the XE_PL_TT watermark Thomas Hellström
` (8 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Thomas Hellström @ 2024-06-18 7:18 UTC (permalink / raw)
To: intel-xe
Cc: Thomas Hellström, Christian König,
Somalapuram Amaranath, Matthew Brost, dri-devel
Rather than relying on the TTM watermark accounting add a shrinker
for xe_bos in TT or system memory.
Leverage the newly added TTM per-page shrinking and shmem backup
support.
Although xe doesn't fully support WONTNEED (purgeable) bos yet,
introduce and add shrinker support for purgeable ttm_tts.
v2:
- Cleanups bugfixes and a KUNIT shrinker test.
- Add writeback support, and activate if kswapd.
v3:
- Move the try_shrink() helper to core TTM.
- Minor cleanups.
v4:
- Add runtime pm for the shrinker. Shrinking may require an active
device for CCS metadata copying.
v5:
- Separately purge ghost- and zombie objects in the shrinker.
- Fix a format specifier - type inconsistency. (Kernel test robot).
Cc: Christian König <christian.koenig@amd.com>
Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: <dri-devel@lists.freedesktop.org>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
---
drivers/gpu/drm/ttm/ttm_bo_util.c | 67 ++++++
drivers/gpu/drm/xe/Makefile | 1 +
drivers/gpu/drm/xe/tests/xe_bo.c | 118 +++++++++++
drivers/gpu/drm/xe/tests/xe_bo_test.c | 1 +
drivers/gpu/drm/xe/tests/xe_bo_test.h | 1 +
drivers/gpu/drm/xe/xe_bo.c | 155 ++++++++++++--
drivers/gpu/drm/xe/xe_bo.h | 26 +++
drivers/gpu/drm/xe/xe_device.c | 8 +
drivers/gpu/drm/xe/xe_device_types.h | 2 +
drivers/gpu/drm/xe/xe_shrinker.c | 287 ++++++++++++++++++++++++++
drivers/gpu/drm/xe/xe_shrinker.h | 18 ++
include/drm/ttm/ttm_bo.h | 3 +
12 files changed, 671 insertions(+), 16 deletions(-)
create mode 100644 drivers/gpu/drm/xe/xe_shrinker.c
create mode 100644 drivers/gpu/drm/xe/xe_shrinker.h
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index 45fcaf6f8644..44711f422459 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -913,3 +913,70 @@ long ttm_lru_walk_for_evict(struct ttm_lru_walk *walk, struct ttm_device *bdev,
ttm_resource_cursor_fini(&cursor);
return sofar;
}
+EXPORT_SYMBOL(ttm_lru_walk_for_evict);
+
+/**
+ * ttm_bo_try_shrink - LRU walk helper to shrink a ttm buffer object.
+ * @walk: The struct xe_ttm_lru_walk that describes the walk.
+ * @bo: The buffer object.
+ * @purge: Whether to attempt to purge the bo content since it's no
+ * longer needed.
+ * @writeback: If !@purge, attempt to write out to persistent storage.
+ *
+ * The function uses the ttm_tt_back_up functionality to back up or
+ * purge a struct ttm_tt. If the bo is not in system, it's first
+ * moved there.
+ *
+ * Return: The number of pages shrunken or purged, or
+ * negative error code on failure.
+ */
+long ttm_bo_try_shrink(struct ttm_lru_walk *walk, struct ttm_buffer_object *bo,
+ bool purge, bool writeback)
+{
+ static const struct ttm_place sys_placement_flags = {
+ .fpfn = 0,
+ .lpfn = 0,
+ .mem_type = TTM_PL_SYSTEM,
+ .flags = 0,
+ };
+ static struct ttm_placement sys_placement = {
+ .num_placement = 1,
+ .placement = &sys_placement_flags,
+ };
+ struct ttm_operation_ctx *ctx = walk->ctx;
+ struct ttm_tt *tt = bo->ttm;
+ long lret;
+
+ dma_resv_assert_held(bo->base.resv);
+
+ if (!tt || !ttm_tt_is_populated(tt))
+ return 0;
+
+ if (bo->resource->mem_type != TTM_PL_SYSTEM) {
+ int ret = ttm_bo_validate(bo, &sys_placement, ctx);
+
+ if (ret) {
+ if (ret == -EINTR || ret == -EDEADLK ||
+ ret == -ERESTARTSYS)
+ return ret;
+ return 0;
+ }
+ }
+
+ lret = ttm_bo_wait_ctx(bo, ctx);
+ if (lret < 0) {
+ if (lret == -ERESTARTSYS)
+ return lret;
+ return 0;
+ }
+
+ if (bo->deleted)
+ lret = ttm_tt_backup(bo->bdev, tt, true, writeback);
+ else
+ lret = ttm_tt_backup(bo->bdev, tt, purge, writeback);
+ if (lret < 0 && lret != -EINTR)
+ return 0;
+
+ return lret;
+}
+EXPORT_SYMBOL(ttm_bo_try_shrink);
diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
index 1905a80e61e3..46304592d94d 100644
--- a/drivers/gpu/drm/xe/Makefile
+++ b/drivers/gpu/drm/xe/Makefile
@@ -107,6 +107,7 @@ xe-y += xe_bb.o \
xe_ring_ops.o \
xe_sa.o \
xe_sched_job.o \
+ xe_shrinker.o \
xe_step.o \
xe_sync.o \
xe_tile.o \
diff --git a/drivers/gpu/drm/xe/tests/xe_bo.c b/drivers/gpu/drm/xe/tests/xe_bo.c
index 9f3c02826464..49617f16dc76 100644
--- a/drivers/gpu/drm/xe/tests/xe_bo.c
+++ b/drivers/gpu/drm/xe/tests/xe_bo.c
@@ -6,6 +6,8 @@
#include <kunit/test.h>
#include <kunit/visibility.h>
+#include <uapi/linux/sysinfo.h>
+
#include "tests/xe_bo_test.h"
#include "tests/xe_pci_test.h"
#include "tests/xe_test.h"
@@ -350,3 +352,119 @@ void xe_bo_evict_kunit(struct kunit *test)
xe_call_for_each_device(evict_test_run_device);
}
EXPORT_SYMBOL_IF_KUNIT(xe_bo_evict_kunit);
+
+struct xe_bo_link {
+ struct list_head link;
+ struct xe_bo *bo;
+};
+
+#define XE_BO_SHRINK_SIZE ((unsigned long)SZ_64M)
+
+/*
+ * Try to create system bos corresponding to twice the amount
+ * of available system memory to test shrinker functionality.
+ * If no swap space is available to accommodate the
+ * memory overcommit, mark bos purgeable.
+ */
+static int shrink_test_run_device(struct xe_device *xe)
+{
+ struct kunit *test = xe_cur_kunit();
+ LIST_HEAD(bos);
+ struct xe_bo_link *link, *next;
+ struct sysinfo si;
+ size_t total, alloced;
+ unsigned int interrupted = 0, successful = 0;
+
+ si_meminfo(&si);
+ total = si.freeram * si.mem_unit;
+
+ kunit_info(test, "Free ram is %lu bytes. Will allocate twice of that.\n",
+ (unsigned long) total);
+
+ total <<= 1;
+ for (alloced = 0; alloced < total ; alloced += XE_BO_SHRINK_SIZE) {
+ struct xe_bo *bo;
+ unsigned int mem_type;
+
+ link = kzalloc(sizeof(*link), GFP_KERNEL);
+ if (!link) {
+ KUNIT_FAIL(test, "Unexpeced link allocation failure\n");
+ break;
+ }
+
+ INIT_LIST_HEAD(&link->link);
+
+ /* We can create bos using WC caching here. But it is slower. */
+ bo = xe_bo_create_user(xe, NULL, NULL, XE_BO_SHRINK_SIZE,
+ DRM_XE_GEM_CPU_CACHING_WB,
+ ttm_bo_type_device,
+ XE_BO_FLAG_SYSTEM);
+ if (IS_ERR(bo)) {
+ if (bo != ERR_PTR(-ENOMEM) && bo != ERR_PTR(-ENOSPC) &&
+ bo != ERR_PTR(-EINTR) && bo != ERR_PTR(-ERESTARTSYS))
+ KUNIT_FAIL(test, "Error creating bo: %pe\n", bo);
+ kfree(link);
+ break;
+ }
+ link->bo = bo;
+ list_add_tail(&link->link, &bos);
+ xe_bo_lock(bo, false);
+
+ /*
+ * If we're low on swap entries, we can't shrink unless the bo
+ * is marked purgeable.
+ */
+ if (get_nr_swap_pages() < (XE_BO_SHRINK_SIZE >> PAGE_SHIFT) * 128) {
+ struct xe_ttm_tt *xe_tt =
+ container_of(bo->ttm.ttm, typeof(*xe_tt), ttm);
+ long num_pages = xe_tt->ttm.num_pages;
+
+ xe_tt->purgeable = true;
+ xe_shrinker_mod_pages(xe->mem.shrinker, -num_pages,
+ num_pages);
+ }
+
+ mem_type = bo->ttm.resource->mem_type;
+ xe_bo_unlock(bo);
+ if (mem_type != XE_PL_TT)
+ KUNIT_FAIL(test, "Bo in incorrect memory type: %u\n",
+ bo->ttm.resource->mem_type);
+ cond_resched();
+ if (signal_pending(current))
+ break;
+ }
+
+ /* Read back and destroy bos */
+ list_for_each_entry_safe_reverse(link, next, &bos, link) {
+ static struct ttm_operation_ctx ctx = {.interruptible = true};
+ struct xe_bo *bo = link->bo;
+ int ret;
+
+ if (!signal_pending(current)) {
+ xe_bo_lock(bo, NULL);
+ ret = ttm_bo_validate(&bo->ttm, &tt_placement, &ctx);
+ xe_bo_unlock(bo);
+ if (ret && ret != -EINTR)
+ KUNIT_FAIL(test, "Validation failed: %pe\n",
+ ERR_PTR(ret));
+ else if (ret)
+ interrupted++;
+ else
+ successful++;
+ }
+ xe_bo_put(link->bo);
+ list_del(&link->link);
+ kfree(link);
+ cond_resched();
+ }
+ kunit_info(test, "Readbacks interrupted: %u successful: %u\n",
+ interrupted, successful);
+
+ return 0;
+}
+
+void xe_bo_shrink_kunit(struct kunit *test)
+{
+ xe_call_for_each_device(shrink_test_run_device);
+}
+EXPORT_SYMBOL_IF_KUNIT(xe_bo_shrink_kunit);
diff --git a/drivers/gpu/drm/xe/tests/xe_bo_test.c b/drivers/gpu/drm/xe/tests/xe_bo_test.c
index a324cde77db8..317fa923e287 100644
--- a/drivers/gpu/drm/xe/tests/xe_bo_test.c
+++ b/drivers/gpu/drm/xe/tests/xe_bo_test.c
@@ -10,6 +10,7 @@
static struct kunit_case xe_bo_tests[] = {
KUNIT_CASE(xe_ccs_migrate_kunit),
KUNIT_CASE(xe_bo_evict_kunit),
+ KUNIT_CASE_SLOW(xe_bo_shrink_kunit),
{}
};
diff --git a/drivers/gpu/drm/xe/tests/xe_bo_test.h b/drivers/gpu/drm/xe/tests/xe_bo_test.h
index 0113ab45066a..7f44d14a45c5 100644
--- a/drivers/gpu/drm/xe/tests/xe_bo_test.h
+++ b/drivers/gpu/drm/xe/tests/xe_bo_test.h
@@ -10,5 +10,6 @@ struct kunit;
void xe_ccs_migrate_kunit(struct kunit *test);
void xe_bo_evict_kunit(struct kunit *test);
+void xe_bo_shrink_kunit(struct kunit *test);
#endif
diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index 74294f1b05bc..7c62cdf20480 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -10,6 +10,7 @@
#include <drm/drm_drv.h>
#include <drm/drm_gem_ttm_helper.h>
#include <drm/drm_managed.h>
+#include <drm/ttm/ttm_backup.h>
#include <drm/ttm/ttm_device.h>
#include <drm/ttm/ttm_placement.h>
#include <drm/ttm/ttm_tt.h>
@@ -25,6 +26,7 @@
#include "xe_pm.h"
#include "xe_preempt_fence.h"
#include "xe_res_cursor.h"
+#include "xe_shrinker.h"
#include "xe_trace_bo.h"
#include "xe_ttm_stolen_mgr.h"
#include "xe_vm.h"
@@ -278,11 +280,15 @@ static void xe_evict_flags(struct ttm_buffer_object *tbo,
}
}
+/* struct xe_ttm_tt - Subclassed ttm_tt for xe */
struct xe_ttm_tt {
struct ttm_tt ttm;
- struct device *dev;
+ /** @xe - The xe device */
+ struct xe_device *xe;
struct sg_table sgt;
struct sg_table *sg;
+ /** @purgeable - Whether the bo is purgeable (WONTNEED) */
+ bool purgeable;
};
static int xe_tt_map_sg(struct ttm_tt *tt)
@@ -291,7 +297,8 @@ static int xe_tt_map_sg(struct ttm_tt *tt)
unsigned long num_pages = tt->num_pages;
int ret;
- XE_WARN_ON(tt->page_flags & TTM_TT_FLAG_EXTERNAL);
+ XE_WARN_ON((tt->page_flags & TTM_TT_FLAG_EXTERNAL) &&
+ !(tt->page_flags & TTM_TT_FLAG_EXTERNAL_MAPPABLE));
if (xe_tt->sg)
return 0;
@@ -299,13 +306,13 @@ static int xe_tt_map_sg(struct ttm_tt *tt)
ret = sg_alloc_table_from_pages_segment(&xe_tt->sgt, tt->pages,
num_pages, 0,
(u64)num_pages << PAGE_SHIFT,
- xe_sg_segment_size(xe_tt->dev),
+ xe_sg_segment_size(xe_tt->xe->drm.dev),
GFP_KERNEL);
if (ret)
return ret;
xe_tt->sg = &xe_tt->sgt;
- ret = dma_map_sgtable(xe_tt->dev, xe_tt->sg, DMA_BIDIRECTIONAL,
+ ret = dma_map_sgtable(xe_tt->xe->drm.dev, xe_tt->sg, DMA_BIDIRECTIONAL,
DMA_ATTR_SKIP_CPU_SYNC);
if (ret) {
sg_free_table(xe_tt->sg);
@@ -321,7 +328,7 @@ static void xe_tt_unmap_sg(struct ttm_tt *tt)
struct xe_ttm_tt *xe_tt = container_of(tt, struct xe_ttm_tt, ttm);
if (xe_tt->sg) {
- dma_unmap_sgtable(xe_tt->dev, xe_tt->sg,
+ dma_unmap_sgtable(xe_tt->xe->drm.dev, xe_tt->sg,
DMA_BIDIRECTIONAL, 0);
sg_free_table(xe_tt->sg);
xe_tt->sg = NULL;
@@ -336,21 +343,41 @@ struct sg_table *xe_bo_sg(struct xe_bo *bo)
return xe_tt->sg;
}
+/*
+ * Account ttm pages against the device shrinker's shrinkable and
+ * purgeable counts.
+ */
+static void xe_ttm_tt_account(struct ttm_tt *tt, bool add)
+{
+ struct xe_ttm_tt *xe_tt = container_of(tt, struct xe_ttm_tt, ttm);
+ long num_pages = tt->num_pages;
+
+ if (!add)
+ num_pages = -num_pages;
+
+ if (xe_tt->purgeable)
+ xe_shrinker_mod_pages(xe_tt->xe->mem.shrinker, 0, num_pages);
+ else
+ xe_shrinker_mod_pages(xe_tt->xe->mem.shrinker, num_pages, 0);
+}
+
static struct ttm_tt *xe_ttm_tt_create(struct ttm_buffer_object *ttm_bo,
u32 page_flags)
{
struct xe_bo *bo = ttm_to_xe_bo(ttm_bo);
struct xe_device *xe = xe_bo_device(bo);
- struct xe_ttm_tt *tt;
+ struct xe_ttm_tt *xe_tt;
+ struct ttm_tt *tt;
unsigned long extra_pages;
enum ttm_caching caching;
int err;
- tt = kzalloc(sizeof(*tt), GFP_KERNEL);
- if (!tt)
+ xe_tt = kzalloc(sizeof(*xe_tt), GFP_KERNEL);
+ if (!xe_tt)
return NULL;
- tt->dev = xe->drm.dev;
+ tt = &xe_tt->ttm;
+ xe_tt->xe = xe;
extra_pages = 0;
if (xe_bo_needs_ccs_pages(bo))
@@ -378,42 +405,128 @@ static struct ttm_tt *xe_ttm_tt_create(struct ttm_buffer_object *ttm_bo,
(xe->info.graphics_verx100 >= 1270 && bo->flags & XE_BO_FLAG_PAGETABLE))
caching = ttm_write_combined;
- err = ttm_tt_init(&tt->ttm, &bo->ttm, page_flags, caching, extra_pages);
+ if (ttm_bo->type != ttm_bo_type_sg)
+ page_flags |= TTM_TT_FLAG_EXTERNAL | TTM_TT_FLAG_EXTERNAL_MAPPABLE;
+
+ err = ttm_tt_init(tt, &bo->ttm, page_flags, caching, extra_pages);
if (err) {
- kfree(tt);
+ kfree(xe_tt);
return NULL;
}
- return &tt->ttm;
+ tt->backup = ttm_backup_shmem_create(tt->num_pages << PAGE_SHIFT);
+ if (IS_ERR(tt->backup)) {
+ ttm_tt_fini(tt);
+ kfree(xe_tt);
+ return NULL;
+ }
+
+ return tt;
}
static int xe_ttm_tt_populate(struct ttm_device *ttm_dev, struct ttm_tt *tt,
struct ttm_operation_ctx *ctx)
{
+ struct xe_ttm_tt *xe_tt = container_of(tt, struct xe_ttm_tt, ttm);
int err;
/*
* dma-bufs are not populated with pages, and the dma-
* addresses are set up when moved to XE_PL_TT.
*/
- if (tt->page_flags & TTM_TT_FLAG_EXTERNAL)
+ if ((tt->page_flags & TTM_TT_FLAG_EXTERNAL) &&
+ !(tt->page_flags & TTM_TT_FLAG_EXTERNAL_MAPPABLE))
return 0;
err = ttm_pool_alloc(&ttm_dev->pool, tt, ctx);
if (err)
return err;
- return err;
+ xe_tt->purgeable = false;
+ xe_ttm_tt_account(tt, true);
+
+ return 0;
}
static void xe_ttm_tt_unpopulate(struct ttm_device *ttm_dev, struct ttm_tt *tt)
{
- if (tt->page_flags & TTM_TT_FLAG_EXTERNAL)
+ if ((tt->page_flags & TTM_TT_FLAG_EXTERNAL) &&
+ !(tt->page_flags & TTM_TT_FLAG_EXTERNAL_MAPPABLE))
return;
xe_tt_unmap_sg(tt);
- return ttm_pool_free(&ttm_dev->pool, tt);
+ ttm_pool_free(&ttm_dev->pool, tt);
+ xe_ttm_tt_account(tt, false);
+}
+
+/**
+ * xe_bo_shrink() - Try to shrink an xe bo.
+ * @walk: - The walk parameters
+ * @bo: The TTM buffer object
+ * @purge: Only consider purgeable bos.
+ * @writeback: Try to write back to persistent storage.
+ *
+ * Try to shrink- or purge a bo, and if it succeeds, unmap dma.
+ * Note that we need to be able to handle also non xe bos
+ * (ghost bos), but only if the struct ttm_tt is embedded in
+ * a struct xe_ttm_tt.
+ *
+ * Return: The number of pages shrunken or purged, or negative error
+ * code on failure.
+ */
+long xe_bo_shrink(struct ttm_lru_walk *walk, struct ttm_buffer_object *bo,
+ bool purge, bool writeback)
+{
+ struct ttm_tt *tt = bo->ttm;
+ struct xe_ttm_tt *xe_tt = container_of(tt, struct xe_ttm_tt, ttm);
+ struct ttm_place place = {.mem_type = bo->resource->mem_type};
+ struct xe_bo *xe_bo = ttm_to_xe_bo(bo);
+ struct xe_device *xe = xe_tt->xe;
+ bool needs_rpm;
+ long lret = 0L;
+
+ if (!tt || !ttm_tt_is_populated(tt) ||
+ !(tt->page_flags & TTM_TT_FLAG_EXTERNAL_MAPPABLE) ||
+ (purge && !xe_tt->purgeable))
+ return 0L;
+
+ if (!ttm_bo_eviction_valuable(bo, &place))
+ return 0L;
+
+ /* Beware of zombies (GEM object refcount == 0) and ghosts. */
+ if (!xe_bo_is_xe_bo(bo) || !xe_bo_get_unless_zero(xe_bo)) {
+ struct ttm_placement null_placement = { .num_placement = 0 };
+
+ lret = ttm_bo_wait_ctx(bo, walk->ctx);
+ if (lret)
+ return lret;
+
+ /* Purge the bo content! */
+ ttm_bo_validate(bo, &null_placement, walk->ctx);
+ return tt->num_pages;
+ }
+
+ /* System CCS needs gpu copy when moving PL_TT -> PL_SYSTEM */
+ needs_rpm = (!IS_DGFX(xe) && bo->resource->mem_type != XE_PL_SYSTEM &&
+ xe_bo && xe_bo_needs_ccs_pages(xe_bo) && !xe_tt->purgeable);
+ if (needs_rpm && !xe_pm_runtime_get_if_active(xe))
+ goto out_unref;
+
+ lret = ttm_bo_try_shrink(walk, bo, xe_tt->purgeable, writeback);
+ if (needs_rpm)
+ xe_pm_runtime_put(xe);
+
+ if (lret > 0) {
+ xe_assert(xe, !ttm_tt_is_populated(tt));
+
+ xe_ttm_tt_account(tt, false);
+ }
+
+out_unref:
+ xe_bo_put(xe_bo);
+
+ return lret;
}
static void xe_ttm_tt_destroy(struct ttm_device *ttm_dev, struct ttm_tt *tt)
@@ -1229,6 +1342,7 @@ struct xe_bo *___xe_bo_create_locked(struct xe_device *xe, struct xe_bo *bo,
struct ttm_operation_ctx ctx = {
.interruptible = true,
.no_wait_gpu = false,
+ .gfp_retry_mayfail = true,
};
struct ttm_placement *placement;
uint32_t alignment;
@@ -1672,6 +1786,8 @@ int xe_bo_pin_external(struct xe_bo *bo)
}
ttm_bo_pin(&bo->ttm);
+ if (bo->ttm.ttm && ttm_tt_is_populated(bo->ttm.ttm))
+ xe_ttm_tt_account(bo->ttm.ttm, false);
/*
* FIXME: If we always use the reserve / unreserve functions for locking
@@ -1730,6 +1846,8 @@ int xe_bo_pin(struct xe_bo *bo)
}
ttm_bo_pin(&bo->ttm);
+ if (bo->ttm.ttm && ttm_tt_is_populated(bo->ttm.ttm))
+ xe_ttm_tt_account(bo->ttm.ttm, false);
/*
* FIXME: If we always use the reserve / unreserve functions for locking
@@ -1764,6 +1882,9 @@ void xe_bo_unpin_external(struct xe_bo *bo)
spin_unlock(&xe->pinned.lock);
ttm_bo_unpin(&bo->ttm);
+ if (bo->ttm.ttm && ttm_tt_is_populated(bo->ttm.ttm))
+ xe_ttm_tt_account(bo->ttm.ttm, true);
+
/*
* FIXME: If we always use the reserve / unreserve functions for locking
@@ -1792,6 +1913,8 @@ void xe_bo_unpin(struct xe_bo *bo)
}
ttm_bo_unpin(&bo->ttm);
+ if (bo->ttm.ttm && ttm_tt_is_populated(bo->ttm.ttm))
+ xe_ttm_tt_account(bo->ttm.ttm, true);
}
/**
diff --git a/drivers/gpu/drm/xe/xe_bo.h b/drivers/gpu/drm/xe/xe_bo.h
index 6de894c728f5..8463e3f3f6f1 100644
--- a/drivers/gpu/drm/xe/xe_bo.h
+++ b/drivers/gpu/drm/xe/xe_bo.h
@@ -63,6 +63,7 @@
#define XE_BO_PROPS_INVALID (-1)
struct sg_table;
+struct xe_ttm_lru_walk;
struct xe_bo *xe_bo_alloc(void);
void xe_bo_free(struct xe_bo *bo);
@@ -126,6 +127,28 @@ static inline struct xe_bo *xe_bo_get(struct xe_bo *bo)
return bo;
}
+/*
+ * xe_bo_get_unless_zero() - Conditionally obtain a GEM object refcount on an
+ * xe bo
+ * @bo: The bo for which we want to obtain a refcount.
+ *
+ * There is a short window between where the bo's GEM object refcount reaches
+ * zero and where we put the final ttm_bo reference. Code in the eviction- and
+ * shrinking path should therefore attempt to grab a gem object reference before
+ * trying to use members outside of the base class ttm object. This function is
+ * intended for that purpose. On successful return, this function must be paired
+ * with an xe_bo_put().
+ *
+ * Return: @bo on success, NULL on failure.
+ */
+static inline __must_check struct xe_bo *xe_bo_get_unless_zero(struct xe_bo *bo)
+{
+ if (!bo || !kref_get_unless_zero(&bo->ttm.base.refcount))
+ return NULL;
+
+ return bo;
+}
+
static inline void xe_bo_put(struct xe_bo *bo)
{
if (bo)
@@ -315,6 +338,9 @@ static inline unsigned int xe_sg_segment_size(struct device *dev)
#define i915_gem_object_flush_if_display(obj) ((void)(obj))
+long xe_bo_shrink(struct ttm_lru_walk *walk, struct ttm_buffer_object *bo,
+ bool purge, bool writeback);
+
#if IS_ENABLED(CONFIG_DRM_XE_KUNIT_TEST)
/**
* xe_bo_is_mem_type - Whether the bo currently resides in the given
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 94dbfe5cf19c..2c2f54c6e722 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -46,6 +46,7 @@
#include "xe_pcode.h"
#include "xe_pm.h"
#include "xe_query.h"
+#include "xe_shrinker.h"
#include "xe_sriov.h"
#include "xe_tile.h"
#include "xe_ttm_stolen_mgr.h"
@@ -239,6 +240,9 @@ static void xe_device_destroy(struct drm_device *dev, void *dummy)
if (xe->unordered_wq)
destroy_workqueue(xe->unordered_wq);
+ if (!IS_ERR_OR_NULL(xe->mem.shrinker))
+ xe_shrinker_destroy(xe->mem.shrinker);
+
ttm_device_fini(&xe->ttm);
}
@@ -268,6 +272,10 @@ struct xe_device *xe_device_create(struct pci_dev *pdev,
if (err)
goto err;
+ xe->mem.shrinker = xe_shrinker_create(xe);
+ if (IS_ERR(xe->mem.shrinker))
+ return ERR_CAST(xe->mem.shrinker);
+
xe->info.devid = pdev->device;
xe->info.revid = pdev->revision;
xe->info.force_execlist = xe_modparam.force_execlist;
diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h
index f1c09824b145..0f281008f71c 100644
--- a/drivers/gpu/drm/xe/xe_device_types.h
+++ b/drivers/gpu/drm/xe/xe_device_types.h
@@ -324,6 +324,8 @@ struct xe_device {
struct xe_mem_region vram;
/** @mem.sys_mgr: system TTM manager */
struct ttm_resource_manager sys_mgr;
+ /** @mem.sys_mgr: system memory shrinker. */
+ struct xe_shrinker *shrinker;
} mem;
/** @sriov: device level virtualization data */
diff --git a/drivers/gpu/drm/xe/xe_shrinker.c b/drivers/gpu/drm/xe/xe_shrinker.c
new file mode 100644
index 000000000000..3f9554bdc06b
--- /dev/null
+++ b/drivers/gpu/drm/xe/xe_shrinker.c
@@ -0,0 +1,287 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2024 Intel Corporation
+ */
+
+#include <linux/shrinker.h>
+#include <linux/swap.h>
+
+#include <drm/ttm/ttm_bo.h>
+#include <drm/ttm/ttm_tt.h>
+
+#include "xe_bo.h"
+#include "xe_pm.h"
+#include "xe_shrinker.h"
+
+/**
+ * struct xe_shrinker - per-device shrinker
+ * @xe: Back pointer to the device.
+ * @lock: Lock protecting accounting.
+ * @shrinkable_pages: Number of pages that are currently shrinkable.
+ * @purgeable_pages: Number of pages that are currently purgeable.
+ * @shrink: Pointer to the mm shrinker.
+ * @pm_worker: Worker to wake up the device if required.
+ */
+struct xe_shrinker {
+ struct xe_device *xe;
+ rwlock_t lock;
+ long shrinkable_pages;
+ long purgeable_pages;
+ struct shrinker *shrink;
+ struct work_struct pm_worker;
+};
+
+/**
+ * struct xe_shrink_lru_walk - lru_walk subclass for shrinker
+ * @walk: The embedded base class.
+ * @xe: Pointer to the xe device.
+ * @purge: Purgeable only request from the srinker.
+ * @writeback: Try to write back to persistent storage.
+ */
+struct xe_shrink_lru_walk {
+ struct ttm_lru_walk walk;
+ struct xe_device *xe;
+ bool purge;
+ bool writeback;
+};
+
+static struct xe_shrinker *to_xe_shrinker(struct shrinker *shrink)
+{
+ return shrink->private_data;
+}
+
+static struct xe_shrink_lru_walk *
+to_xe_shrink_lru_walk(struct ttm_lru_walk *walk)
+{
+ return container_of(walk, struct xe_shrink_lru_walk, walk);
+}
+
+/**
+ * xe_shrinker_mod_pages() - Modify shrinker page accounting
+ * @shrinker: Pointer to the struct xe_shrinker.
+ * @shrinkable: Shrinkable pages delta. May be negative.
+ * @purgeable: Purgeable page delta. May be negative.
+ *
+ * Modifies the shrinkable and purgeable pages accounting.
+ */
+void
+xe_shrinker_mod_pages(struct xe_shrinker *shrinker, long shrinkable, long purgeable)
+{
+ write_lock(&shrinker->lock);
+ shrinker->shrinkable_pages += shrinkable;
+ shrinker->purgeable_pages += purgeable;
+ write_unlock(&shrinker->lock);
+}
+
+static long xe_shrinker_process_bo(struct ttm_lru_walk *walk, struct ttm_buffer_object *bo)
+{
+ struct xe_shrink_lru_walk *shrink_walk = to_xe_shrink_lru_walk(walk);
+
+ return xe_bo_shrink(walk, bo, shrink_walk->purge, shrink_walk->writeback);
+}
+
+static long xe_shrinker_walk(struct xe_shrink_lru_walk *shrink_walk, long target)
+{
+ struct xe_device *xe = shrink_walk->xe;
+ struct ttm_resource_manager *man;
+ unsigned int mem_type;
+ long sofar = 0;
+ long lret;
+
+ for (mem_type = XE_PL_SYSTEM; mem_type <= XE_PL_TT; ++mem_type) {
+ man = ttm_manager_type(&xe->ttm, mem_type);
+ if (!man || !man->use_tt)
+ continue;
+
+ lret = ttm_lru_walk_for_evict(&shrink_walk->walk, &xe->ttm, man, target);
+ if (lret < 0)
+ return lret;
+
+ sofar += lret;
+ if (sofar >= target)
+ break;
+ }
+
+ return sofar;
+}
+
+static unsigned long
+xe_shrinker_count(struct shrinker *shrink, struct shrink_control *sc)
+{
+ struct xe_shrinker *shrinker = to_xe_shrinker(shrink);
+ unsigned long num_pages;
+
+ num_pages = get_nr_swap_pages();
+ read_lock(&shrinker->lock);
+ num_pages = min_t(unsigned long, num_pages, shrinker->shrinkable_pages);
+ num_pages += shrinker->purgeable_pages;
+ read_unlock(&shrinker->lock);
+
+ return num_pages ? num_pages : SHRINK_EMPTY;
+}
+
+static const struct ttm_lru_walk_ops xe_shrink_ops = {
+ .process_bo = xe_shrinker_process_bo,
+};
+
+/*
+ * Check if we need runtime pm, and if so try to grab a reference if
+ * already active. If grabbing a reference fails, queue a worker that
+ * does it for us outside of reclaim, but don't wait for it to complete.
+ * If bo shrinking needs an rpm reference and we don't have it (yet),
+ * that bo will be skipped anyway.
+ */
+static bool xe_shrinker_runtime_pm_get(struct xe_shrinker *shrinker, bool force,
+ unsigned long nr_to_scan)
+{
+ struct xe_device *xe = shrinker->xe;
+
+ if (IS_DGFX(xe) || !xe_device_has_flat_ccs(xe) ||
+ !get_nr_swap_pages())
+ return false;
+
+ if (!force) {
+ read_lock(&shrinker->lock);
+ force = (nr_to_scan > shrinker->purgeable_pages);
+ read_unlock(&shrinker->lock);
+ if (!force)
+ return false;
+ }
+
+ if (!xe_pm_runtime_get_if_active(xe)) {
+ queue_work(xe->unordered_wq, &shrinker->pm_worker);
+ return false;
+ }
+
+ return true;
+}
+
+static void xe_shrinker_runtime_pm_put(struct xe_shrinker *shrinker, bool runtime_pm)
+{
+ if (runtime_pm)
+ xe_pm_runtime_put(shrinker->xe);
+}
+
+static unsigned long xe_shrinker_scan(struct shrinker *shrink, struct shrink_control *sc)
+{
+ struct xe_shrinker *shrinker = to_xe_shrinker(shrink);
+ bool is_kswapd = current_is_kswapd();
+ struct ttm_operation_ctx ctx = {
+ .interruptible = false,
+ .no_wait_gpu = !is_kswapd,
+ };
+ unsigned long nr_to_scan, freed = 0;
+ struct xe_shrink_lru_walk shrink_walk = {
+ .walk = {
+ .ops = &xe_shrink_ops,
+ .ctx = &ctx,
+ .trylock_only = true,
+ },
+ .xe = shrinker->xe,
+ .purge = true,
+ .writeback = is_kswapd,
+ };
+ bool runtime_pm;
+ bool purgeable;
+ long ret;
+
+ sc->nr_scanned = 0;
+ nr_to_scan = sc->nr_to_scan;
+
+ read_lock(&shrinker->lock);
+ purgeable = !!shrinker->purgeable_pages;
+ read_unlock(&shrinker->lock);
+
+ /* Might need runtime PM. Try to wake early if it looks like it. */
+ runtime_pm = xe_shrinker_runtime_pm_get(shrinker, false, nr_to_scan);
+
+ while (purgeable && freed < nr_to_scan) {
+ ret = xe_shrinker_walk(&shrink_walk, nr_to_scan);
+ if (ret <= 0)
+ break;
+
+ freed += ret;
+ }
+
+ sc->nr_scanned = freed;
+ if (freed < nr_to_scan)
+ nr_to_scan -= freed;
+ else
+ nr_to_scan = 0;
+ if (!nr_to_scan)
+ goto out;
+
+ /* If we didn't wake before, try to do it now if needed. */
+ if (!runtime_pm)
+ runtime_pm = xe_shrinker_runtime_pm_get(shrinker, true, 0);
+
+ shrink_walk.purge = false;
+ nr_to_scan = sc->nr_to_scan;
+ while (freed < nr_to_scan) {
+ ret = xe_shrinker_walk(&shrink_walk, nr_to_scan);
+ if (ret <= 0)
+ break;
+
+ freed += ret;
+ }
+
+ sc->nr_scanned = freed;
+
+out:
+ xe_shrinker_runtime_pm_put(shrinker, runtime_pm);
+ return freed ? freed : SHRINK_STOP;
+}
+
+/* Wake up the device for shrinking. */
+static void xe_shrinker_pm(struct work_struct *work)
+{
+ struct xe_shrinker *shrinker =
+ container_of(work, typeof(*shrinker), pm_worker);
+
+ xe_pm_runtime_get(shrinker->xe);
+ xe_pm_runtime_put(shrinker->xe);
+}
+
+/**
+ * xe_shrinker_create() - Create an xe per-device shrinker
+ * @xe: Pointer to the xe device.
+ *
+ * Returns: A pointer to the created shrinker on success,
+ * Negative error code on failure.
+ */
+struct xe_shrinker *xe_shrinker_create(struct xe_device *xe)
+{
+ struct xe_shrinker *shrinker = kzalloc(sizeof(*shrinker), GFP_KERNEL);
+
+ if (!shrinker)
+ return ERR_PTR(-ENOMEM);
+
+ shrinker->shrink = shrinker_alloc(0, "xe system shrinker");
+ if (!shrinker->shrink) {
+ kfree(shrinker);
+ return ERR_PTR(-ENOMEM);
+ }
+
+ INIT_WORK(&shrinker->pm_worker, xe_shrinker_pm);
+ shrinker->xe = xe;
+ rwlock_init(&shrinker->lock);
+ shrinker->shrink->count_objects = xe_shrinker_count;
+ shrinker->shrink->scan_objects = xe_shrinker_scan;
+ shrinker->shrink->private_data = shrinker;
+ shrinker_register(shrinker->shrink);
+
+ return shrinker;
+}
+
+/**
+ * xe_shrinker_destroy() - Destroy an xe per-device shrinker
+ * @shrinker: Pointer to the shrinker to destroy.
+ */
+void xe_shrinker_destroy(struct xe_shrinker *shrinker)
+{
+ xe_assert(shrinker->xe, !shrinker->shrinkable_pages);
+ xe_assert(shrinker->xe, !shrinker->purgeable_pages);
+ shrinker_free(shrinker->shrink);
+ flush_work(&shrinker->pm_worker);
+ kfree(shrinker);
+}
diff --git a/drivers/gpu/drm/xe/xe_shrinker.h b/drivers/gpu/drm/xe/xe_shrinker.h
new file mode 100644
index 000000000000..28a038f4fcbf
--- /dev/null
+++ b/drivers/gpu/drm/xe/xe_shrinker.h
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2024 Intel Corporation
+ */
+
+#ifndef _XE_SHRINKER_H_
+#define _XE_SHRINKER_H_
+
+struct xe_shrinker;
+struct xe_device;
+
+void xe_shrinker_mod_pages(struct xe_shrinker *shrinker, long shrinkable, long purgeable);
+
+struct xe_shrinker *xe_shrinker_create(struct xe_device *xe);
+
+void xe_shrinker_destroy(struct xe_shrinker *shrinker);
+
+#endif
diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h
index 148f49f625e4..deaedfb060ed 100644
--- a/include/drm/ttm/ttm_bo.h
+++ b/include/drm/ttm/ttm_bo.h
@@ -222,6 +222,9 @@ struct ttm_lru_walk {
long ttm_lru_walk_for_evict(struct ttm_lru_walk *walk, struct ttm_device *bdev,
struct ttm_resource_manager *man, long target);
+long ttm_bo_try_shrink(struct ttm_lru_walk *walk, struct ttm_buffer_object *bo,
+ bool purge, bool writeback);
+
/**
* ttm_bo_get - reference a struct ttm_buffer_object
*
--
2.44.0
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH v5 12/12] drm/xe: Increase the XE_PL_TT watermark
2024-06-18 7:18 [PATCH v5 00/12] TTM shrinker helpers and xe buffer object shrinker Thomas Hellström
` (10 preceding siblings ...)
2024-06-18 7:18 ` [PATCH v5 11/12] drm/ttm, drm/xe: Add a shrinker for xe bos Thomas Hellström
@ 2024-06-18 7:18 ` Thomas Hellström
2024-06-18 7:24 ` ✓ CI.Patch_applied: success for TTM shrinker helpers and xe buffer object shrinker (rev5) Patchwork
` (7 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Thomas Hellström @ 2024-06-18 7:18 UTC (permalink / raw)
To: intel-xe
Cc: Thomas Hellström, Matthew Brost, Somalapuram Amaranath,
Christian König, dri-devel
The XE_PL_TT watermark was set to 50% of system memory.
The idea behind that was unclear since the net effect is that
TT memory will be evicted to TTM_PL_SYSTEM memory if that
watermark is exceeded, requiring PPGTT rebinds and dma
remapping. But there is no similar watermark for TTM_PL_SYSTEM
memory.
The TTM functionality that tries to swap out system memory to
shmem objects if a 50% limit of total system memory is reached
is orthogonal to this, and with the shrinker added, it's no
longer in effect.
Replace the 50% TTM_PL_TT limit with a 100% limit, in effect
allowing all graphics memory to be bound to the device unless it
has been swapped out by the shrinker.
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
---
drivers/gpu/drm/xe/xe_ttm_sys_mgr.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_ttm_sys_mgr.c b/drivers/gpu/drm/xe/xe_ttm_sys_mgr.c
index 9844a8edbfe1..d38b91872da3 100644
--- a/drivers/gpu/drm/xe/xe_ttm_sys_mgr.c
+++ b/drivers/gpu/drm/xe/xe_ttm_sys_mgr.c
@@ -108,9 +108,8 @@ int xe_ttm_sys_mgr_init(struct xe_device *xe)
u64 gtt_size;
si_meminfo(&si);
+ /* Potentially restrict amount of TT memory here. */
gtt_size = (u64)si.totalram * si.mem_unit;
- /* TTM limits allocation of all TTM devices by 50% of system memory */
- gtt_size /= 2;
man->use_tt = true;
man->func = &xe_ttm_sys_mgr_func;
--
2.44.0
^ permalink raw reply related [flat|nested] 36+ messages in thread
* ✓ CI.Patch_applied: success for TTM shrinker helpers and xe buffer object shrinker (rev5)
2024-06-18 7:18 [PATCH v5 00/12] TTM shrinker helpers and xe buffer object shrinker Thomas Hellström
` (11 preceding siblings ...)
2024-06-18 7:18 ` [PATCH v5 12/12] drm/xe: Increase the XE_PL_TT watermark Thomas Hellström
@ 2024-06-18 7:24 ` Patchwork
2024-06-18 7:24 ` ✗ CI.checkpatch: warning " Patchwork
` (6 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Patchwork @ 2024-06-18 7:24 UTC (permalink / raw)
To: Thomas Hellström; +Cc: intel-xe
== Series Details ==
Series: TTM shrinker helpers and xe buffer object shrinker (rev5)
URL : https://patchwork.freedesktop.org/series/131815/
State : success
== Summary ==
=== Applying kernel patches on branch 'drm-tip' with base: ===
Base commit: 7f26b37f8cb7 drm-tip: 2024y-06m-17d-20h-47m-12s UTC integration manifest
=== git am output follows ===
Applying: drm/ttm: Allow TTM LRU list nodes of different types
Applying: drm/ttm: Slightly clean up LRU list iteration
Applying: drm/ttm: Use LRU hitches
Applying: drm/ttm, drm/amdgpu, drm/xe: Consider hitch moves within bulk sublist moves
Applying: drm/ttm: Provide a generic LRU walker helper
Applying: drm/ttm: Use the LRU walker helper for swapping
Applying: drm/ttm: Use the LRU walker for eviction
Applying: drm/ttm: Add a virtual base class for graphics memory backup
Applying: drm/ttm/pool: Provide a helper to shrink pages
Applying: drm/ttm: Use fault-injection to test error paths
Applying: drm/ttm, drm/xe: Add a shrinker for xe bos
Applying: drm/xe: Increase the XE_PL_TT watermark
^ permalink raw reply [flat|nested] 36+ messages in thread
* ✗ CI.checkpatch: warning for TTM shrinker helpers and xe buffer object shrinker (rev5)
2024-06-18 7:18 [PATCH v5 00/12] TTM shrinker helpers and xe buffer object shrinker Thomas Hellström
` (12 preceding siblings ...)
2024-06-18 7:24 ` ✓ CI.Patch_applied: success for TTM shrinker helpers and xe buffer object shrinker (rev5) Patchwork
@ 2024-06-18 7:24 ` Patchwork
2024-06-18 7:25 ` ✓ CI.KUnit: success " Patchwork
` (5 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Patchwork @ 2024-06-18 7:24 UTC (permalink / raw)
To: Thomas Hellström; +Cc: intel-xe
== Series Details ==
Series: TTM shrinker helpers and xe buffer object shrinker (rev5)
URL : https://patchwork.freedesktop.org/series/131815/
State : warning
== Summary ==
+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
51ce9f6cd981d42d7467409d7dbc559a450abc1e
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 7cfc6e4e1251e3368a3dc0eca71f304225442e1f
Author: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Date: Tue Jun 18 09:18:20 2024 +0200
drm/xe: Increase the XE_PL_TT watermark
The XE_PL_TT watermark was set to 50% of system memory.
The idea behind that was unclear since the net effect is that
TT memory will be evicted to TTM_PL_SYSTEM memory if that
watermark is exceeded, requiring PPGTT rebinds and dma
remapping. But there is no similar watermark for TTM_PL_SYSTEM
memory.
The TTM functionality that tries to swap out system memory to
shmem objects if a 50% limit of total system memory is reached
is orthogonal to this, and with the shrinker added, it's no
longer in effect.
Replace the 50% TTM_PL_TT limit with a 100% limit, in effect
allowing all graphics memory to be bound to the device unless it
has been swapped out by the shrinker.
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
+ /mt/dim checkpatch 7f26b37f8cb73f5cf2251d7fff5b55240e04f153 drm-intel
49ecc66313ea drm/ttm: Allow TTM LRU list nodes of different types
e7166a74cbd6 drm/ttm: Slightly clean up LRU list iteration
89b63b65fb7c drm/ttm: Use LRU hitches
bee0fabb68a6 drm/ttm, drm/amdgpu, drm/xe: Consider hitch moves within bulk sublist moves
fcce5b8760ca drm/ttm: Provide a generic LRU walker helper
2167a789e491 drm/ttm: Use the LRU walker helper for swapping
2267642a0b6f drm/ttm: Use the LRU walker for eviction
9308c9bcc8f2 drm/ttm: Add a virtual base class for graphics memory backup
Traceback (most recent call last):
File "scripts/spdxcheck.py", line 6, in <module>
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
Traceback (most recent call last):
File "scripts/spdxcheck.py", line 6, in <module>
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
-:45: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#45:
new file mode 100644
total: 0 errors, 1 warnings, 0 checks, 283 lines checked
18dc0654d2df drm/ttm/pool: Provide a helper to shrink pages
278906161ced drm/ttm: Use fault-injection to test error paths
-:28: WARNING:CONFIG_DESCRIPTION: please write a help paragraph that fully describes the config symbol
#28: FILE: drivers/gpu/drm/Kconfig:275:
+config DRM_TTM_BACKUP_FAULT_INJECT
+ bool "Enable fault injection during TTM backup"
+ depends on DRM_TTM
+ default n
+ help
+ Inject recoverable failures during TTM backup and recovery of
+ backed-up objects. For DRM driver developers only.
+
+ If in doubt, choose N.
+
total: 0 errors, 1 warnings, 0 checks, 51 lines checked
c0403ba51303 drm/ttm, drm/xe: Add a shrinker for xe bos
Traceback (most recent call last):
File "scripts/spdxcheck.py", line 6, in <module>
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
Traceback (most recent call last):
File "scripts/spdxcheck.py", line 6, in <module>
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
-:168: CHECK:SPACING: No space is necessary after a cast
#168: FILE: drivers/gpu/drm/xe/tests/xe_bo.c:382:
+ (unsigned long) total);
-:677: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#677:
new file mode 100644
total: 0 errors, 1 warnings, 1 checks, 891 lines checked
7cfc6e4e1251 drm/xe: Increase the XE_PL_TT watermark
^ permalink raw reply [flat|nested] 36+ messages in thread
* ✓ CI.KUnit: success for TTM shrinker helpers and xe buffer object shrinker (rev5)
2024-06-18 7:18 [PATCH v5 00/12] TTM shrinker helpers and xe buffer object shrinker Thomas Hellström
` (13 preceding siblings ...)
2024-06-18 7:24 ` ✗ CI.checkpatch: warning " Patchwork
@ 2024-06-18 7:25 ` Patchwork
2024-06-18 7:37 ` ✓ CI.Build: " Patchwork
` (4 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Patchwork @ 2024-06-18 7:25 UTC (permalink / raw)
To: Thomas Hellström; +Cc: intel-xe
== Series Details ==
Series: TTM shrinker helpers and xe buffer object shrinker (rev5)
URL : https://patchwork.freedesktop.org/series/131815/
State : success
== Summary ==
+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig
[07:24:49] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[07:24:54] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=48
../lib/iomap.c:156:5: warning: no previous prototype for ‘ioread64_lo_hi’ [-Wmissing-prototypes]
156 | u64 ioread64_lo_hi(const void __iomem *addr)
| ^~~~~~~~~~~~~~
../lib/iomap.c:163:5: warning: no previous prototype for ‘ioread64_hi_lo’ [-Wmissing-prototypes]
163 | u64 ioread64_hi_lo(const void __iomem *addr)
| ^~~~~~~~~~~~~~
../lib/iomap.c:170:5: warning: no previous prototype for ‘ioread64be_lo_hi’ [-Wmissing-prototypes]
170 | u64 ioread64be_lo_hi(const void __iomem *addr)
| ^~~~~~~~~~~~~~~~
../lib/iomap.c:178:5: warning: no previous prototype for ‘ioread64be_hi_lo’ [-Wmissing-prototypes]
178 | u64 ioread64be_hi_lo(const void __iomem *addr)
| ^~~~~~~~~~~~~~~~
../lib/iomap.c:264:6: warning: no previous prototype for ‘iowrite64_lo_hi’ [-Wmissing-prototypes]
264 | void iowrite64_lo_hi(u64 val, void __iomem *addr)
| ^~~~~~~~~~~~~~~
../lib/iomap.c:272:6: warning: no previous prototype for ‘iowrite64_hi_lo’ [-Wmissing-prototypes]
272 | void iowrite64_hi_lo(u64 val, void __iomem *addr)
| ^~~~~~~~~~~~~~~
../lib/iomap.c:280:6: warning: no previous prototype for ‘iowrite64be_lo_hi’ [-Wmissing-prototypes]
280 | void iowrite64be_lo_hi(u64 val, void __iomem *addr)
| ^~~~~~~~~~~~~~~~~
../lib/iomap.c:288:6: warning: no previous prototype for ‘iowrite64be_hi_lo’ [-Wmissing-prototypes]
288 | void iowrite64be_hi_lo(u64 val, void __iomem *addr)
| ^~~~~~~~~~~~~~~~~
[07:25:19] Starting KUnit Kernel (1/1)...
[07:25:19] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[07:25:19] =================== guc_dbm (7 subtests) ===================
[07:25:19] [PASSED] test_empty
[07:25:19] [PASSED] test_default
[07:25:19] ======================== test_size ========================
[07:25:19] [PASSED] 4
[07:25:19] [PASSED] 8
[07:25:19] [PASSED] 32
[07:25:19] [PASSED] 256
[07:25:19] ==================== [PASSED] test_size ====================
[07:25:19] ======================= test_reuse ========================
[07:25:19] [PASSED] 4
[07:25:19] [PASSED] 8
[07:25:19] [PASSED] 32
[07:25:19] [PASSED] 256
[07:25:19] =================== [PASSED] test_reuse ====================
[07:25:19] =================== test_range_overlap ====================
[07:25:19] [PASSED] 4
[07:25:19] [PASSED] 8
[07:25:19] [PASSED] 32
[07:25:19] [PASSED] 256
[07:25:19] =============== [PASSED] test_range_overlap ================
[07:25:19] =================== test_range_compact ====================
[07:25:19] [PASSED] 4
[07:25:19] [PASSED] 8
[07:25:19] [PASSED] 32
[07:25:19] [PASSED] 256
[07:25:19] =============== [PASSED] test_range_compact ================
[07:25:19] ==================== test_range_spare =====================
[07:25:19] [PASSED] 4
[07:25:19] [PASSED] 8
[07:25:19] [PASSED] 32
[07:25:19] [PASSED] 256
[07:25:19] ================ [PASSED] test_range_spare =================
[07:25:19] ===================== [PASSED] guc_dbm =====================
[07:25:19] =================== guc_idm (6 subtests) ===================
[07:25:19] [PASSED] bad_init
[07:25:19] [PASSED] no_init
[07:25:19] [PASSED] init_fini
[07:25:19] [PASSED] check_used
[07:25:19] [PASSED] check_quota
[07:25:19] [PASSED] check_all
[07:25:19] ===================== [PASSED] guc_idm =====================
[07:25:19] ================== no_relay (3 subtests) ===================
[07:25:19] [PASSED] xe_drops_guc2pf_if_not_ready
[07:25:19] [PASSED] xe_drops_guc2vf_if_not_ready
[07:25:19] [PASSED] xe_rejects_send_if_not_ready
[07:25:19] ==================== [PASSED] no_relay =====================
[07:25:19] ================== pf_relay (14 subtests) ==================
[07:25:19] [PASSED] pf_rejects_guc2pf_too_short
[07:25:19] [PASSED] pf_rejects_guc2pf_too_long
[07:25:19] [PASSED] pf_rejects_guc2pf_no_payload
[07:25:19] [PASSED] pf_fails_no_payload
[07:25:19] [PASSED] pf_fails_bad_origin
[07:25:19] [PASSED] pf_fails_bad_type
[07:25:19] [PASSED] pf_txn_reports_error
[07:25:19] [PASSED] pf_txn_sends_pf2guc
[07:25:19] [PASSED] pf_sends_pf2guc
[07:25:19] [SKIPPED] pf_loopback_nop
[07:25:19] [SKIPPED] pf_loopback_echo
[07:25:19] [SKIPPED] pf_loopback_fail
[07:25:19] [SKIPPED] pf_loopback_busy
[07:25:19] [SKIPPED] pf_loopback_retry
[07:25:19] ==================== [PASSED] pf_relay =====================
[07:25:19] ================== vf_relay (3 subtests) ===================
[07:25:19] [PASSED] vf_rejects_guc2vf_too_short
[07:25:19] [PASSED] vf_rejects_guc2vf_too_long
[07:25:19] [PASSED] vf_rejects_guc2vf_no_payload
[07:25:19] ==================== [PASSED] vf_relay =====================
[07:25:19] ================= pf_service (11 subtests) =================
[07:25:19] [PASSED] pf_negotiate_any
[07:25:19] [PASSED] pf_negotiate_base_match
[07:25:19] [PASSED] pf_negotiate_base_newer
[07:25:19] [PASSED] pf_negotiate_base_next
[07:25:19] [SKIPPED] pf_negotiate_base_older
[07:25:19] [PASSED] pf_negotiate_base_prev
[07:25:19] [PASSED] pf_negotiate_latest_match
[07:25:19] [PASSED] pf_negotiate_latest_newer
[07:25:19] [PASSED] pf_negotiate_latest_next
[07:25:19] [SKIPPED] pf_negotiate_latest_older
[07:25:19] [SKIPPED] pf_negotiate_latest_prev
[07:25:19] =================== [PASSED] pf_service ====================
[07:25:19] ===================== lmtt (1 subtest) =====================
[07:25:19] ======================== test_ops =========================
[07:25:19] [PASSED] 2-level
[07:25:19] [PASSED] multi-level
[07:25:19] ==================== [PASSED] test_ops =====================
[07:25:19] ====================== [PASSED] lmtt =======================
[07:25:19] ==================== xe_bo (3 subtests) ====================
[07:25:19] [SKIPPED] xe_ccs_migrate_kunit
[07:25:19] [SKIPPED] xe_bo_evict_kunit
[07:25:19] [SKIPPED] xe_bo_shrink_kunit
[07:25:19] ===================== [SKIPPED] xe_bo ======================
[07:25:19] ================== xe_dma_buf (1 subtest) ==================
[07:25:19] [SKIPPED] xe_dma_buf_kunit
[07:25:19] =================== [SKIPPED] xe_dma_buf ===================
[07:25:19] ================== xe_migrate (1 subtest) ==================
[07:25:19] [SKIPPED] xe_migrate_sanity_kunit
[07:25:19] =================== [SKIPPED] xe_migrate ===================
[07:25:19] =================== xe_mocs (2 subtests) ===================
[07:25:19] [SKIPPED] xe_live_mocs_kernel_kunit
[07:25:19] [SKIPPED] xe_live_mocs_reset_kunit
[07:25:19] ==================== [SKIPPED] xe_mocs =====================
[07:25:19] ==================== args (11 subtests) ====================
[07:25:19] [PASSED] count_args_test
[07:25:19] [PASSED] call_args_example
[07:25:19] [PASSED] call_args_test
[07:25:19] [PASSED] drop_first_arg_example
[07:25:19] [PASSED] drop_first_arg_test
[07:25:19] [PASSED] first_arg_example
[07:25:19] [PASSED] first_arg_test
[07:25:19] [PASSED] last_arg_example
[07:25:19] [PASSED] last_arg_test
[07:25:19] [PASSED] pick_arg_example
[07:25:19] [PASSED] sep_comma_example
[07:25:19] ====================== [PASSED] args =======================
[07:25:19] =================== xe_pci (2 subtests) ====================
[07:25:19] [PASSED] xe_gmdid_graphics_ip
[07:25:19] [PASSED] xe_gmdid_media_ip
[07:25:19] ===================== [PASSED] xe_pci ======================
[07:25:19] ==================== xe_rtp (1 subtest) ====================
[07:25:19] ================== xe_rtp_process_tests ===================
[07:25:19] [PASSED] coalesce-same-reg
[07:25:19] [PASSED] no-match-no-add
[07:25:19] [PASSED] no-match-no-add-multiple-rules
[07:25:19] [PASSED] two-regs-two-entries
[07:25:19] [PASSED] clr-one-set-other
[07:25:19] [PASSED] set-field
[07:25:19] [PASSED] conflict-duplicate
[07:25:19] [PASSED] conflict-not-disjoint
[07:25:19] [PASSED] conflict-reg-type
[07:25:19] ============== [PASSED] xe_rtp_process_tests ===============
stty: 'standard input': Inappropriate ioctl for device
[07:25:19] ===================== [PASSED] xe_rtp ======================
[07:25:19] ==================== xe_wa (1 subtest) =====================
[07:25:19] ======================== xe_wa_gt =========================
[07:25:19] [PASSED] TIGERLAKE (B0)
[07:25:19] [PASSED] DG1 (A0)
[07:25:19] [PASSED] DG1 (B0)
[07:25:19] [PASSED] ALDERLAKE_S (A0)
[07:25:19] [PASSED] ALDERLAKE_S (B0)
[07:25:19] [PASSED] ALDERLAKE_S (C0)
[07:25:19] [PASSED] ALDERLAKE_S (D0)
[07:25:19] [PASSED] ALDERLAKE_P (A0)
[07:25:19] [PASSED] ALDERLAKE_P (B0)
[07:25:19] [PASSED] ALDERLAKE_P (C0)
[07:25:19] [PASSED] ALDERLAKE_S_RPLS (D0)
[07:25:19] [PASSED] ALDERLAKE_P_RPLU (E0)
[07:25:19] [PASSED] DG2_G10 (C0)
[07:25:19] [PASSED] DG2_G11 (B1)
[07:25:19] [PASSED] DG2_G12 (A1)
[07:25:19] [PASSED] METEORLAKE (g:A0, m:A0)
[07:25:19] [PASSED] METEORLAKE (g:A0, m:A0)
[07:25:19] [PASSED] METEORLAKE (g:A0, m:A0)
[07:25:19] [PASSED] LUNARLAKE (g:A0, m:A0)
[07:25:19] [PASSED] LUNARLAKE (g:B0, m:A0)
[07:25:19] ==================== [PASSED] xe_wa_gt =====================
[07:25:19] ====================== [PASSED] xe_wa ======================
[07:25:19] ============================================================
[07:25:19] Testing complete. Ran 110 tests: passed: 95, skipped: 15
[07:25:19] Elapsed time: 29.769s total, 4.260s configuring, 25.290s building, 0.206s running
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig
[07:25:19] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[07:25:21] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=48
../lib/iomap.c:156:5: warning: no previous prototype for ‘ioread64_lo_hi’ [-Wmissing-prototypes]
156 | u64 ioread64_lo_hi(const void __iomem *addr)
| ^~~~~~~~~~~~~~
../lib/iomap.c:163:5: warning: no previous prototype for ‘ioread64_hi_lo’ [-Wmissing-prototypes]
163 | u64 ioread64_hi_lo(const void __iomem *addr)
| ^~~~~~~~~~~~~~
../lib/iomap.c:170:5: warning: no previous prototype for ‘ioread64be_lo_hi’ [-Wmissing-prototypes]
170 | u64 ioread64be_lo_hi(const void __iomem *addr)
| ^~~~~~~~~~~~~~~~
../lib/iomap.c:178:5: warning: no previous prototype for ‘ioread64be_hi_lo’ [-Wmissing-prototypes]
178 | u64 ioread64be_hi_lo(const void __iomem *addr)
| ^~~~~~~~~~~~~~~~
../lib/iomap.c:264:6: warning: no previous prototype for ‘iowrite64_lo_hi’ [-Wmissing-prototypes]
264 | void iowrite64_lo_hi(u64 val, void __iomem *addr)
| ^~~~~~~~~~~~~~~
../lib/iomap.c:272:6: warning: no previous prototype for ‘iowrite64_hi_lo’ [-Wmissing-prototypes]
272 | void iowrite64_hi_lo(u64 val, void __iomem *addr)
| ^~~~~~~~~~~~~~~
../lib/iomap.c:280:6: warning: no previous prototype for ‘iowrite64be_lo_hi’ [-Wmissing-prototypes]
280 | void iowrite64be_lo_hi(u64 val, void __iomem *addr)
| ^~~~~~~~~~~~~~~~~
../lib/iomap.c:288:6: warning: no previous prototype for ‘iowrite64be_hi_lo’ [-Wmissing-prototypes]
288 | void iowrite64be_hi_lo(u64 val, void __iomem *addr)
| ^~~~~~~~~~~~~~~~~
[07:25:43] Starting KUnit Kernel (1/1)...
[07:25:43] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[07:25:43] ============ drm_test_pick_cmdline (2 subtests) ============
[07:25:43] [PASSED] drm_test_pick_cmdline_res_1920_1080_60
[07:25:43] =============== drm_test_pick_cmdline_named ===============
[07:25:43] [PASSED] NTSC
[07:25:43] [PASSED] NTSC-J
[07:25:43] [PASSED] PAL
[07:25:43] [PASSED] PAL-M
[07:25:43] =========== [PASSED] drm_test_pick_cmdline_named ===========
[07:25:43] ============== [PASSED] drm_test_pick_cmdline ==============
[07:25:43] ================== drm_buddy (7 subtests) ==================
[07:25:43] [PASSED] drm_test_buddy_alloc_limit
[07:25:43] [PASSED] drm_test_buddy_alloc_optimistic
[07:25:43] [PASSED] drm_test_buddy_alloc_pessimistic
[07:25:43] [PASSED] drm_test_buddy_alloc_pathological
[07:25:43] [PASSED] drm_test_buddy_alloc_contiguous
[07:25:43] [PASSED] drm_test_buddy_alloc_clear
[07:25:43] [PASSED] drm_test_buddy_alloc_range_bias
[07:25:43] ==================== [PASSED] drm_buddy ====================
[07:25:43] ============= drm_cmdline_parser (40 subtests) =============
[07:25:43] [PASSED] drm_test_cmdline_force_d_only
[07:25:43] [PASSED] drm_test_cmdline_force_D_only_dvi
[07:25:43] [PASSED] drm_test_cmdline_force_D_only_hdmi
[07:25:43] [PASSED] drm_test_cmdline_force_D_only_not_digital
[07:25:43] [PASSED] drm_test_cmdline_force_e_only
[07:25:43] [PASSED] drm_test_cmdline_res
[07:25:43] [PASSED] drm_test_cmdline_res_vesa
[07:25:43] [PASSED] drm_test_cmdline_res_vesa_rblank
[07:25:43] [PASSED] drm_test_cmdline_res_rblank
[07:25:43] [PASSED] drm_test_cmdline_res_bpp
[07:25:43] [PASSED] drm_test_cmdline_res_refresh
[07:25:43] [PASSED] drm_test_cmdline_res_bpp_refresh
[07:25:43] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced
[07:25:43] [PASSED] drm_test_cmdline_res_bpp_refresh_margins
[07:25:43] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off
[07:25:43] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on
[07:25:43] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog
[07:25:43] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital
[07:25:43] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on
[07:25:43] [PASSED] drm_test_cmdline_res_margins_force_on
[07:25:43] [PASSED] drm_test_cmdline_res_vesa_margins
[07:25:43] [PASSED] drm_test_cmdline_name
[07:25:43] [PASSED] drm_test_cmdline_name_bpp
[07:25:43] [PASSED] drm_test_cmdline_name_option
[07:25:43] [PASSED] drm_test_cmdline_name_bpp_option
[07:25:43] [PASSED] drm_test_cmdline_rotate_0
[07:25:43] [PASSED] drm_test_cmdline_rotate_90
[07:25:43] [PASSED] drm_test_cmdline_rotate_180
[07:25:43] [PASSED] drm_test_cmdline_rotate_270
[07:25:43] [PASSED] drm_test_cmdline_hmirror
[07:25:43] [PASSED] drm_test_cmdline_vmirror
[07:25:43] [PASSED] drm_test_cmdline_margin_options
[07:25:43] [PASSED] drm_test_cmdline_multiple_options
[07:25:43] [PASSED] drm_test_cmdline_bpp_extra_and_option
[07:25:43] [PASSED] drm_test_cmdline_extra_and_option
[07:25:43] [PASSED] drm_test_cmdline_freestanding_options
[07:25:43] [PASSED] drm_test_cmdline_freestanding_force_e_and_options
[07:25:43] [PASSED] drm_test_cmdline_panel_orientation
[07:25:43] ================ drm_test_cmdline_invalid =================
[07:25:43] [PASSED] margin_only
[07:25:43] [PASSED] interlace_only
[07:25:43] [PASSED] res_missing_x
[07:25:43] [PASSED] res_missing_y
[07:25:43] [PASSED] res_bad_y
[07:25:43] [PASSED] res_missing_y_bpp
[07:25:43] [PASSED] res_bad_bpp
[07:25:43] [PASSED] res_bad_refresh
[07:25:43] [PASSED] res_bpp_refresh_force_on_off
[07:25:43] [PASSED] res_invalid_mode
[07:25:43] [PASSED] res_bpp_wrong_place_mode
[07:25:43] [PASSED] name_bpp_refresh
[07:25:43] [PASSED] name_refresh
[07:25:43] [PASSED] name_refresh_wrong_mode
[07:25:43] [PASSED] name_refresh_invalid_mode
[07:25:43] [PASSED] rotate_multiple
[07:25:43] [PASSED] rotate_invalid_val
[07:25:43] [PASSED] rotate_truncated
[07:25:43] [PASSED] invalid_option
[07:25:43] [PASSED] invalid_tv_option
[07:25:43] [PASSED] truncated_tv_option
[07:25:43] ============ [PASSED] drm_test_cmdline_invalid =============
[07:25:43] =============== drm_test_cmdline_tv_options ===============
[07:25:43] [PASSED] NTSC
[07:25:43] [PASSED] NTSC_443
[07:25:43] [PASSED] NTSC_J
[07:25:43] [PASSED] PAL
[07:25:43] [PASSED] PAL_M
[07:25:43] [PASSED] PAL_N
[07:25:43] [PASSED] SECAM
[07:25:43] =========== [PASSED] drm_test_cmdline_tv_options ===========
[07:25:43] =============== [PASSED] drm_cmdline_parser ================
[07:25:43] ========== drmm_connector_hdmi_init (19 subtests) ==========
[07:25:43] [PASSED] drm_test_connector_hdmi_init_valid
[07:25:43] [PASSED] drm_test_connector_hdmi_init_bpc_8
[07:25:43] [PASSED] drm_test_connector_hdmi_init_bpc_10
[07:25:43] [PASSED] drm_test_connector_hdmi_init_bpc_12
[07:25:43] [PASSED] drm_test_connector_hdmi_init_bpc_invalid
[07:25:43] [PASSED] drm_test_connector_hdmi_init_bpc_null
[07:25:43] [PASSED] drm_test_connector_hdmi_init_formats_empty
[07:25:43] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb
[07:25:43] [PASSED] drm_test_connector_hdmi_init_null_ddc
[07:25:43] [PASSED] drm_test_connector_hdmi_init_null_product
[07:25:43] [PASSED] drm_test_connector_hdmi_init_null_vendor
[07:25:43] [PASSED] drm_test_connector_hdmi_init_product_length_exact
[07:25:43] [PASSED] drm_test_connector_hdmi_init_product_length_too_long
[07:25:43] [PASSED] drm_test_connector_hdmi_init_product_valid
[07:25:43] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact
[07:25:43] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long
[07:25:43] [PASSED] drm_test_connector_hdmi_init_vendor_valid
[07:25:43] ========= drm_test_connector_hdmi_init_type_valid =========
[07:25:43] [PASSED] HDMI-A
[07:25:43] [PASSED] HDMI-B
[07:25:43] ===== [PASSED] drm_test_connector_hdmi_init_type_valid =====
[07:25:43] ======== drm_test_connector_hdmi_init_type_invalid ========
[07:25:43] [PASSED] Unknown
[07:25:43] [PASSED] VGA
[07:25:43] [PASSED] DVI-I
[07:25:43] [PASSED] DVI-D
[07:25:43] [PASSED] DVI-A
[07:25:43] [PASSED] Composite
[07:25:43] [PASSED] SVIDEO
[07:25:43] [PASSED] LVDS
[07:25:43] [PASSED] Component
[07:25:43] [PASSED] DIN
[07:25:43] [PASSED] DP
[07:25:43] [PASSED] TV
[07:25:43] [PASSED] eDP
[07:25:43] [PASSED] Virtual
[07:25:43] [PASSED] DSI
[07:25:43] [PASSED] DPI
[07:25:43] [PASSED] Writeback
[07:25:43] [PASSED] SPI
[07:25:43] [PASSED] USB
[07:25:43] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ====
[07:25:43] ============ [PASSED] drmm_connector_hdmi_init =============
[07:25:43] ============= drmm_connector_init (3 subtests) =============
[07:25:43] [PASSED] drm_test_drmm_connector_init
[07:25:43] [PASSED] drm_test_drmm_connector_init_null_ddc
[07:25:43] ========= drm_test_drmm_connector_init_type_valid =========
[07:25:43] [PASSED] Unknown
[07:25:43] [PASSED] VGA
[07:25:43] [PASSED] DVI-I
[07:25:43] [PASSED] DVI-D
[07:25:43] [PASSED] DVI-A
[07:25:43] [PASSED] Composite
[07:25:43] [PASSED] SVIDEO
[07:25:43] [PASSED] LVDS
[07:25:43] [PASSED] Component
[07:25:43] [PASSED] DIN
[07:25:43] [PASSED] DP
[07:25:43] [PASSED] HDMI-A
[07:25:43] [PASSED] HDMI-B
[07:25:43] [PASSED] TV
[07:25:43] [PASSED] eDP
[07:25:43] [PASSED] Virtual
[07:25:43] [PASSED] DSI
[07:25:43] [PASSED] DPI
[07:25:43] [PASSED] Writeback
[07:25:43] [PASSED] SPI
[07:25:43] [PASSED] USB
[07:25:43] ===== [PASSED] drm_test_drmm_connector_init_type_valid =====
[07:25:43] =============== [PASSED] drmm_connector_init ===============
[07:25:43] = drm_connector_attach_broadcast_rgb_property (2 subtests) =
[07:25:43] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property
[07:25:43] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector
[07:25:43] === [PASSED] drm_connector_attach_broadcast_rgb_property ===
[07:25:43] ========== drm_get_tv_mode_from_name (2 subtests) ==========
[07:25:43] ========== drm_test_get_tv_mode_from_name_valid ===========
[07:25:43] [PASSED] NTSC
[07:25:43] [PASSED] NTSC-443
[07:25:43] [PASSED] NTSC-J
[07:25:43] [PASSED] PAL
[07:25:43] [PASSED] PAL-M
[07:25:43] [PASSED] PAL-N
[07:25:43] [PASSED] SECAM
[07:25:43] ====== [PASSED] drm_test_get_tv_mode_from_name_valid =======
[07:25:43] [PASSED] drm_test_get_tv_mode_from_name_truncated
[07:25:43] ============ [PASSED] drm_get_tv_mode_from_name ============
[07:25:43] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) =
[07:25:43] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb
[07:25:43] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc
[07:25:43] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1
[07:25:43] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc
[07:25:43] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1
[07:25:43] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double
[07:25:43] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid =
[07:25:43] [PASSED] VIC 96
[07:25:43] [PASSED] VIC 97
[07:25:43] [PASSED] VIC 101
[07:25:43] [PASSED] VIC 102
[07:25:43] [PASSED] VIC 106
[07:25:43] [PASSED] VIC 107
[07:25:43] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid ===
[07:25:43] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc
[07:25:43] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc
[07:25:43] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc
[07:25:43] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc
[07:25:43] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc
[07:25:43] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ====
[07:25:43] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) ==
[07:25:43] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name ====
[07:25:43] [PASSED] Automatic
[07:25:43] [PASSED] Full
[07:25:43] [PASSED] Limited 16:235
[07:25:43] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name ===
[07:25:43] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid
[07:25:43] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ====
[07:25:43] == drm_hdmi_connector_get_output_format_name (2 subtests) ==
[07:25:43] === drm_test_drm_hdmi_connector_get_output_format_name ====
[07:25:43] [PASSED] RGB
[07:25:43] [PASSED] YUV 4:2:0
[07:25:43] [PASSED] YUV 4:2:2
[07:25:43] [PASSED] YUV 4:4:4
[07:25:43] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name ===
[07:25:43] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid
[07:25:43] ==== [PASSED] drm_hdmi_connector_get_output_format_name ====
[07:25:43] ============= drm_damage_helper (21 subtests) ==============
[07:25:43] [PASSED] drm_test_damage_iter_no_damage
[07:25:43] [PASSED] drm_test_damage_iter_no_damage_fractional_src
[07:25:43] [PASSED] drm_test_damage_iter_no_damage_src_moved
[07:25:43] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved
[07:25:43] [PASSED] drm_test_damage_iter_no_damage_not_visible
[07:25:43] [PASSED] drm_test_damage_iter_no_damage_no_crtc
[07:25:43] [PASSED] drm_test_damage_iter_no_damage_no_fb
[07:25:43] [PASSED] drm_test_damage_iter_simple_damage
[07:25:43] [PASSED] drm_test_damage_iter_single_damage
[07:25:43] [PASSED] drm_test_damage_iter_single_damage_intersect_src
[07:25:43] [PASSED] drm_test_damage_iter_single_damage_outside_src
[07:25:43] [PASSED] drm_test_damage_iter_single_damage_fractional_src
[07:25:43] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src
[07:25:43] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src
[07:25:43] [PASSED] drm_test_damage_iter_single_damage_src_moved
[07:25:43] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved
[07:25:43] [PASSED] drm_test_damage_iter_damage
[07:25:43] [PASSED] drm_test_damage_iter_damage_one_intersect
[07:25:43] [PASSED] drm_test_damage_iter_damage_one_outside
[07:25:43] [PASSED] drm_test_damage_iter_damage_src_moved
[07:25:43] [PASSED] drm_test_damage_iter_damage_not_visible
[07:25:43] ================ [PASSED] drm_damage_helper ================
[07:25:43] ============== drm_dp_mst_helper (3 subtests) ==============
[07:25:43] ============== drm_test_dp_mst_calc_pbn_mode ==============
[07:25:43] [PASSED] Clock 154000 BPP 30 DSC disabled
[07:25:43] [PASSED] Clock 234000 BPP 30 DSC disabled
[07:25:43] [PASSED] Clock 297000 BPP 24 DSC disabled
[07:25:43] [PASSED] Clock 332880 BPP 24 DSC enabled
[07:25:43] [PASSED] Clock 324540 BPP 24 DSC enabled
[07:25:43] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ==========
[07:25:43] ============== drm_test_dp_mst_calc_pbn_div ===============
[07:25:43] [PASSED] Link rate 2000000 lane count 4
[07:25:43] [PASSED] Link rate 2000000 lane count 2
[07:25:43] [PASSED] Link rate 2000000 lane count 1
[07:25:43] [PASSED] Link rate 1350000 lane count 4
[07:25:43] [PASSED] Link rate 1350000 lane count 2
[07:25:43] [PASSED] Link rate 1350000 lane count 1
[07:25:43] [PASSED] Link rate 1000000 lane count 4
[07:25:43] [PASSED] Link rate 1000000 lane count 2
[07:25:43] [PASSED] Link rate 1000000 lane count 1
[07:25:43] [PASSED] Link rate 810000 lane count 4
[07:25:43] [PASSED] Link rate 810000 lane count 2
[07:25:43] [PASSED] Link rate 810000 lane count 1
[07:25:43] [PASSED] Link rate 540000 lane count 4
[07:25:43] [PASSED] Link rate 540000 lane count 2
[07:25:43] [PASSED] Link rate 540000 lane count 1
[07:25:43] [PASSED] Link rate 270000 lane count 4
[07:25:43] [PASSED] Link rate 270000 lane count 2
[07:25:43] [PASSED] Link rate 270000 lane count 1
[07:25:43] [PASSED] Link rate 162000 lane count 4
[07:25:43] [PASSED] Link rate 162000 lane count 2
[07:25:43] [PASSED] Link rate 162000 lane count 1
[07:25:43] ========== [PASSED] drm_test_dp_mst_calc_pbn_div ===========
[07:25:43] ========= drm_test_dp_mst_sideband_msg_req_decode =========
[07:25:43] [PASSED] DP_ENUM_PATH_RESOURCES with port number
[07:25:43] [PASSED] DP_POWER_UP_PHY with port number
[07:25:43] [PASSED] DP_POWER_DOWN_PHY with port number
[07:25:43] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks
[07:25:43] [PASSED] DP_ALLOCATE_PAYLOAD with port number
[07:25:43] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI
[07:25:43] [PASSED] DP_ALLOCATE_PAYLOAD with PBN
[07:25:43] [PASSED] DP_QUERY_PAYLOAD with port number
[07:25:43] [PASSED] DP_QUERY_PAYLOAD with VCPI
[07:25:43] [PASSED] DP_REMOTE_DPCD_READ with port number
[07:25:43] [PASSED] DP_REMOTE_DPCD_READ with DPCD address
[07:25:43] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes
[07:25:43] [PASSED] DP_REMOTE_DPCD_WRITE with port number
[07:25:43] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address
[07:25:43] [PASSED] DP_REMOTE_DPCD_WRITE with data array
[07:25:43] [PASSED] DP_REMOTE_I2C_READ with port number
[07:25:43] [PASSED] DP_REMOTE_I2C_READ with I2C device ID
[07:25:43] [PASSED] DP_REMOTE_I2C_READ with transactions array
[07:25:43] [PASSED] DP_REMOTE_I2C_WRITE with port number
[07:25:43] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID
[07:25:43] [PASSED] DP_REMOTE_I2C_WRITE with data array
[07:25:43] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID
[07:25:43] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID
[07:25:43] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event
[07:25:43] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event
[07:25:43] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior
[07:25:43] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior
[07:25:43] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode =====
[07:25:43] ================ [PASSED] drm_dp_mst_helper ================
[07:25:43] ================== drm_exec (7 subtests) ===================
[07:25:43] [PASSED] sanitycheck
[07:25:43] [PASSED] test_lock
[07:25:43] [PASSED] test_lock_unlock
[07:25:43] [PASSED] test_duplicates
[07:25:43] [PASSED] test_prepare
[07:25:43] [PASSED] test_prepare_array
[07:25:43] [PASSED] test_multiple_loops
[07:25:43] ==================== [PASSED] drm_exec =====================
[07:25:43] =========== drm_format_helper_test (17 subtests) ===========
[07:25:43] ============== drm_test_fb_xrgb8888_to_gray8 ==============
[07:25:43] [PASSED] single_pixel_source_buffer
[07:25:43] [PASSED] single_pixel_clip_rectangle
[07:25:43] [PASSED] well_known_colors
[07:25:43] [PASSED] destination_pitch
[07:25:43] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ==========
[07:25:43] ============= drm_test_fb_xrgb8888_to_rgb332 ==============
[07:25:43] [PASSED] single_pixel_source_buffer
[07:25:43] [PASSED] single_pixel_clip_rectangle
[07:25:43] [PASSED] well_known_colors
[07:25:43] [PASSED] destination_pitch
[07:25:43] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ==========
[07:25:43] ============= drm_test_fb_xrgb8888_to_rgb565 ==============
[07:25:43] [PASSED] single_pixel_source_buffer
[07:25:43] [PASSED] single_pixel_clip_rectangle
[07:25:43] [PASSED] well_known_colors
[07:25:43] [PASSED] destination_pitch
[07:25:43] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ==========
[07:25:43] ============ drm_test_fb_xrgb8888_to_xrgb1555 =============
[07:25:43] [PASSED] single_pixel_source_buffer
[07:25:43] [PASSED] single_pixel_clip_rectangle
[07:25:43] [PASSED] well_known_colors
[07:25:43] [PASSED] destination_pitch
[07:25:43] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 =========
[07:25:43] ============ drm_test_fb_xrgb8888_to_argb1555 =============
[07:25:43] [PASSED] single_pixel_source_buffer
[07:25:43] [PASSED] single_pixel_clip_rectangle
[07:25:43] [PASSED] well_known_colors
[07:25:43] [PASSED] destination_pitch
[07:25:43] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 =========
[07:25:43] ============ drm_test_fb_xrgb8888_to_rgba5551 =============
[07:25:43] [PASSED] single_pixel_source_buffer
[07:25:43] [PASSED] single_pixel_clip_rectangle
[07:25:43] [PASSED] well_known_colors
[07:25:43] [PASSED] destination_pitch
[07:25:43] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 =========
[07:25:43] ============= drm_test_fb_xrgb8888_to_rgb888 ==============
[07:25:43] [PASSED] single_pixel_source_buffer
[07:25:43] [PASSED] single_pixel_clip_rectangle
[07:25:43] [PASSED] well_known_colors
[07:25:43] [PASSED] destination_pitch
[07:25:43] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ==========
[07:25:43] ============ drm_test_fb_xrgb8888_to_argb8888 =============
[07:25:43] [PASSED] single_pixel_source_buffer
[07:25:43] [PASSED] single_pixel_clip_rectangle
[07:25:43] [PASSED] well_known_colors
[07:25:43] [PASSED] destination_pitch
[07:25:43] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 =========
[07:25:43] =========== drm_test_fb_xrgb8888_to_xrgb2101010 ===========
[07:25:43] [PASSED] single_pixel_source_buffer
[07:25:43] [PASSED] single_pixel_clip_rectangle
[07:25:43] [PASSED] well_known_colors
[07:25:43] [PASSED] destination_pitch
[07:25:43] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 =======
[07:25:43] =========== drm_test_fb_xrgb8888_to_argb2101010 ===========
[07:25:43] [PASSED] single_pixel_source_buffer
[07:25:43] [PASSED] single_pixel_clip_rectangle
[07:25:43] [PASSED] well_known_colors
[07:25:43] [PASSED] destination_pitch
[07:25:43] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 =======
[07:25:43] ============== drm_test_fb_xrgb8888_to_mono ===============
[07:25:43] [PASSED] single_pixel_source_buffer
[07:25:43] [PASSED] single_pixel_clip_rectangle
[07:25:43] [PASSED] well_known_colors
[07:25:43] [PASSED] destination_pitch
[07:25:43] ========== [PASSED] drm_test_fb_xrgb8888_to_mono ===========
[07:25:43] ==================== drm_test_fb_swab =====================
[07:25:43] [PASSED] single_pixel_source_buffer
[07:25:43] [PASSED] single_pixel_clip_rectangle
[07:25:43] [PASSED] well_known_colors
[07:25:43] [PASSED] destination_pitch
[07:25:43] ================ [PASSED] drm_test_fb_swab =================
[07:25:43] ============ drm_test_fb_xrgb8888_to_xbgr8888 =============
[07:25:43] [PASSED] single_pixel_source_buffer
[07:25:43] [PASSED] single_pixel_clip_rectangle
[07:25:43] [PASSED] well_known_colors
[07:25:43] [PASSED] destination_pitch
[07:25:43] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 =========
[07:25:43] ============ drm_test_fb_xrgb8888_to_abgr8888 =============
[07:25:43] [PASSED] single_pixel_source_buffer
[07:25:43] [PASSED] single_pixel_clip_rectangle
[07:25:43] [PASSED] well_known_colors
[07:25:43] [PASSED] destination_pitch
[07:25:43] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 =========
[07:25:43] ================= drm_test_fb_clip_offset =================
[07:25:43] [PASSED] pass through
[07:25:43] [PASSED] horizontal offset
[07:25:43] [PASSED] vertical offset
[07:25:43] [PASSED] horizontal and vertical offset
[07:25:43] [PASSED] horizontal offset (custom pitch)
[07:25:43] [PASSED] vertical offset (custom pitch)
[07:25:43] [PASSED] horizontal and vertical offset (custom pitch)
[07:25:43] ============= [PASSED] drm_test_fb_clip_offset =============
[07:25:43] ============== drm_test_fb_build_fourcc_list ==============
[07:25:43] [PASSED] no native formats
[07:25:43] [PASSED] XRGB8888 as native format
[07:25:43] [PASSED] remove duplicates
[07:25:43] [PASSED] convert alpha formats
[07:25:43] [PASSED] random formats
[07:25:43] ========== [PASSED] drm_test_fb_build_fourcc_list ==========
[07:25:43] =================== drm_test_fb_memcpy ====================
[07:25:43] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258)
[07:25:43] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258)
[07:25:43] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559)
[07:25:43] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258)
[07:25:43] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258)
[07:25:43] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559)
[07:25:43] [PASSED] well_known_colors: XB24 little-endian (0x34324258)
[07:25:43] [PASSED] well_known_colors: XRA8 little-endian (0x38415258)
[07:25:43] [PASSED] well_known_colors: YU24 little-endian (0x34325559)
[07:25:43] [PASSED] destination_pitch: XB24 little-endian (0x34324258)
[07:25:43] [PASSED] destination_pitch: XRA8 little-endian (0x38415258)
[07:25:43] [PASSED] destination_pitch: YU24 little-endian (0x34325559)
[07:25:43] =============== [PASSED] drm_test_fb_memcpy ================
[07:25:43] ============= [PASSED] drm_format_helper_test ==============
[07:25:43] ================= drm_format (18 subtests) =================
[07:25:43] [PASSED] drm_test_format_block_width_invalid
[07:25:43] [PASSED] drm_test_format_block_width_one_plane
[07:25:43] [PASSED] drm_test_format_block_width_two_plane
[07:25:43] [PASSED] drm_test_format_block_width_three_plane
[07:25:43] [PASSED] drm_test_format_block_width_tiled
[07:25:43] [PASSED] drm_test_format_block_height_invalid
[07:25:43] [PASSED] drm_test_format_block_height_one_plane
[07:25:43] [PASSED] drm_test_format_block_height_two_plane
[07:25:43] [PASSED] drm_test_format_block_height_three_plane
[07:25:43] [PASSED] drm_test_format_block_height_tiled
[07:25:43] [PASSED] drm_test_format_min_pitch_invalid
[07:25:43] [PASSED] drm_test_format_min_pitch_one_plane_8bpp
[07:25:43] [PASSED] drm_test_format_min_pitch_one_plane_16bpp
[07:25:43] [PASSED] drm_test_format_min_pitch_one_plane_24bpp
[07:25:43] [PASSED] drm_test_format_min_pitch_one_plane_32bpp
[07:25:43] [PASSED] drm_test_format_min_pitch_two_plane
[07:25:43] [PASSED] drm_test_format_min_pitch_three_plane_8bpp
[07:25:43] [PASSED] drm_test_format_min_pitch_tiled
[07:25:43] =================== [PASSED] drm_format ====================
[07:25:43] =============== drm_framebuffer (1 subtest) ================
[07:25:43] =============== drm_test_framebuffer_create ===============
[07:25:43] [PASSED] ABGR8888 normal sizes
[07:25:43] [PASSED] ABGR8888 max sizes
[07:25:43] [PASSED] ABGR8888 pitch greater than min required
[07:25:43] [PASSED] ABGR8888 pitch less than min required
[07:25:43] [PASSED] ABGR8888 Invalid width
[07:25:43] [PASSED] ABGR8888 Invalid buffer handle
[07:25:43] [PASSED] No pixel format
[07:25:43] [PASSED] ABGR8888 Width 0
[07:25:43] [PASSED] ABGR8888 Height 0
[07:25:43] [PASSED] ABGR8888 Out of bound height * pitch combination
[07:25:43] [PASSED] ABGR8888 Large buffer offset
[07:25:43] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers
[07:25:43] [PASSED] ABGR8888 Valid buffer modifier
[07:25:43] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE)
[07:25:43] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS
[07:25:43] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS
[07:25:43] [PASSED] NV12 Normal sizes
[07:25:43] [PASSED] NV12 Max sizes
[07:25:43] [PASSED] NV12 Invalid pitch
[07:25:43] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag
[07:25:43] [PASSED] NV12 different modifier per-plane
[07:25:43] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE
[07:25:43] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS
[07:25:43] [PASSED] NV12 Modifier for inexistent plane
[07:25:43] [PASSED] NV12 Handle for inexistent plane
[07:25:43] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS
[07:25:43] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier
[07:25:43] [PASSED] YVU420 Normal sizes
[07:25:43] [PASSED] YVU420 Max sizes
[07:25:43] [PASSED] YVU420 Invalid pitch
[07:25:43] [PASSED] YVU420 Different pitches
[07:25:43] [PASSED] YVU420 Different buffer offsets/pitches
[07:25:43] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS
[07:25:43] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS
[07:25:43] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS
[07:25:43] [PASSED] YVU420 Valid modifier
[07:25:43] [PASSED] YVU420 Different modifiers per plane
[07:25:43] [PASSED] YVU420 Modifier for inexistent plane
[07:25:43] [PASSED] X0L2 Normal sizes
[07:25:43] [PASSED] X0L2 Max sizes
[07:25:43] [PASSED] X0L2 Invalid pitch
[07:25:43] [PASSED] X0L2 Pitch greater than minimum required
[07:25:43] [PASSED] X0L2 Handle for inexistent plane
[07:25:43] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set
[07:25:43] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set
[07:25:43] [PASSED] X0L2 Valid modifier
[07:25:43] [PASSED] X0L2 Modifier for inexistent plane
[07:25:43] =========== [PASSED] drm_test_framebuffer_create ===========
[07:25:43] ================= [PASSED] drm_framebuffer =================
[07:25:43] ================ drm_gem_shmem (8 subtests) ================
[07:25:43] [PASSED] drm_gem_shmem_test_obj_create
[07:25:43] [PASSED] drm_gem_shmem_test_obj_create_private
[07:25:43] [PASSED] drm_gem_shmem_test_pin_pages
[07:25:43] [PASSED] drm_gem_shmem_test_vmap
[07:25:43] [PASSED] drm_gem_shmem_test_get_pages_sgt
[07:25:43] [PASSED] drm_gem_shmem_test_get_sg_table
[07:25:43] [PASSED] drm_gem_shmem_test_madvise
[07:25:43] [PASSED] drm_gem_shmem_test_purge
[07:25:43] ================== [PASSED] drm_gem_shmem ==================
[07:25:43] === drm_atomic_helper_connector_hdmi_check (22 subtests) ===
[07:25:43] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode
[07:25:43] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1
[07:25:43] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode
[07:25:43] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1
[07:25:43] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode
[07:25:43] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1
[07:25:43] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed
[07:25:43] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed
[07:25:43] [PASSED] drm_test_check_hdmi_funcs_reject_rate
[07:25:43] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback
[07:25:43] [PASSED] drm_test_check_max_tmds_rate_format_fallback
[07:25:43] [PASSED] drm_test_check_output_bpc_crtc_mode_changed
[07:25:43] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed
[07:25:43] [PASSED] drm_test_check_output_bpc_dvi
[07:25:43] [PASSED] drm_test_check_output_bpc_format_vic_1
[07:25:43] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only
[07:25:43] [PASSED] drm_test_check_output_bpc_format_display_rgb_only
[07:25:43] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only
[07:25:43] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only
[07:25:43] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc
[07:25:43] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc
[07:25:43] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc
[07:25:43] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ======
[07:25:43] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ====
[07:25:43] [PASSED] drm_test_check_broadcast_rgb_value
[07:25:43] [PASSED] drm_test_check_bpc_8_value
[07:25:43] [PASSED] drm_test_check_bpc_10_value
[07:25:43] [PASSED] drm_test_check_bpc_12_value
[07:25:43] [PASSED] drm_test_check_format_value
[07:25:43] [PASSED] drm_test_check_tmds_char_value
[07:25:43] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ======
[07:25:43] ================= drm_managed (2 subtests) =================
[07:25:43] [PASSED] drm_test_managed_release_action
[07:25:43] [PASSED] drm_test_managed_run_action
[07:25:43] =================== [PASSED] drm_managed ===================
[07:25:43] =================== drm_mm (6 subtests) ====================
[07:25:43] [PASSED] drm_test_mm_init
[07:25:43] [PASSED] drm_test_mm_debug
[07:25:43] [PASSED] drm_test_mm_align32
[07:25:43] [PASSED] drm_test_mm_align64
[07:25:43] [PASSED] drm_test_mm_lowest
[07:25:43] [PASSED] drm_test_mm_highest
[07:25:43] ===================== [PASSED] drm_mm ======================
[07:25:43] ============= drm_modes_analog_tv (4 subtests) =============
[07:25:43] [PASSED] drm_test_modes_analog_tv_ntsc_480i
[07:25:43] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined
[07:25:43] [PASSED] drm_test_modes_analog_tv_pal_576i
[07:25:43] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined
[07:25:43] =============== [PASSED] drm_modes_analog_tv ===============
[07:25:43] ============== drm_plane_helper (2 subtests) ===============
[07:25:43] =============== drm_test_check_plane_state ================
[07:25:43] [PASSED] clipping_simple
[07:25:43] [PASSED] clipping_rotate_reflect
[07:25:43] [PASSED] positioning_simple
[07:25:43] [PASSED] upscaling
[07:25:43] [PASSED] downscaling
[07:25:43] [PASSED] rounding1
[07:25:43] [PASSED] rounding2
[07:25:43] [PASSED] rounding3
[07:25:43] [PASSED] rounding4
[07:25:43] =========== [PASSED] drm_test_check_plane_state ============
[07:25:43] =========== drm_test_check_invalid_plane_state ============
[07:25:43] [PASSED] positioning_invalid
[07:25:43] [PASSED] upscaling_invalid
[07:25:43] [PASSED] downscaling_invalid
[07:25:43] ======= [PASSED] drm_test_check_invalid_plane_state ========
[07:25:43] ================ [PASSED] drm_plane_helper =================
stty: 'standard input': Inappropriate ioctl for device
[07:25:43] ====== drm_connector_helper_tv_get_modes (1 subtest) =======
[07:25:43] ====== drm_test_connector_helper_tv_get_modes_check =======
[07:25:43] [PASSED] None
[07:25:43] [PASSED] PAL
[07:25:43] [PASSED] NTSC
[07:25:43] [PASSED] Both, NTSC Default
[07:25:43] [PASSED] Both, PAL Default
[07:25:43] [PASSED] Both, NTSC Default, with PAL on command-line
[07:25:43] [PASSED] Both, PAL Default, with NTSC on command-line
[07:25:43] == [PASSED] drm_test_connector_helper_tv_get_modes_check ===
[07:25:43] ======== [PASSED] drm_connector_helper_tv_get_modes ========
[07:25:43] ================== drm_rect (9 subtests) ===================
[07:25:43] [PASSED] drm_test_rect_clip_scaled_div_by_zero
[07:25:43] [PASSED] drm_test_rect_clip_scaled_not_clipped
[07:25:43] [PASSED] drm_test_rect_clip_scaled_clipped
[07:25:43] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned
[07:25:43] ================= drm_test_rect_intersect =================
[07:25:43] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0
[07:25:43] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1
[07:25:43] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0
[07:25:43] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1
[07:25:43] [PASSED] right x left: 2x1+0+0 x 3x1+1+0
[07:25:43] [PASSED] left x right: 3x1+1+0 x 2x1+0+0
[07:25:43] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1
[07:25:43] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0
[07:25:43] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1
[07:25:43] [PASSED] touching side: 1x1+0+0 x 1x1+1+0
[07:25:43] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0
[07:25:43] [PASSED] inside another: 2x2+0+0 x 1x1+1+1
[07:25:43] [PASSED] far away: 1x1+0+0 x 1x1+3+6
[07:25:43] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10
[07:25:43] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10
[07:25:43] ============= [PASSED] drm_test_rect_intersect =============
[07:25:43] ================ drm_test_rect_calc_hscale ================
[07:25:43] [PASSED] normal use
[07:25:43] [PASSED] out of max range
[07:25:43] [PASSED] out of min range
[07:25:43] [PASSED] zero dst
[07:25:43] [PASSED] negative src
[07:25:43] [PASSED] negative dst
[07:25:43] ============ [PASSED] drm_test_rect_calc_hscale ============
[07:25:43] ================ drm_test_rect_calc_vscale ================
[07:25:43] [PASSED] normal use
[07:25:43] [PASSED] out of max range
[07:25:43] [PASSED] out of min range
[07:25:43] [PASSED] zero dst
[07:25:43] [PASSED] negative src
[07:25:43] [PASSED] negative dst
[07:25:43] ============ [PASSED] drm_test_rect_calc_vscale ============
[07:25:43] ================== drm_test_rect_rotate ===================
[07:25:43] [PASSED] reflect-x
[07:25:43] [PASSED] reflect-y
[07:25:43] [PASSED] rotate-0
[07:25:43] [PASSED] rotate-90
[07:25:43] [PASSED] rotate-180
[07:25:43] [PASSED] rotate-270
[07:25:43] ============== [PASSED] drm_test_rect_rotate ===============
[07:25:43] ================ drm_test_rect_rotate_inv =================
[07:25:43] [PASSED] reflect-x
[07:25:43] [PASSED] reflect-y
[07:25:43] [PASSED] rotate-0
[07:25:43] [PASSED] rotate-90
[07:25:43] [PASSED] rotate-180
[07:25:43] [PASSED] rotate-270
[07:25:43] ============ [PASSED] drm_test_rect_rotate_inv =============
[07:25:43] ==================== [PASSED] drm_rect =====================
[07:25:43] ============================================================
[07:25:43] Testing complete. Ran 511 tests: passed: 511
[07:25:43] Elapsed time: 23.897s total, 1.721s configuring, 21.956s building, 0.203s running
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig
stty: 'standard input': Inappropriate ioctl for device
[07:25:43] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[07:25:45] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=48
[07:25:53] Starting KUnit Kernel (1/1)...
[07:25:53] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[07:25:54] ================= ttm_device (5 subtests) ==================
[07:25:54] [PASSED] ttm_device_init_basic
[07:25:54] [PASSED] ttm_device_init_multiple
[07:25:54] [PASSED] ttm_device_fini_basic
[07:25:54] [PASSED] ttm_device_init_no_vma_man
[07:25:54] ================== ttm_device_init_pools ==================
[07:25:54] [PASSED] No DMA allocations, no DMA32 required
[07:25:54] [PASSED] DMA allocations, DMA32 required
[07:25:54] [PASSED] No DMA allocations, DMA32 required
[07:25:54] [PASSED] DMA allocations, no DMA32 required
[07:25:54] ============== [PASSED] ttm_device_init_pools ==============
[07:25:54] =================== [PASSED] ttm_device ====================
[07:25:54] ================== ttm_pool (8 subtests) ===================
[07:25:54] ================== ttm_pool_alloc_basic ===================
[07:25:54] [PASSED] One page
[07:25:54] [PASSED] More than one page
[07:25:54] [PASSED] Above the allocation limit
[07:25:54] [PASSED] One page, with coherent DMA mappings enabled
[07:25:54] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[07:25:54] ============== [PASSED] ttm_pool_alloc_basic ===============
[07:25:54] ============== ttm_pool_alloc_basic_dma_addr ==============
[07:25:54] [PASSED] One page
[07:25:54] [PASSED] More than one page
[07:25:54] [PASSED] Above the allocation limit
[07:25:54] [PASSED] One page, with coherent DMA mappings enabled
[07:25:54] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[07:25:54] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ==========
[07:25:54] [PASSED] ttm_pool_alloc_order_caching_match
[07:25:54] [PASSED] ttm_pool_alloc_caching_mismatch
[07:25:54] [PASSED] ttm_pool_alloc_order_mismatch
[07:25:54] [PASSED] ttm_pool_free_dma_alloc
[07:25:54] [PASSED] ttm_pool_free_no_dma_alloc
[07:25:54] [PASSED] ttm_pool_fini_basic
[07:25:54] ==================== [PASSED] ttm_pool =====================
[07:25:54] ================ ttm_resource (8 subtests) =================
[07:25:54] ================= ttm_resource_init_basic =================
[07:25:54] [PASSED] Init resource in TTM_PL_SYSTEM
[07:25:54] [PASSED] Init resource in TTM_PL_VRAM
[07:25:54] [PASSED] Init resource in a private placement
[07:25:54] [PASSED] Init resource in TTM_PL_SYSTEM, set placement flags
[07:25:54] ============= [PASSED] ttm_resource_init_basic =============
[07:25:54] [PASSED] ttm_resource_init_pinned
[07:25:54] [PASSED] ttm_resource_fini_basic
[07:25:54] [PASSED] ttm_resource_manager_init_basic
[07:25:54] [PASSED] ttm_resource_manager_usage_basic
[07:25:54] [PASSED] ttm_resource_manager_set_used_basic
[07:25:54] [PASSED] ttm_sys_man_alloc_basic
[07:25:54] [PASSED] ttm_sys_man_free_basic
[07:25:54] ================== [PASSED] ttm_resource ===================
[07:25:54] =================== ttm_tt (10 subtests) ===================
[07:25:54] ==================== ttm_tt_init_basic ====================
[07:25:54] [PASSED] Page-aligned size
[07:25:54] [PASSED] Extra pages requested
[07:25:54] ================ [PASSED] ttm_tt_init_basic ================
[07:25:54] [PASSED] ttm_tt_init_misaligned
[07:25:54] [PASSED] ttm_tt_fini_basic
[07:25:54] [PASSED] ttm_tt_fini_sg
[07:25:54] [PASSED] ttm_tt_fini_shmem
[07:25:54] [PASSED] ttm_tt_create_basic
[07:25:54] [PASSED] ttm_tt_create_invalid_bo_type
[07:25:54] [PASSED] ttm_tt_create_ttm_exists
[07:25:54] [PASSED] ttm_tt_create_failed
[07:25:54] [PASSED] ttm_tt_destroy_basic
[07:25:54] ===================== [PASSED] ttm_tt ======================
[07:25:54] =================== ttm_bo (14 subtests) ===================
[07:25:54] =========== ttm_bo_reserve_optimistic_no_ticket ===========
[07:25:54] [PASSED] Cannot be interrupted and sleeps
[07:25:54] [PASSED] Cannot be interrupted, locks straight away
[07:25:54] [PASSED] Can be interrupted, sleeps
[07:25:54] ======= [PASSED] ttm_bo_reserve_optimistic_no_ticket =======
[07:25:54] [PASSED] ttm_bo_reserve_locked_no_sleep
[07:25:54] [PASSED] ttm_bo_reserve_no_wait_ticket
[07:25:54] [PASSED] ttm_bo_reserve_double_resv
[07:25:54] [PASSED] ttm_bo_reserve_interrupted
[07:25:54] [PASSED] ttm_bo_reserve_deadlock
[07:25:54] [PASSED] ttm_bo_unreserve_basic
[07:25:54] [PASSED] ttm_bo_unreserve_pinned
[07:25:54] [PASSED] ttm_bo_unreserve_bulk
[07:25:54] [PASSED] ttm_bo_put_basic
[07:25:54] [PASSED] ttm_bo_put_shared_resv
[07:25:54] [PASSED] ttm_bo_pin_basic
[07:25:54] [PASSED] ttm_bo_pin_unpin_resource
[07:25:54] [PASSED] ttm_bo_multiple_pin_one_unpin
[07:25:54] ===================== [PASSED] ttm_bo ======================
[07:25:54] ============================================================
[07:25:54] Testing complete. Ran 62 tests: passed: 62
[07:25:54] Elapsed time: 10.605s total, 1.733s configuring, 8.653s building, 0.176s running
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
^ permalink raw reply [flat|nested] 36+ messages in thread
* ✓ CI.Build: success for TTM shrinker helpers and xe buffer object shrinker (rev5)
2024-06-18 7:18 [PATCH v5 00/12] TTM shrinker helpers and xe buffer object shrinker Thomas Hellström
` (14 preceding siblings ...)
2024-06-18 7:25 ` ✓ CI.KUnit: success " Patchwork
@ 2024-06-18 7:37 ` Patchwork
2024-06-18 7:39 ` ✗ CI.Hooks: failure " Patchwork
` (3 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Patchwork @ 2024-06-18 7:37 UTC (permalink / raw)
To: Thomas Hellström; +Cc: intel-xe
== Series Details ==
Series: TTM shrinker helpers and xe buffer object shrinker (rev5)
URL : https://patchwork.freedesktop.org/series/131815/
State : success
== Summary ==
lib/modules/6.10.0-rc4-xe/kernel/sound/core/seq/
lib/modules/6.10.0-rc4-xe/kernel/sound/core/seq/snd-seq.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/core/snd-seq-device.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/core/snd-hwdep.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/core/snd.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/core/snd-pcm.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/core/snd-compress.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/core/snd-timer.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soundcore.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/intel/
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/intel/atom/
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/intel/atom/snd-soc-sst-atom-hifi2-platform.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/intel/atom/sst/
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/intel/atom/sst/snd-intel-sst-acpi.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/intel/atom/sst/snd-intel-sst-core.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/intel/common/
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/intel/common/snd-soc-acpi-intel-match.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/amd/
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/amd/snd-acp-config.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/sof/
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/sof/intel/
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/sof/intel/snd-sof-pci-intel-tgl.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/sof/intel/snd-sof-intel-hda-mlink.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/sof/intel/snd-sof-pci-intel-cnl.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/sof/intel/snd-sof-pci-intel-lnl.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/sof/intel/snd-sof-intel-hda-common.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/sof/intel/snd-sof-intel-hda-generic.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/sof/intel/snd-sof-intel-hda.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/sof/intel/snd-sof-pci-intel-mtl.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/sof/amd/
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/sof/amd/snd-sof-amd-renoir.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/sof/amd/snd-sof-amd-acp.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/sof/snd-sof-utils.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/sof/snd-sof-pci.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/sof/snd-sof.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/sof/snd-sof-probes.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/sof/xtensa/
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/sof/xtensa/snd-sof-xtensa-dsp.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/snd-soc-core.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/snd-soc-acpi.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/codecs/
lib/modules/6.10.0-rc4-xe/kernel/sound/soc/codecs/snd-soc-hdac-hda.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/hda/
lib/modules/6.10.0-rc4-xe/kernel/sound/hda/snd-intel-sdw-acpi.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/hda/ext/
lib/modules/6.10.0-rc4-xe/kernel/sound/hda/ext/snd-hda-ext-core.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/hda/snd-intel-dspcfg.ko
lib/modules/6.10.0-rc4-xe/kernel/sound/hda/snd-hda-core.ko
lib/modules/6.10.0-rc4-xe/kernel/arch/
lib/modules/6.10.0-rc4-xe/kernel/arch/x86/
lib/modules/6.10.0-rc4-xe/kernel/arch/x86/kernel/
lib/modules/6.10.0-rc4-xe/kernel/arch/x86/kernel/msr.ko
lib/modules/6.10.0-rc4-xe/kernel/arch/x86/kernel/cpuid.ko
lib/modules/6.10.0-rc4-xe/kernel/arch/x86/crypto/
lib/modules/6.10.0-rc4-xe/kernel/arch/x86/crypto/sha512-ssse3.ko
lib/modules/6.10.0-rc4-xe/kernel/arch/x86/crypto/crct10dif-pclmul.ko
lib/modules/6.10.0-rc4-xe/kernel/arch/x86/crypto/ghash-clmulni-intel.ko
lib/modules/6.10.0-rc4-xe/kernel/arch/x86/crypto/sha1-ssse3.ko
lib/modules/6.10.0-rc4-xe/kernel/arch/x86/crypto/crc32-pclmul.ko
lib/modules/6.10.0-rc4-xe/kernel/arch/x86/crypto/sha256-ssse3.ko
lib/modules/6.10.0-rc4-xe/kernel/arch/x86/crypto/aesni-intel.ko
lib/modules/6.10.0-rc4-xe/kernel/arch/x86/crypto/polyval-clmulni.ko
lib/modules/6.10.0-rc4-xe/kernel/arch/x86/events/
lib/modules/6.10.0-rc4-xe/kernel/arch/x86/events/intel/
lib/modules/6.10.0-rc4-xe/kernel/arch/x86/events/intel/intel-cstate.ko
lib/modules/6.10.0-rc4-xe/kernel/arch/x86/events/rapl.ko
lib/modules/6.10.0-rc4-xe/kernel/arch/x86/kvm/
lib/modules/6.10.0-rc4-xe/kernel/arch/x86/kvm/kvm.ko
lib/modules/6.10.0-rc4-xe/kernel/arch/x86/kvm/kvm-intel.ko
lib/modules/6.10.0-rc4-xe/kernel/crypto/
lib/modules/6.10.0-rc4-xe/kernel/crypto/crypto_simd.ko
lib/modules/6.10.0-rc4-xe/kernel/crypto/cmac.ko
lib/modules/6.10.0-rc4-xe/kernel/crypto/ccm.ko
lib/modules/6.10.0-rc4-xe/kernel/crypto/cryptd.ko
lib/modules/6.10.0-rc4-xe/kernel/crypto/polyval-generic.ko
lib/modules/6.10.0-rc4-xe/kernel/crypto/async_tx/
lib/modules/6.10.0-rc4-xe/kernel/crypto/async_tx/async_xor.ko
lib/modules/6.10.0-rc4-xe/kernel/crypto/async_tx/async_tx.ko
lib/modules/6.10.0-rc4-xe/kernel/crypto/async_tx/async_memcpy.ko
lib/modules/6.10.0-rc4-xe/kernel/crypto/async_tx/async_pq.ko
lib/modules/6.10.0-rc4-xe/kernel/crypto/async_tx/async_raid6_recov.ko
lib/modules/6.10.0-rc4-xe/build
lib/modules/6.10.0-rc4-xe/modules.alias.bin
lib/modules/6.10.0-rc4-xe/modules.builtin
lib/modules/6.10.0-rc4-xe/modules.softdep
lib/modules/6.10.0-rc4-xe/modules.alias
lib/modules/6.10.0-rc4-xe/modules.order
lib/modules/6.10.0-rc4-xe/modules.symbols
lib/modules/6.10.0-rc4-xe/modules.dep.bin
+ mv kernel-nodebug.tar.gz ..
+ cd ..
+ rm -rf archive
++ date +%s
+ echo -e '\e[0Ksection_end:1718696258:package_x86_64_nodebug\r\e[0K'
+ sync
^[[0Ksection_end:1718696258:package_x86_64_nodebug
^[[0K
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
^ permalink raw reply [flat|nested] 36+ messages in thread
* ✗ CI.Hooks: failure for TTM shrinker helpers and xe buffer object shrinker (rev5)
2024-06-18 7:18 [PATCH v5 00/12] TTM shrinker helpers and xe buffer object shrinker Thomas Hellström
` (15 preceding siblings ...)
2024-06-18 7:37 ` ✓ CI.Build: " Patchwork
@ 2024-06-18 7:39 ` Patchwork
2024-06-18 7:41 ` ✗ CI.checksparse: warning " Patchwork
` (2 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Patchwork @ 2024-06-18 7:39 UTC (permalink / raw)
To: Thomas Hellström; +Cc: intel-xe
== Series Details ==
Series: TTM shrinker helpers and xe buffer object shrinker (rev5)
URL : https://patchwork.freedesktop.org/series/131815/
State : failure
== Summary ==
run-parts: executing /workspace/ci/hooks/00-showenv
+ export
+ grep -Ei '(^|\W)CI_'
declare -x CI_KERNEL_BUILD_DIR="/workspace/kernel/build64-default"
declare -x CI_KERNEL_SRC_DIR="/workspace/kernel"
declare -x CI_TOOLS_SRC_DIR="/workspace/ci"
declare -x CI_WORKSPACE_DIR="/workspace"
run-parts: executing /workspace/ci/hooks/10-build-W1
+ SRC_DIR=/workspace/kernel
+ RESTORE_DISPLAY_CONFIG=0
+ '[' -n /workspace/kernel/build64-default ']'
+ BUILD_DIR=/workspace/kernel/build64-default
+ cd /workspace/kernel
++ nproc
+ make -j48 O=/workspace/kernel/build64-default modules_prepare
make[1]: Entering directory '/workspace/kernel/build64-default'
GEN Makefile
UPD include/generated/compile.h
UPD include/config/kernel.release
mkdir -p /workspace/kernel/build64-default/tools/objtool && make O=/workspace/kernel/build64-default subdir=tools/objtool --no-print-directory -C objtool
UPD include/generated/utsrelease.h
HOSTCC /workspace/kernel/build64-default/tools/objtool/fixdep.o
CALL ../scripts/checksyscalls.sh
HOSTLD /workspace/kernel/build64-default/tools/objtool/fixdep-in.o
LINK /workspace/kernel/build64-default/tools/objtool/fixdep
INSTALL libsubcmd_headers
CC /workspace/kernel/build64-default/tools/objtool/libsubcmd/exec-cmd.o
CC /workspace/kernel/build64-default/tools/objtool/libsubcmd/help.o
CC /workspace/kernel/build64-default/tools/objtool/libsubcmd/pager.o
CC /workspace/kernel/build64-default/tools/objtool/libsubcmd/parse-options.o
CC /workspace/kernel/build64-default/tools/objtool/libsubcmd/run-command.o
CC /workspace/kernel/build64-default/tools/objtool/libsubcmd/sigchain.o
CC /workspace/kernel/build64-default/tools/objtool/libsubcmd/subcmd-config.o
LD /workspace/kernel/build64-default/tools/objtool/libsubcmd/libsubcmd-in.o
AR /workspace/kernel/build64-default/tools/objtool/libsubcmd/libsubcmd.a
CC /workspace/kernel/build64-default/tools/objtool/weak.o
CC /workspace/kernel/build64-default/tools/objtool/check.o
CC /workspace/kernel/build64-default/tools/objtool/special.o
CC /workspace/kernel/build64-default/tools/objtool/builtin-check.o
CC /workspace/kernel/build64-default/tools/objtool/elf.o
CC /workspace/kernel/build64-default/tools/objtool/objtool.o
CC /workspace/kernel/build64-default/tools/objtool/orc_gen.o
CC /workspace/kernel/build64-default/tools/objtool/orc_dump.o
CC /workspace/kernel/build64-default/tools/objtool/libstring.o
CC /workspace/kernel/build64-default/tools/objtool/libctype.o
CC /workspace/kernel/build64-default/tools/objtool/str_error_r.o
CC /workspace/kernel/build64-default/tools/objtool/librbtree.o
CC /workspace/kernel/build64-default/tools/objtool/arch/x86/special.o
CC /workspace/kernel/build64-default/tools/objtool/arch/x86/decode.o
CC /workspace/kernel/build64-default/tools/objtool/arch/x86/orc.o
LD /workspace/kernel/build64-default/tools/objtool/arch/x86/objtool-in.o
LD /workspace/kernel/build64-default/tools/objtool/objtool-in.o
LINK /workspace/kernel/build64-default/tools/objtool/objtool
make[1]: Leaving directory '/workspace/kernel/build64-default'
++ nproc
+ make -j48 O=/workspace/kernel/build64-default W=1 drivers/gpu/drm/xe
make[1]: Entering directory '/workspace/kernel/build64-default'
make[2]: Nothing to be done for 'drivers/gpu/drm/xe'.
make[1]: Leaving directory '/workspace/kernel/build64-default'
run-parts: executing /workspace/ci/hooks/11-build-32b
+++ realpath /workspace/ci/hooks/11-build-32b
++ dirname /workspace/ci/hooks/11-build-32b
+ THIS_SCRIPT_DIR=/workspace/ci/hooks
+ SRC_DIR=/workspace/kernel
+ TOOLS_SRC_DIR=/workspace/ci
+ '[' -n /workspace/kernel/build64-default ']'
+ BUILD_DIR=/workspace/kernel/build64-default
+ BUILD_DIR=/workspace/kernel/build64-default/build32
+ cd /workspace/kernel
+ mkdir -p /workspace/kernel/build64-default/build32
++ nproc
+ make -j48 ARCH=i386 O=/workspace/kernel/build64-default/build32 defconfig
make[1]: Entering directory '/workspace/kernel/build64-default/build32'
GEN Makefile
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/confdata.o
HOSTCC scripts/kconfig/expr.o
LEX scripts/kconfig/lexer.lex.c
YACC scripts/kconfig/parser.tab.[ch]
HOSTCC scripts/kconfig/menu.o
HOSTCC scripts/kconfig/preprocess.o
HOSTCC scripts/kconfig/symbol.o
HOSTCC scripts/kconfig/util.o
HOSTCC scripts/kconfig/lexer.lex.o
HOSTCC scripts/kconfig/parser.tab.o
HOSTLD scripts/kconfig/conf
*** Default configuration is based on 'i386_defconfig'
#
# configuration written to .config
#
make[1]: Leaving directory '/workspace/kernel/build64-default/build32'
+ cd /workspace/kernel/build64-default/build32
+ /workspace/kernel/scripts/kconfig/merge_config.sh .config /workspace/ci/kernel/10-xe.fragment
Using .config as base
Merging /workspace/ci/kernel/10-xe.fragment
Value of CONFIG_DRM_XE is redefined by fragment /workspace/ci/kernel/10-xe.fragment:
Previous value: # CONFIG_DRM_XE is not set
New value: CONFIG_DRM_XE=m
Value of CONFIG_SND_DEBUG is redefined by fragment /workspace/ci/kernel/10-xe.fragment:
Previous value: # CONFIG_SND_DEBUG is not set
New value: CONFIG_SND_DEBUG=y
Value of CONFIG_SND_HDA_INTEL is redefined by fragment /workspace/ci/kernel/10-xe.fragment:
Previous value: CONFIG_SND_HDA_INTEL=y
New value: CONFIG_SND_HDA_INTEL=m
Value of CONFIG_SND_HDA_CODEC_HDMI is redefined by fragment /workspace/ci/kernel/10-xe.fragment:
Previous value: # CONFIG_SND_HDA_CODEC_HDMI is not set
New value: CONFIG_SND_HDA_CODEC_HDMI=m
GEN Makefile
WARNING: unmet direct dependencies detected for FB_IOMEM_HELPERS
Depends on [n]: HAS_IOMEM [=y] && FB_CORE [=n]
Selected by [m]:
- DRM_XE_DISPLAY [=y] && HAS_IOMEM [=y] && DRM [=y] && DRM_XE [=m] && DRM_XE [=m]=m [=m]
#
# configuration written to .config
#
Value requested for CONFIG_HAVE_UID16 not in final .config
Requested value: CONFIG_HAVE_UID16=y
Actual value:
Value requested for CONFIG_UID16 not in final .config
Requested value: CONFIG_UID16=y
Actual value:
Value requested for CONFIG_X86_32 not in final .config
Requested value: CONFIG_X86_32=y
Actual value:
Value requested for CONFIG_OUTPUT_FORMAT not in final .config
Requested value: CONFIG_OUTPUT_FORMAT="elf32-i386"
Actual value: CONFIG_OUTPUT_FORMAT="elf64-x86-64"
Value requested for CONFIG_ARCH_MMAP_RND_BITS_MIN not in final .config
Requested value: CONFIG_ARCH_MMAP_RND_BITS_MIN=8
Actual value: CONFIG_ARCH_MMAP_RND_BITS_MIN=28
Value requested for CONFIG_ARCH_MMAP_RND_BITS_MAX not in final .config
Requested value: CONFIG_ARCH_MMAP_RND_BITS_MAX=16
Actual value: CONFIG_ARCH_MMAP_RND_BITS_MAX=32
Value requested for CONFIG_PGTABLE_LEVELS not in final .config
Requested value: CONFIG_PGTABLE_LEVELS=2
Actual value: CONFIG_PGTABLE_LEVELS=5
Value requested for CONFIG_X86_BIGSMP not in final .config
Requested value: # CONFIG_X86_BIGSMP is not set
Actual value:
Value requested for CONFIG_X86_INTEL_QUARK not in final .config
Requested value: # CONFIG_X86_INTEL_QUARK is not set
Actual value:
Value requested for CONFIG_X86_RDC321X not in final .config
Requested value: # CONFIG_X86_RDC321X is not set
Actual value:
Value requested for CONFIG_X86_32_NON_STANDARD not in final .config
Requested value: # CONFIG_X86_32_NON_STANDARD is not set
Actual value:
Value requested for CONFIG_X86_32_IRIS not in final .config
Requested value: # CONFIG_X86_32_IRIS is not set
Actual value:
Value requested for CONFIG_M486SX not in final .config
Requested value: # CONFIG_M486SX is not set
Actual value:
Value requested for CONFIG_M486 not in final .config
Requested value: # CONFIG_M486 is not set
Actual value:
Value requested for CONFIG_M586 not in final .config
Requested value: # CONFIG_M586 is not set
Actual value:
Value requested for CONFIG_M586TSC not in final .config
Requested value: # CONFIG_M586TSC is not set
Actual value:
Value requested for CONFIG_M586MMX not in final .config
Requested value: # CONFIG_M586MMX is not set
Actual value:
Value requested for CONFIG_M686 not in final .config
Requested value: CONFIG_M686=y
Actual value:
Value requested for CONFIG_MPENTIUMII not in final .config
Requested value: # CONFIG_MPENTIUMII is not set
Actual value:
Value requested for CONFIG_MPENTIUMIII not in final .config
Requested value: # CONFIG_MPENTIUMIII is not set
Actual value:
Value requested for CONFIG_MPENTIUMM not in final .config
Requested value: # CONFIG_MPENTIUMM is not set
Actual value:
Value requested for CONFIG_MPENTIUM4 not in final .config
Requested value: # CONFIG_MPENTIUM4 is not set
Actual value:
Value requested for CONFIG_MK6 not in final .config
Requested value: # CONFIG_MK6 is not set
Actual value:
Value requested for CONFIG_MK7 not in final .config
Requested value: # CONFIG_MK7 is not set
Actual value:
Value requested for CONFIG_MCRUSOE not in final .config
Requested value: # CONFIG_MCRUSOE is not set
Actual value:
Value requested for CONFIG_MEFFICEON not in final .config
Requested value: # CONFIG_MEFFICEON is not set
Actual value:
Value requested for CONFIG_MWINCHIPC6 not in final .config
Requested value: # CONFIG_MWINCHIPC6 is not set
Actual value:
Value requested for CONFIG_MWINCHIP3D not in final .config
Requested value: # CONFIG_MWINCHIP3D is not set
Actual value:
Value requested for CONFIG_MELAN not in final .config
Requested value: # CONFIG_MELAN is not set
Actual value:
Value requested for CONFIG_MGEODEGX1 not in final .config
Requested value: # CONFIG_MGEODEGX1 is not set
Actual value:
Value requested for CONFIG_MGEODE_LX not in final .config
Requested value: # CONFIG_MGEODE_LX is not set
Actual value:
Value requested for CONFIG_MCYRIXIII not in final .config
Requested value: # CONFIG_MCYRIXIII is not set
Actual value:
Value requested for CONFIG_MVIAC3_2 not in final .config
Requested value: # CONFIG_MVIAC3_2 is not set
Actual value:
Value requested for CONFIG_MVIAC7 not in final .config
Requested value: # CONFIG_MVIAC7 is not set
Actual value:
Value requested for CONFIG_X86_GENERIC not in final .config
Requested value: # CONFIG_X86_GENERIC is not set
Actual value:
Value requested for CONFIG_X86_INTERNODE_CACHE_SHIFT not in final .config
Requested value: CONFIG_X86_INTERNODE_CACHE_SHIFT=5
Actual value: CONFIG_X86_INTERNODE_CACHE_SHIFT=6
Value requested for CONFIG_X86_L1_CACHE_SHIFT not in final .config
Requested value: CONFIG_X86_L1_CACHE_SHIFT=5
Actual value: CONFIG_X86_L1_CACHE_SHIFT=6
Value requested for CONFIG_X86_USE_PPRO_CHECKSUM not in final .config
Requested value: CONFIG_X86_USE_PPRO_CHECKSUM=y
Actual value:
Value requested for CONFIG_X86_MINIMUM_CPU_FAMILY not in final .config
Requested value: CONFIG_X86_MINIMUM_CPU_FAMILY=6
Actual value: CONFIG_X86_MINIMUM_CPU_FAMILY=64
Value requested for CONFIG_CPU_SUP_TRANSMETA_32 not in final .config
Requested value: CONFIG_CPU_SUP_TRANSMETA_32=y
Actual value:
Value requested for CONFIG_CPU_SUP_VORTEX_32 not in final .config
Requested value: CONFIG_CPU_SUP_VORTEX_32=y
Actual value:
Value requested for CONFIG_HPET_TIMER not in final .config
Requested value: # CONFIG_HPET_TIMER is not set
Actual value: CONFIG_HPET_TIMER=y
Value requested for CONFIG_NR_CPUS_RANGE_END not in final .config
Requested value: CONFIG_NR_CPUS_RANGE_END=8
Actual value: CONFIG_NR_CPUS_RANGE_END=512
Value requested for CONFIG_NR_CPUS_DEFAULT not in final .config
Requested value: CONFIG_NR_CPUS_DEFAULT=8
Actual value: CONFIG_NR_CPUS_DEFAULT=64
Value requested for CONFIG_X86_ANCIENT_MCE not in final .config
Requested value: # CONFIG_X86_ANCIENT_MCE is not set
Actual value:
Value requested for CONFIG_X86_LEGACY_VM86 not in final .config
Requested value: # CONFIG_X86_LEGACY_VM86 is not set
Actual value:
Value requested for CONFIG_X86_ESPFIX32 not in final .config
Requested value: CONFIG_X86_ESPFIX32=y
Actual value:
Value requested for CONFIG_TOSHIBA not in final .config
Requested value: # CONFIG_TOSHIBA is not set
Actual value:
Value requested for CONFIG_X86_REBOOTFIXUPS not in final .config
Requested value: # CONFIG_X86_REBOOTFIXUPS is not set
Actual value:
Value requested for CONFIG_MICROCODE_INITRD32 not in final .config
Requested value: CONFIG_MICROCODE_INITRD32=y
Actual value:
Value requested for CONFIG_NOHIGHMEM not in final .config
Requested value: # CONFIG_NOHIGHMEM is not set
Actual value:
Value requested for CONFIG_HIGHMEM4G not in final .config
Requested value: CONFIG_HIGHMEM4G=y
Actual value:
Value requested for CONFIG_HIGHMEM64G not in final .config
Requested value: # CONFIG_HIGHMEM64G is not set
Actual value:
Value requested for CONFIG_PAGE_OFFSET not in final .config
Requested value: CONFIG_PAGE_OFFSET=0xC0000000
Actual value:
Value requested for CONFIG_HIGHMEM not in final .config
Requested value: CONFIG_HIGHMEM=y
Actual value:
Value requested for CONFIG_X86_PAE not in final .config
Requested value: # CONFIG_X86_PAE is not set
Actual value:
Value requested for CONFIG_ARCH_FLATMEM_ENABLE not in final .config
Requested value: CONFIG_ARCH_FLATMEM_ENABLE=y
Actual value:
Value requested for CONFIG_ARCH_SELECT_MEMORY_MODEL not in final .config
Requested value: CONFIG_ARCH_SELECT_MEMORY_MODEL=y
Actual value:
Value requested for CONFIG_ILLEGAL_POINTER_VALUE not in final .config
Requested value: CONFIG_ILLEGAL_POINTER_VALUE=0
Actual value: CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
Value requested for CONFIG_HIGHPTE not in final .config
Requested value: # CONFIG_HIGHPTE is not set
Actual value:
Value requested for CONFIG_COMPAT_VDSO not in final .config
Requested value: # CONFIG_COMPAT_VDSO is not set
Actual value:
Value requested for CONFIG_FUNCTION_PADDING_CFI not in final .config
Requested value: CONFIG_FUNCTION_PADDING_CFI=0
Actual value: CONFIG_FUNCTION_PADDING_CFI=11
Value requested for CONFIG_FUNCTION_PADDING_BYTES not in final .config
Requested value: CONFIG_FUNCTION_PADDING_BYTES=4
Actual value: CONFIG_FUNCTION_PADDING_BYTES=16
Value requested for CONFIG_APM not in final .config
Requested value: # CONFIG_APM is not set
Actual value:
Value requested for CONFIG_X86_POWERNOW_K6 not in final .config
Requested value: # CONFIG_X86_POWERNOW_K6 is not set
Actual value:
Value requested for CONFIG_X86_POWERNOW_K7 not in final .config
Requested value: # CONFIG_X86_POWERNOW_K7 is not set
Actual value:
Value requested for CONFIG_X86_GX_SUSPMOD not in final .config
Requested value: # CONFIG_X86_GX_SUSPMOD is not set
Actual value:
Value requested for CONFIG_X86_SPEEDSTEP_ICH not in final .config
Requested value: # CONFIG_X86_SPEEDSTEP_ICH is not set
Actual value:
Value requested for CONFIG_X86_SPEEDSTEP_SMI not in final .config
Requested value: # CONFIG_X86_SPEEDSTEP_SMI is not set
Actual value:
Value requested for CONFIG_X86_CPUFREQ_NFORCE2 not in final .config
Requested value: # CONFIG_X86_CPUFREQ_NFORCE2 is not set
Actual value:
Value requested for CONFIG_X86_LONGRUN not in final .config
Requested value: # CONFIG_X86_LONGRUN is not set
Actual value:
Value requested for CONFIG_X86_LONGHAUL not in final .config
Requested value: # CONFIG_X86_LONGHAUL is not set
Actual value:
Value requested for CONFIG_X86_E_POWERSAVER not in final .config
Requested value: # CONFIG_X86_E_POWERSAVER is not set
Actual value:
Value requested for CONFIG_PCI_GOBIOS not in final .config
Requested value: # CONFIG_PCI_GOBIOS is not set
Actual value:
Value requested for CONFIG_PCI_GOMMCONFIG not in final .config
Requested value: # CONFIG_PCI_GOMMCONFIG is not set
Actual value:
Value requested for CONFIG_PCI_GODIRECT not in final .config
Requested value: # CONFIG_PCI_GODIRECT is not set
Actual value:
Value requested for CONFIG_PCI_GOANY not in final .config
Requested value: CONFIG_PCI_GOANY=y
Actual value:
Value requested for CONFIG_PCI_BIOS not in final .config
Requested value: CONFIG_PCI_BIOS=y
Actual value:
Value requested for CONFIG_ISA not in final .config
Requested value: # CONFIG_ISA is not set
Actual value:
Value requested for CONFIG_SCx200 not in final .config
Requested value: # CONFIG_SCx200 is not set
Actual value:
Value requested for CONFIG_OLPC not in final .config
Requested value: # CONFIG_OLPC is not set
Actual value:
Value requested for CONFIG_ALIX not in final .config
Requested value: # CONFIG_ALIX is not set
Actual value:
Value requested for CONFIG_NET5501 not in final .config
Requested value: # CONFIG_NET5501 is not set
Actual value:
Value requested for CONFIG_GEOS not in final .config
Requested value: # CONFIG_GEOS is not set
Actual value:
Value requested for CONFIG_COMPAT_32 not in final .config
Requested value: CONFIG_COMPAT_32=y
Actual value:
Value requested for CONFIG_HAVE_ATOMIC_IOMAP not in final .config
Requested value: CONFIG_HAVE_ATOMIC_IOMAP=y
Actual value:
Value requested for CONFIG_ARCH_32BIT_OFF_T not in final .config
Requested value: CONFIG_ARCH_32BIT_OFF_T=y
Actual value:
Value requested for CONFIG_ARCH_WANT_IPC_PARSE_VERSION not in final .config
Requested value: CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
Actual value:
Value requested for CONFIG_MODULES_USE_ELF_REL not in final .config
Requested value: CONFIG_MODULES_USE_ELF_REL=y
Actual value:
Value requested for CONFIG_ARCH_MMAP_RND_BITS not in final .config
Requested value: CONFIG_ARCH_MMAP_RND_BITS=8
Actual value: CONFIG_ARCH_MMAP_RND_BITS=28
Value requested for CONFIG_CLONE_BACKWARDS not in final .config
Requested value: CONFIG_CLONE_BACKWARDS=y
Actual value:
Value requested for CONFIG_OLD_SIGSUSPEND3 not in final .config
Requested value: CONFIG_OLD_SIGSUSPEND3=y
Actual value:
Value requested for CONFIG_OLD_SIGACTION not in final .config
Requested value: CONFIG_OLD_SIGACTION=y
Actual value:
Value requested for CONFIG_ARCH_SPLIT_ARG64 not in final .config
Requested value: CONFIG_ARCH_SPLIT_ARG64=y
Actual value:
Value requested for CONFIG_FUNCTION_ALIGNMENT not in final .config
Requested value: CONFIG_FUNCTION_ALIGNMENT=4
Actual value: CONFIG_FUNCTION_ALIGNMENT=16
Value requested for CONFIG_SELECT_MEMORY_MODEL not in final .config
Requested value: CONFIG_SELECT_MEMORY_MODEL=y
Actual value:
Value requested for CONFIG_FLATMEM_MANUAL not in final .config
Requested value: CONFIG_FLATMEM_MANUAL=y
Actual value:
Value requested for CONFIG_SPARSEMEM_MANUAL not in final .config
Requested value: # CONFIG_SPARSEMEM_MANUAL is not set
Actual value:
Value requested for CONFIG_FLATMEM not in final .config
Requested value: CONFIG_FLATMEM=y
Actual value:
Value requested for CONFIG_SPARSEMEM_STATIC not in final .config
Requested value: CONFIG_SPARSEMEM_STATIC=y
Actual value:
Value requested for CONFIG_BOUNCE not in final .config
Requested value: CONFIG_BOUNCE=y
Actual value:
Value requested for CONFIG_KMAP_LOCAL not in final .config
Requested value: CONFIG_KMAP_LOCAL=y
Actual value:
Value requested for CONFIG_HOTPLUG_PCI_COMPAQ not in final .config
Requested value: # CONFIG_HOTPLUG_PCI_COMPAQ is not set
Actual value:
Value requested for CONFIG_HOTPLUG_PCI_IBM not in final .config
Requested value: # CONFIG_HOTPLUG_PCI_IBM is not set
Actual value:
Value requested for CONFIG_EFI_CAPSULE_QUIRK_QUARK_CSH not in final .config
Requested value: CONFIG_EFI_CAPSULE_QUIRK_QUARK_CSH=y
Actual value:
Value requested for CONFIG_PCH_PHUB not in final .config
Requested value: # CONFIG_PCH_PHUB is not set
Actual value:
Value requested for CONFIG_SCSI_NSP32 not in final .config
Requested value: # CONFIG_SCSI_NSP32 is not set
Actual value:
Value requested for CONFIG_PATA_CS5520 not in final .config
Requested value: # CONFIG_PATA_CS5520 is not set
Actual value:
Value requested for CONFIG_PATA_CS5530 not in final .config
Requested value: # CONFIG_PATA_CS5530 is not set
Actual value:
Value requested for CONFIG_PATA_CS5535 not in final .config
Requested value: # CONFIG_PATA_CS5535 is not set
Actual value:
Value requested for CONFIG_PATA_CS5536 not in final .config
Requested value: # CONFIG_PATA_CS5536 is not set
Actual value:
Value requested for CONFIG_PATA_SC1200 not in final .config
Requested value: # CONFIG_PATA_SC1200 is not set
Actual value:
Value requested for CONFIG_PCH_GBE not in final .config
Requested value: # CONFIG_PCH_GBE is not set
Actual value:
Value requested for CONFIG_INPUT_WISTRON_BTNS not in final .config
Requested value: # CONFIG_INPUT_WISTRON_BTNS is not set
Actual value:
Value requested for CONFIG_SERIAL_TIMBERDALE not in final .config
Requested value: # CONFIG_SERIAL_TIMBERDALE is not set
Actual value:
Value requested for CONFIG_SERIAL_PCH_UART not in final .config
Requested value: # CONFIG_SERIAL_PCH_UART is not set
Actual value:
Value requested for CONFIG_HW_RANDOM_GEODE not in final .config
Requested value: CONFIG_HW_RANDOM_GEODE=y
Actual value:
Value requested for CONFIG_SONYPI not in final .config
Requested value: # CONFIG_SONYPI is not set
Actual value:
Value requested for CONFIG_PC8736x_GPIO not in final .config
Requested value: # CONFIG_PC8736x_GPIO is not set
Actual value:
Value requested for CONFIG_NSC_GPIO not in final .config
Requested value: # CONFIG_NSC_GPIO is not set
Actual value:
Value requested for CONFIG_I2C_EG20T not in final .config
Requested value: # CONFIG_I2C_EG20T is not set
Actual value:
Value requested for CONFIG_SCx200_ACB not in final .config
Requested value: # CONFIG_SCx200_ACB is not set
Actual value:
Value requested for CONFIG_PTP_1588_CLOCK_PCH not in final .config
Requested value: # CONFIG_PTP_1588_CLOCK_PCH is not set
Actual value:
Value requested for CONFIG_SBC8360_WDT not in final .config
Requested value: # CONFIG_SBC8360_WDT is not set
Actual value:
Value requested for CONFIG_SBC7240_WDT not in final .config
Requested value: # CONFIG_SBC7240_WDT is not set
Actual value:
Value requested for CONFIG_MFD_CS5535 not in final .config
Requested value: # CONFIG_MFD_CS5535 is not set
Actual value:
Value requested for CONFIG_AGP_ALI not in final .config
Requested value: # CONFIG_AGP_ALI is not set
Actual value:
Value requested for CONFIG_AGP_ATI not in final .config
Requested value: # CONFIG_AGP_ATI is not set
Actual value:
Value requested for CONFIG_AGP_AMD not in final .config
Requested value: # CONFIG_AGP_AMD is not set
Actual value:
Value requested for CONFIG_AGP_NVIDIA not in final .config
Requested value: # CONFIG_AGP_NVIDIA is not set
Actual value:
Value requested for CONFIG_AGP_SWORKS not in final .config
Requested value: # CONFIG_AGP_SWORKS is not set
Actual value:
Value requested for CONFIG_AGP_EFFICEON not in final .config
Requested value: # CONFIG_AGP_EFFICEON is not set
Actual value:
Value requested for CONFIG_SND_PCM not in final .config
Requested value: CONFIG_SND_PCM=y
Actual value: CONFIG_SND_PCM=m
Value requested for CONFIG_SND_HWDEP not in final .config
Requested value: CONFIG_SND_HWDEP=y
Actual value: CONFIG_SND_HWDEP=m
Value requested for CONFIG_SND_DYNAMIC_MINORS not in final .config
Requested value: # CONFIG_SND_DYNAMIC_MINORS is not set
Actual value: CONFIG_SND_DYNAMIC_MINORS=y
Value requested for CONFIG_SND_CS5530 not in final .config
Requested value: # CONFIG_SND_CS5530 is not set
Actual value:
Value requested for CONFIG_SND_CS5535AUDIO not in final .config
Requested value: # CONFIG_SND_CS5535AUDIO is not set
Actual value:
Value requested for CONFIG_SND_SIS7019 not in final .config
Requested value: # CONFIG_SND_SIS7019 is not set
Actual value:
Value requested for CONFIG_SND_HDA not in final .config
Requested value: CONFIG_SND_HDA=y
Actual value: CONFIG_SND_HDA=m
Value requested for CONFIG_SND_HDA_CORE not in final .config
Requested value: CONFIG_SND_HDA_CORE=y
Actual value: CONFIG_SND_HDA_CORE=m
Value requested for CONFIG_SND_INTEL_DSP_CONFIG not in final .config
Requested value: CONFIG_SND_INTEL_DSP_CONFIG=y
Actual value: CONFIG_SND_INTEL_DSP_CONFIG=m
Value requested for CONFIG_SND_INTEL_SOUNDWIRE_ACPI not in final .config
Requested value: CONFIG_SND_INTEL_SOUNDWIRE_ACPI=y
Actual value: CONFIG_SND_INTEL_SOUNDWIRE_ACPI=m
Value requested for CONFIG_LEDS_OT200 not in final .config
Requested value: # CONFIG_LEDS_OT200 is not set
Actual value:
Value requested for CONFIG_PCH_DMA not in final .config
Requested value: # CONFIG_PCH_DMA is not set
Actual value:
Value requested for CONFIG_CLKSRC_I8253 not in final .config
Requested value: CONFIG_CLKSRC_I8253=y
Actual value:
Value requested for CONFIG_MAILBOX not in final .config
Requested value: # CONFIG_MAILBOX is not set
Actual value: CONFIG_MAILBOX=y
Value requested for CONFIG_CRYPTO_SERPENT_SSE2_586 not in final .config
Requested value: # CONFIG_CRYPTO_SERPENT_SSE2_586 is not set
Actual value:
Value requested for CONFIG_CRYPTO_TWOFISH_586 not in final .config
Requested value: # CONFIG_CRYPTO_TWOFISH_586 is not set
Actual value:
Value requested for CONFIG_CRYPTO_DEV_GEODE not in final .config
Requested value: # CONFIG_CRYPTO_DEV_GEODE is not set
Actual value:
Value requested for CONFIG_CRYPTO_DEV_HIFN_795X not in final .config
Requested value: # CONFIG_CRYPTO_DEV_HIFN_795X is not set
Actual value:
Value requested for CONFIG_CRYPTO_LIB_POLY1305_RSIZE not in final .config
Requested value: CONFIG_CRYPTO_LIB_POLY1305_RSIZE=1
Actual value: CONFIG_CRYPTO_LIB_POLY1305_RSIZE=11
Value requested for CONFIG_AUDIT_GENERIC not in final .config
Requested value: CONFIG_AUDIT_GENERIC=y
Actual value:
Value requested for CONFIG_GENERIC_VDSO_32 not in final .config
Requested value: CONFIG_GENERIC_VDSO_32=y
Actual value:
Value requested for CONFIG_DEBUG_KMAP_LOCAL not in final .config
Requested value: # CONFIG_DEBUG_KMAP_LOCAL is not set
Actual value:
Value requested for CONFIG_DEBUG_HIGHMEM not in final .config
Requested value: # CONFIG_DEBUG_HIGHMEM is not set
Actual value:
Value requested for CONFIG_HAVE_DEBUG_STACKOVERFLOW not in final .config
Requested value: CONFIG_HAVE_DEBUG_STACKOVERFLOW=y
Actual value:
Value requested for CONFIG_DEBUG_STACKOVERFLOW not in final .config
Requested value: # CONFIG_DEBUG_STACKOVERFLOW is not set
Actual value:
Value requested for CONFIG_HAVE_FUNCTION_GRAPH_TRACER not in final .config
Requested value: CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
Actual value:
Value requested for CONFIG_HAVE_FUNCTION_GRAPH_RETVAL not in final .config
Requested value: CONFIG_HAVE_FUNCTION_GRAPH_RETVAL=y
Actual value:
Value requested for CONFIG_DRM_KUNIT_TEST not in final .config
Requested value: CONFIG_DRM_KUNIT_TEST=m
Actual value:
Value requested for CONFIG_DRM_XE_WERROR not in final .config
Requested value: CONFIG_DRM_XE_WERROR=y
Actual value:
Value requested for CONFIG_DRM_XE_DEBUG not in final .config
Requested value: CONFIG_DRM_XE_DEBUG=y
Actual value:
Value requested for CONFIG_DRM_XE_DEBUG_MEM not in final .config
Requested value: CONFIG_DRM_XE_DEBUG_MEM=y
Actual value:
Value requested for CONFIG_DRM_XE_KUNIT_TEST not in final .config
Requested value: CONFIG_DRM_XE_KUNIT_TEST=m
Actual value:
++ nproc
+ make -j48 ARCH=i386 olddefconfig
GEN Makefile
WARNING: unmet direct dependencies detected for FB_IOMEM_HELPERS
Depends on [n]: HAS_IOMEM [=y] && FB_CORE [=n]
Selected by [m]:
- DRM_XE_DISPLAY [=y] && HAS_IOMEM [=y] && DRM [=y] && DRM_XE [=m] && DRM_XE [=m]=m [=m]
#
# configuration written to .config
#
++ nproc
+ make -j48 ARCH=i386
SYNC include/config/auto.conf.cmd
GEN Makefile
WARNING: unmet direct dependencies detected for FB_IOMEM_HELPERS
Depends on [n]: HAS_IOMEM [=y] && FB_CORE [=n]
Selected by [m]:
- DRM_XE_DISPLAY [=y] && HAS_IOMEM [=y] && DRM [=y] && DRM_XE [=m] && DRM_XE [=m]=m [=m]
WARNING: unmet direct dependencies detected for FB_IOMEM_HELPERS
Depends on [n]: HAS_IOMEM [=y] && FB_CORE [=n]
Selected by [m]:
- DRM_XE_DISPLAY [=y] && HAS_IOMEM [=y] && DRM [=y] && DRM_XE [=m] && DRM_XE [=m]=m [=m]
WARNING: unmet direct dependencies detected for FB_IOMEM_HELPERS
Depends on [n]: HAS_IOMEM [=y] && FB_CORE [=n]
Selected by [m]:
- DRM_XE_DISPLAY [=y] && HAS_IOMEM [=y] && DRM [=y] && DRM_XE [=m] && DRM_XE [=m]=m [=m]
GEN Makefile
WRAP arch/x86/include/generated/uapi/asm/bpf_perf_event.h
WRAP arch/x86/include/generated/uapi/asm/errno.h
WRAP arch/x86/include/generated/uapi/asm/fcntl.h
WRAP arch/x86/include/generated/uapi/asm/ioctl.h
UPD include/generated/uapi/linux/version.h
WRAP arch/x86/include/generated/uapi/asm/ioctls.h
WRAP arch/x86/include/generated/uapi/asm/param.h
WRAP arch/x86/include/generated/uapi/asm/ipcbuf.h
WRAP arch/x86/include/generated/uapi/asm/poll.h
WRAP arch/x86/include/generated/uapi/asm/resource.h
WRAP arch/x86/include/generated/uapi/asm/socket.h
WRAP arch/x86/include/generated/uapi/asm/sockios.h
WRAP arch/x86/include/generated/uapi/asm/termbits.h
WRAP arch/x86/include/generated/uapi/asm/termios.h
WRAP arch/x86/include/generated/uapi/asm/types.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_64.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_32.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_x32.h
SYSTBL arch/x86/include/generated/asm/syscalls_32.h
WRAP arch/x86/include/generated/asm/early_ioremap.h
WRAP arch/x86/include/generated/asm/irq_regs.h
UPD include/generated/compile.h
WRAP arch/x86/include/generated/asm/mcs_spinlock.h
WRAP arch/x86/include/generated/asm/kmap_size.h
WRAP arch/x86/include/generated/asm/local64.h
WRAP arch/x86/include/generated/asm/mmiowb.h
HOSTCC arch/x86/tools/relocs_32.o
WRAP arch/x86/include/generated/asm/module.lds.h
WRAP arch/x86/include/generated/asm/rwonce.h
HOSTCC arch/x86/tools/relocs_64.o
WRAP arch/x86/include/generated/asm/unaligned.h
HOSTCC arch/x86/tools/relocs_common.o
HOSTCC scripts/kallsyms
HOSTCC scripts/sorttable
HOSTCC scripts/asn1_compiler
HOSTCC scripts/selinux/genheaders/genheaders
HOSTCC scripts/selinux/mdp/mdp
HOSTLD arch/x86/tools/relocs
UPD include/config/kernel.release
UPD include/generated/utsrelease.h
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
CC scripts/mod/devicetable-offsets.s
UPD scripts/mod/devicetable-offsets.h
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/sumversion.o
HOSTCC scripts/mod/symsearch.o
HOSTLD scripts/mod/modpost
CC kernel/bounds.s
CHKSHA1 /workspace/kernel/include/linux/atomic/atomic-arch-fallback.h
CHKSHA1 /workspace/kernel/include/linux/atomic/atomic-long.h
CHKSHA1 /workspace/kernel/include/linux/atomic/atomic-instrumented.h
UPD include/generated/timeconst.h
UPD include/generated/bounds.h
CC arch/x86/kernel/asm-offsets.s
UPD include/generated/asm-offsets.h
CALL /workspace/kernel/scripts/checksyscalls.sh
LDS scripts/module.lds
CC init/main.o
CC ipc/util.o
HOSTCC usr/gen_init_cpio
CC init/do_mounts.o
CC certs/system_keyring.o
CC init/do_mounts_initrd.o
CC ipc/msgutil.o
CC init/initramfs.o
UPD init/utsversion-tmp.h
CC init/calibrate.o
CC io_uring/io_uring.o
CC ipc/msg.o
CC mm/filemap.o
AS arch/x86/lib/atomic64_cx8_32.o
CC init/init_task.o
CC arch/x86/video/video-common.o
CC ipc/sem.o
CC mm/mempool.o
AS arch/x86/lib/checksum_32.o
CC io_uring/opdef.o
AR arch/x86/net/built-in.a
CC arch/x86/power/cpu.o
AR arch/x86/crypto/built-in.a
CC security/commoncap.o
CC arch/x86/pci/i386.o
CC arch/x86/realmode/init.o
GEN security/selinux/flask.h security/selinux/av_permissions.h
CC security/keys/gc.o
AR net/802/built-in.a
CC arch/x86/mm/pat/set_memory.o
AR arch/x86/platform/atom/built-in.a
AR arch/x86/virt/svm/built-in.a
CC net/ethernet/eth.o
AR drivers/cache/built-in.a
CC block/partitions/core.o
AR virt/lib/built-in.a
CC lib/math/div64.o
CC security/integrity/iint.o
CC net/core/sock.o
AR sound/i2c/other/built-in.a
CC ipc/shm.o
CC security/selinux/avc.o
AR sound/drivers/opl3/built-in.a
CC sound/core/seq/seq.o
CC arch/x86/events/amd/core.o
AR virt/built-in.a
CC security/integrity/integrity_audit.o
CC ipc/syscall.o
CC fs/notify/dnotify/dnotify.o
AR sound/isa/ad1816a/built-in.a
CC arch/x86/kernel/fpu/init.o
AR arch/x86/virt/vmx/built-in.a
CC io_uring/kbuf.o
AR arch/x86/platform/ce4100/built-in.a
AR drivers/irqchip/built-in.a
AR sound/i2c/built-in.a
AR sound/isa/ad1848/built-in.a
CC arch/x86/platform/efi/memmap.o
CC arch/x86/entry/vdso/vma.o
AR arch/x86/virt/built-in.a
CC io_uring/rsrc.o
AR sound/drivers/opl4/built-in.a
CC arch/x86/lib/cmdline.o
CC net/sched/sch_generic.o
AR drivers/bus/mhi/built-in.a
AR sound/isa/cs423x/built-in.a
CC kernel/sched/core.o
AR sound/drivers/mpu401/built-in.a
AR drivers/bus/built-in.a
AR sound/isa/es1688/built-in.a
CC io_uring/notif.o
AR sound/drivers/vx/built-in.a
AR sound/isa/galaxy/built-in.a
AR drivers/pwm/built-in.a
AR sound/drivers/pcsp/built-in.a
CC crypto/asymmetric_keys/asymmetric_type.o
AR sound/isa/gus/built-in.a
AR sound/drivers/built-in.a
CC drivers/pci/msi/pcidev_msi.o
AR sound/isa/msnd/built-in.a
CC drivers/pci/msi/api.o
CC lib/math/gcd.o
AR sound/isa/opti9xx/built-in.a
AR sound/isa/sb/built-in.a
AR sound/isa/wavefront/built-in.a
AS arch/x86/lib/cmpxchg8b_emu.o
AR sound/isa/wss/built-in.a
CC arch/x86/lib/cpu.o
AR sound/isa/built-in.a
CC lib/math/lcm.o
CC arch/x86/kernel/cpu/mce/core.o
CC lib/math/int_log.o
CC arch/x86/kernel/acpi/boot.o
GEN usr/initramfs_data.cpio
COPY usr/initramfs_inc_data
AS usr/initramfs_data.o
HOSTCC certs/extract-cert
AR usr/built-in.a
CC lib/math/int_pow.o
CC arch/x86/kernel/acpi/sleep.o
CC arch/x86/kernel/fpu/bugs.o
CC lib/math/int_sqrt.o
CC arch/x86/kernel/fpu/core.o
CC lib/math/reciprocal_div.o
AS arch/x86/realmode/rm/header.o
AR arch/x86/video/built-in.a
CC lib/math/rational.o
AS arch/x86/realmode/rm/trampoline_32.o
CC io_uring/tctx.o
CC sound/core/seq/seq_lock.o
CC arch/x86/lib/delay.o
CERT certs/x509_certificate_list
CERT certs/signing_key.x509
AS certs/system_certificates.o
AS arch/x86/realmode/rm/stack.o
AS arch/x86/realmode/rm/reboot.o
AR certs/built-in.a
AS arch/x86/realmode/rm/wakeup_asm.o
CC sound/core/sound.o
CC arch/x86/realmode/rm/wakemain.o
CC arch/x86/platform/efi/quirks.o
CC arch/x86/platform/efi/efi.o
AR security/integrity/built-in.a
CC arch/x86/platform/efi/efi_32.o
CC arch/x86/pci/init.o
CC arch/x86/pci/pcbios.o
CC ipc/ipc_sysctl.o
CC sound/core/seq/seq_clientmgr.o
CC kernel/sched/fair.o
CC mm/oom_kill.o
CC security/keys/key.o
AR fs/notify/dnotify/built-in.a
CC crypto/asymmetric_keys/restrict.o
CC arch/x86/realmode/rm/video-mode.o
CC fs/notify/inotify/inotify_fsnotify.o
AR fs/notify/fanotify/built-in.a
CC arch/x86/entry/vdso/extable.o
CC arch/x86/power/hibernate_32.o
CC drivers/pci/msi/msi.o
CC init/version.o
CC arch/x86/kernel/cpu/mtrr/mtrr.o
AS arch/x86/realmode/rm/copy.o
AS arch/x86/lib/getuser.o
CC block/partitions/msdos.o
AS arch/x86/realmode/rm/bioscall.o
GEN arch/x86/lib/inat-tables.c
CC arch/x86/realmode/rm/regs.o
AR lib/math/built-in.a
CC block/partitions/efi.o
CC arch/x86/kernel/cpu/mtrr/if.o
CC lib/crypto/mpi/generic_mpih-lshift.o
CC arch/x86/lib/insn-eval.o
CC lib/crypto/memneq.o
CC arch/x86/mm/pat/memtype.o
CC arch/x86/realmode/rm/video-vga.o
CC arch/x86/mm/pat/memtype_interval.o
CC fs/notify/fsnotify.o
CC lib/crypto/mpi/generic_mpih-mul1.o
CC arch/x86/realmode/rm/video-vesa.o
CC arch/x86/events/amd/lbr.o
CC arch/x86/kernel/cpu/mtrr/generic.o
CC crypto/asymmetric_keys/signature.o
CC arch/x86/realmode/rm/video-bios.o
CC crypto/asymmetric_keys/public_key.o
CC arch/x86/events/amd/ibs.o
AR net/ethernet/built-in.a
AS arch/x86/kernel/acpi/wakeup_32.o
CC sound/core/init.o
CC arch/x86/events/amd/uncore.o
CC block/bdev.o
CC net/netlink/af_netlink.o
CC fs/notify/inotify/inotify_user.o
PASYMS arch/x86/realmode/rm/pasyms.h
CC net/netlink/genetlink.o
LDS arch/x86/realmode/rm/realmode.lds
CC arch/x86/kernel/cpu/mtrr/cleanup.o
CC arch/x86/kernel/acpi/cstate.o
LD arch/x86/realmode/rm/realmode.elf
RELOCS arch/x86/realmode/rm/realmode.relocs
OBJCOPY arch/x86/realmode/rm/realmode.bin
AS arch/x86/realmode/rmpiggy.o
CC io_uring/filetable.o
CC arch/x86/kernel/cpu/mtrr/amd.o
AR arch/x86/realmode/built-in.a
CC arch/x86/pci/mmconfig_32.o
CC drivers/pci/pcie/portdrv.o
CC arch/x86/pci/direct.o
AR init/built-in.a
LDS arch/x86/entry/vdso/vdso32/vdso32.lds
CC mm/fadvise.o
AS arch/x86/power/hibernate_asm_32.o
CC arch/x86/power/hibernate.o
CC arch/x86/kernel/cpu/mtrr/cyrix.o
CC arch/x86/kernel/cpu/mtrr/centaur.o
AS arch/x86/entry/vdso/vdso32/note.o
CC ipc/mqueue.o
CC security/selinux/hooks.o
AS arch/x86/entry/vdso/vdso32/system_call.o
AS arch/x86/platform/efi/efi_stub_32.o
CC drivers/pci/hotplug/pci_hotplug_core.o
CC arch/x86/platform/efi/runtime-map.o
CC arch/x86/kernel/fpu/regset.o
AS arch/x86/entry/vdso/vdso32/sigreturn.o
CC arch/x86/kernel/fpu/signal.o
CC arch/x86/entry/vdso/vdso32/vclock_gettime.o
CC lib/crypto/mpi/generic_mpih-mul2.o
CC net/sched/sch_mq.o
CC net/core/request_sock.o
CC arch/x86/kernel/apic/apic.o
CC security/keys/keyring.o
CC drivers/pci/msi/irqdomain.o
CC arch/x86/kernel/apic/apic_common.o
CC arch/x86/lib/insn.o
ASN.1 crypto/asymmetric_keys/x509.asn1.[ch]
ASN.1 crypto/asymmetric_keys/x509_akid.asn1.[ch]
CC arch/x86/pci/mmconfig-shared.o
CC crypto/asymmetric_keys/x509_loader.o
AR arch/x86/mm/pat/built-in.a
CC arch/x86/mm/init.o
CC arch/x86/kernel/cpu/mce/severity.o
AR arch/x86/kernel/acpi/built-in.a
CC arch/x86/mm/init_32.o
AR block/partitions/built-in.a
CC security/selinux/selinuxfs.o
AR arch/x86/entry/vsyscall/built-in.a
CC block/fops.o
CC drivers/pci/pcie/rcec.o
CC sound/core/seq/seq_memory.o
CC net/sched/sch_frag.o
CC arch/x86/mm/fault.o
CC arch/x86/lib/kaslr.o
CC crypto/asymmetric_keys/x509_public_key.o
AS arch/x86/entry/entry.o
AS arch/x86/entry/entry_32.o
CC arch/x86/kernel/cpu/mce/genpool.o
CC arch/x86/kernel/cpu/mtrr/legacy.o
CC sound/core/seq/seq_queue.o
CC fs/nfs_common/nfsacl.o
CC arch/x86/lib/memcpy_32.o
CC fs/nfs_common/grace.o
AR arch/x86/power/built-in.a
CC drivers/pci/pcie/aspm.o
AR fs/notify/inotify/built-in.a
CC arch/x86/events/intel/core.o
CC fs/notify/notification.o
CC arch/x86/events/intel/bts.o
CC arch/x86/events/zhaoxin/core.o
CC lib/crypto/mpi/generic_mpih-mul3.o
CC arch/x86/events/intel/ds.o
CC arch/x86/mm/ioremap.o
AR drivers/pci/controller/dwc/built-in.a
AS arch/x86/lib/memmove_32.o
CC mm/maccess.o
AR drivers/pci/controller/mobiveil/built-in.a
CC arch/x86/entry/vdso/vdso32/vgetcpu.o
AR drivers/pci/controller/built-in.a
CC arch/x86/lib/misc.o
AR arch/x86/platform/efi/built-in.a
CC mm/page-writeback.o
AR arch/x86/platform/geode/built-in.a
AR arch/x86/events/amd/built-in.a
CC arch/x86/lib/pc-conf-reg.o
AS arch/x86/lib/putuser.o
AR arch/x86/platform/iris/built-in.a
HOSTCC arch/x86/entry/vdso/vdso2c
CC arch/x86/platform/intel/iosf_mbi.o
AS arch/x86/lib/retpoline.o
CC arch/x86/kernel/fpu/xstate.o
CC lib/crypto/mpi/generic_mpih-rshift.o
CC arch/x86/kernel/cpu/mce/intel.o
AR arch/x86/kernel/cpu/mtrr/built-in.a
CC drivers/pci/hotplug/acpi_pcihp.o
CC sound/core/memory.o
AR drivers/pci/msi/built-in.a
CC arch/x86/lib/string_32.o
CC block/bio.o
CC arch/x86/mm/extable.o
CC arch/x86/lib/strstr_32.o
ASN.1 crypto/asymmetric_keys/pkcs7.asn1.[ch]
CC crypto/api.o
CC crypto/asymmetric_keys/pkcs7_trust.o
CC arch/x86/lib/usercopy.o
CC crypto/cipher.o
CC drivers/pci/pcie/pme.o
CC lib/crypto/mpi/generic_mpih-sub1.o
CC arch/x86/mm/mmap.o
CC arch/x86/pci/fixup.o
CC arch/x86/entry/vdso/vdso32-setup.o
CC io_uring/rw.o
CC lib/crypto/mpi/generic_mpih-add1.o
CC lib/crypto/mpi/ec.o
CC lib/crypto/mpi/mpicoder.o
CC fs/notify/group.o
CC fs/notify/mark.o
AR fs/nfs_common/built-in.a
AR drivers/pci/switch/built-in.a
CC drivers/pci/access.o
CC sound/core/seq/seq_fifo.o
CC security/keys/keyctl.o
CC arch/x86/lib/usercopy_32.o
CC sound/core/seq/seq_prioq.o
CC net/core/skbuff.o
CC security/selinux/netlink.o
CC crypto/asymmetric_keys/pkcs7_verify.o
VDSO arch/x86/entry/vdso/vdso32.so.dbg
CC arch/x86/kernel/cpu/mce/amd.o
OBJCOPY arch/x86/entry/vdso/vdso32.so
VDSO2C arch/x86/entry/vdso/vdso-image-32.c
CC arch/x86/kernel/cpu/cacheinfo.o
CC ipc/namespace.o
CC ipc/mq_sysctl.o
CC arch/x86/entry/vdso/vdso-image-32.o
CC arch/x86/kernel/cpu/microcode/core.o
CC block/elevator.o
CC security/selinux/nlmsgtab.o
AR arch/x86/events/zhaoxin/built-in.a
CC arch/x86/mm/pgtable.o
AR arch/x86/platform/intel-mid/built-in.a
CC net/sched/sch_api.o
AR arch/x86/platform/intel/built-in.a
CC sound/core/control.o
AR drivers/pci/hotplug/built-in.a
AR arch/x86/platform/intel-quark/built-in.a
CC drivers/pci/bus.o
AR arch/x86/platform/olpc/built-in.a
AR arch/x86/platform/scx200/built-in.a
CC arch/x86/lib/msr-smp.o
AR arch/x86/platform/ts5500/built-in.a
CC arch/x86/lib/cache-smp.o
CC arch/x86/events/intel/knc.o
AR arch/x86/platform/uv/built-in.a
AR arch/x86/platform/built-in.a
CC block/blk-core.o
CC arch/x86/kernel/kprobes/core.o
LDS arch/x86/kernel/vmlinux.lds
AR arch/x86/entry/vdso/built-in.a
CC arch/x86/entry/syscall_32.o
CC security/lsm_syscalls.o
CC lib/crypto/utils.o
CC arch/x86/kernel/cpu/mce/threshold.o
AR drivers/pci/pcie/built-in.a
CC net/sched/sch_blackhole.o
CC arch/x86/kernel/apic/apic_noop.o
CC net/sched/cls_api.o
CC arch/x86/lib/msr.o
AR net/bpf/built-in.a
AR sound/pci/ac97/built-in.a
CC crypto/compress.o
CC crypto/asymmetric_keys/x509.asn1.o
AR sound/pci/ali5451/built-in.a
AR sound/pci/asihpi/built-in.a
CC crypto/asymmetric_keys/x509_akid.asn1.o
AS arch/x86/lib/msr-reg.o
AR sound/pci/au88x0/built-in.a
AR sound/pci/aw2/built-in.a
CC arch/x86/lib/msr-reg-export.o
CC crypto/asymmetric_keys/x509_cert_parser.o
AR sound/pci/ctxfi/built-in.a
CC sound/core/seq/seq_timer.o
AR sound/pci/ca0106/built-in.a
CC drivers/video/console/dummycon.o
AR sound/pci/cs46xx/built-in.a
CC arch/x86/events/intel/lbr.o
AR arch/x86/kernel/fpu/built-in.a
AR sound/pci/cs5535audio/built-in.a
AS arch/x86/kernel/head_32.o
CC net/netlink/policy.o
AR sound/pci/lola/built-in.a
AR ipc/built-in.a
CC drivers/video/console/vgacon.o
CC arch/x86/pci/acpi.o
AR sound/pci/lx6464es/built-in.a
CC fs/notify/fdinfo.o
AR sound/pci/echoaudio/built-in.a
AR sound/pci/emu10k1/built-in.a
AS arch/x86/lib/hweight.o
AR sound/pci/ice1712/built-in.a
AR sound/pci/hda/built-in.a
CC kernel/sched/build_policy.o
CC [M] sound/pci/hda/hda_bind.o
CC crypto/asymmetric_keys/pkcs7.asn1.o
AR sound/pci/korg1212/built-in.a
CC arch/x86/pci/legacy.o
CC lib/crypto/mpi/mpi-add.o
CC arch/x86/pci/irq.o
CC security/selinux/netif.o
CC arch/x86/kernel/cpu/microcode/intel.o
CC arch/x86/pci/common.o
CC kernel/sched/build_utility.o
CC drivers/pci/probe.o
CC [M] sound/pci/hda/hda_codec.o
CC arch/x86/kernel/apic/ipi.o
CC sound/core/seq/seq_system.o
CC arch/x86/mm/physaddr.o
CC crypto/algapi.o
CC drivers/pci/host-bridge.o
CC sound/core/seq/seq_ports.o
CC sound/core/seq/seq_info.o
CC security/min_addr.o
CC security/keys/permission.o
CC crypto/asymmetric_keys/pkcs7_parser.o
CC net/core/datagram.o
CC io_uring/net.o
AR fs/notify/built-in.a
CC arch/x86/kernel/kprobes/opt.o
CC io_uring/poll.o
CC fs/iomap/trace.o
CC mm/folio-compat.o
CC arch/x86/lib/iomem.o
CC io_uring/uring_cmd.o
CC fs/iomap/iter.o
CC fs/quota/dquot.o
CC io_uring/openclose.o
CC lib/crypto/mpi/mpi-bit.o
CC arch/x86/kernel/apic/vector.o
CC io_uring/sqpoll.o
CC lib/crypto/mpi/mpi-cmp.o
CC arch/x86/mm/tlb.o
CC fs/proc/task_mmu.o
CC arch/x86/events/intel/p4.o
AR net/netlink/built-in.a
CC fs/proc/inode.o
CC arch/x86/kernel/cpu/microcode/amd.o
CC arch/x86/entry/common.o
CC fs/proc/root.o
CC security/security.o
CC fs/kernfs/mount.o
CC arch/x86/pci/early.o
AR arch/x86/kernel/cpu/mce/built-in.a
AR drivers/video/console/built-in.a
CC arch/x86/kernel/head32.o
AR crypto/asymmetric_keys/built-in.a
CC drivers/video/backlight/backlight.o
CC arch/x86/kernel/ebda.o
CC arch/x86/lib/atomic64_32.o
CC sound/core/seq/seq_dummy.o
CC security/keys/process_keys.o
CC arch/x86/lib/inat.o
CC drivers/pci/remove.o
CC net/core/stream.o
CC fs/sysfs/file.o
CC arch/x86/events/intel/p6.o
CC fs/iomap/buffered-io.o
CC block/blk-sysfs.o
AR arch/x86/lib/built-in.a
AR arch/x86/lib/lib.a
CC crypto/scatterwalk.o
CC mm/readahead.o
CC fs/devpts/inode.o
CC lib/crypto/mpi/mpi-sub-ui.o
CC arch/x86/events/intel/pt.o
AR arch/x86/kernel/kprobes/built-in.a
CC lib/crypto/chacha.o
CC security/selinux/netnode.o
CC net/sched/act_api.o
CC kernel/locking/mutex.o
CC kernel/locking/semaphore.o
CC crypto/proc.o
CC arch/x86/events/intel/uncore.o
CC arch/x86/pci/bus_numa.o
CC lib/crypto/aes.o
CC lib/crypto/arc4.o
CC fs/proc/base.o
CC fs/kernfs/inode.o
CC net/sched/sch_fifo.o
AR sound/core/seq/built-in.a
AR arch/x86/kernel/cpu/microcode/built-in.a
CC sound/core/misc.o
CC fs/proc/generic.o
CC arch/x86/kernel/cpu/scattered.o
CC sound/core/device.o
AS arch/x86/entry/thunk.o
CC block/blk-flush.o
AR arch/x86/entry/built-in.a
CC crypto/aead.o
CC net/sched/cls_cgroup.o
CC arch/x86/mm/cpu_entry_area.o
CC drivers/pci/pci.o
CC fs/iomap/direct-io.o
AR drivers/video/backlight/built-in.a
AR drivers/video/fbdev/core/built-in.a
CC fs/iomap/fiemap.o
AR drivers/video/fbdev/omap/built-in.a
CC io_uring/xattr.o
AR drivers/video/fbdev/omap2/omapfb/dss/built-in.a
AR drivers/video/fbdev/omap2/omapfb/displays/built-in.a
CC fs/sysfs/dir.o
CC fs/iomap/seek.o
AR drivers/video/fbdev/omap2/omapfb/built-in.a
AR drivers/video/fbdev/omap2/built-in.a
CC drivers/video/aperture.o
AR drivers/video/fbdev/built-in.a
CC arch/x86/mm/maccess.o
CC lib/crypto/mpi/mpi-div.o
CC security/keys/request_key.o
CC net/core/scm.o
CC [M] sound/pci/hda/hda_jack.o
CC arch/x86/kernel/cpu/topology_common.o
AR fs/devpts/built-in.a
CC net/core/gen_stats.o
CC drivers/video/cmdline.o
CC arch/x86/mm/pgprot.o
CC sound/core/info.o
CC lib/crypto/gf128mul.o
CC block/blk-settings.o
CC arch/x86/kernel/apic/init.o
CC [M] sound/pci/hda/hda_auto_parser.o
CC arch/x86/pci/amd_bus.o
CC [M] sound/pci/hda/hda_sysfs.o
CC security/keys/request_key_auth.o
CC drivers/video/nomodeset.o
CC fs/netfs/buffered_read.o
CC fs/proc/array.o
CC fs/ext4/balloc.o
CC mm/swap.o
CC io_uring/nop.o
CC fs/ext4/bitmap.o
CC fs/kernfs/dir.o
CC fs/ext4/block_validity.o
CC fs/sysfs/symlink.o
CC fs/sysfs/mount.o
CC fs/quota/quota_v2.o
CC fs/netfs/buffered_write.o
CC security/selinux/netport.o
CC arch/x86/kernel/cpu/topology_ext.o
CC crypto/geniv.o
CC crypto/lskcipher.o
CC fs/kernfs/file.o
CC fs/iomap/swapfile.o
CC net/core/gen_estimator.o
CC kernel/locking/rwsem.o
CC arch/x86/kernel/apic/hw_nmi.o
CC arch/x86/mm/pgtable_32.o
CC lib/crypto/mpi/mpi-inv.o
CC lib/crypto/mpi/mpi-mod.o
CC lib/crypto/mpi/mpi-mul.o
CC security/lsm_audit.o
CC drivers/video/hdmi.o
CC arch/x86/mm/iomap_32.o
CC security/keys/user_defined.o
CC security/keys/proc.o
CC arch/x86/kernel/apic/io_apic.o
CC [M] sound/pci/hda/hda_controller.o
CC sound/core/isadma.o
AR arch/x86/pci/built-in.a
CC arch/x86/events/core.o
CC net/core/net_namespace.o
CC arch/x86/events/intel/uncore_nhmex.o
CC arch/x86/kernel/cpu/topology_amd.o
CC fs/quota/quota_tree.o
CC block/blk-ioc.o
CC lib/crypto/blake2s.o
CC net/core/secure_seq.o
CC io_uring/fs.o
CC io_uring/splice.o
CC net/sched/ematch.o
AR sound/ppc/built-in.a
CC fs/sysfs/group.o
CC mm/truncate.o
CC arch/x86/events/probe.o
CC arch/x86/kernel/cpu/common.o
CC fs/ext4/dir.o
CC sound/core/vmaster.o
CC io_uring/sync.o
CC arch/x86/events/utils.o
AR drivers/idle/built-in.a
CC lib/crypto/mpi/mpih-cmp.o
CC arch/x86/events/rapl.o
CC arch/x86/kernel/cpu/rdrand.o
CC arch/x86/mm/hugetlbpage.o
CC arch/x86/mm/dump_pagetables.o
CC fs/quota/quota.o
AR sound/pci/mixart/built-in.a
CC fs/proc/fd.o
CC fs/netfs/direct_read.o
CC fs/proc/proc_tty.o
CC fs/quota/kqid.o
CC kernel/locking/percpu-rwsem.o
CC lib/crypto/mpi/mpih-div.o
CC crypto/skcipher.o
AR sound/pci/nm256/built-in.a
AR sound/pci/oxygen/built-in.a
AR fs/iomap/built-in.a
CC security/keys/sysctl.o
CC lib/crypto/blake2s-generic.o
CC lib/crypto/mpi/mpih-mul.o
AR sound/pci/pcxhr/built-in.a
CC security/keys/keyctl_pkey.o
CC lib/crypto/mpi/mpi-pow.o
CC security/device_cgroup.o
AR drivers/video/built-in.a
CC fs/kernfs/symlink.o
CC net/core/flow_dissector.o
AR drivers/char/ipmi/built-in.a
CC net/core/sysctl_net_core.o
CC arch/x86/events/msr.o
CC lib/crypto/mpi/mpiutil.o
CC drivers/pci/pci-driver.o
AR kernel/sched/built-in.a
CC security/selinux/status.o
CC block/blk-map.o
CC block/blk-merge.o
AR fs/sysfs/built-in.a
CC mm/vmscan.o
CC fs/jbd2/transaction.o
CC sound/core/ctljack.o
CC sound/core/jack.o
CC sound/core/timer.o
CC fs/jbd2/commit.o
AR sound/pci/riptide/built-in.a
CC fs/quota/netlink.o
AR sound/pci/rme9652/built-in.a
CC fs/jbd2/recovery.o
CC security/selinux/ss/ebitmap.o
CC net/core/dev.o
CC fs/ramfs/inode.o
CC io_uring/msg_ring.o
CC kernel/locking/spinlock.o
CC fs/ramfs/file-mmu.o
CC crypto/seqiv.o
AR security/keys/built-in.a
CC security/selinux/ss/hashtab.o
CC security/selinux/ss/symtab.o
AR net/sched/built-in.a
CC arch/x86/events/intel/uncore_snb.o
CC arch/x86/mm/highmem_32.o
CC mm/shrinker.o
CC arch/x86/events/intel/uncore_snbep.o
CC fs/netfs/direct_write.o
CC fs/proc/cmdline.o
CC [M] sound/pci/hda/hda_proc.o
CC block/blk-timeout.o
CC block/blk-lib.o
CC net/ethtool/ioctl.o
CC lib/zlib_inflate/inffast.o
CC net/ethtool/common.o
AR fs/kernfs/built-in.a
CC lib/zlib_inflate/inflate.o
CC lib/zlib_inflate/infutil.o
CC net/core/dev_addr_lists.o
CC lib/zlib_inflate/inftrees.o
AR lib/crypto/mpi/built-in.a
CC lib/crypto/sha1.o
CC lib/zlib_inflate/inflate_syms.o
CC net/core/dst.o
CC lib/crypto/sha256.o
CC fs/ext4/ext4_jbd2.o
CC kernel/locking/osq_lock.o
CC net/ethtool/netlink.o
CC net/core/netevent.o
CC arch/x86/kernel/apic/msi.o
CC arch/x86/kernel/cpu/match.o
CC security/selinux/ss/sidtab.o
CC sound/core/hrtimer.o
CC crypto/echainiv.o
CC kernel/power/qos.o
CC crypto/ahash.o
CC kernel/locking/qspinlock.o
CC kernel/power/main.o
CC io_uring/advise.o
CC fs/proc/consoles.o
CC arch/x86/kernel/cpu/bugs.o
CC drivers/pci/search.o
CC io_uring/epoll.o
CC net/core/neighbour.o
AR fs/ramfs/built-in.a
CC crypto/shash.o
CC net/core/rtnetlink.o
CC fs/ext4/extents.o
AR fs/quota/built-in.a
AR arch/x86/mm/built-in.a
CC fs/netfs/io.o
CC fs/netfs/iterator.o
CC drivers/pci/rom.o
CC drivers/pci/setup-res.o
AR lib/zlib_inflate/built-in.a
CC io_uring/statx.o
CC security/selinux/ss/avtab.o
AR sound/pci/trident/built-in.a
AR sound/pci/ymfpci/built-in.a
CC kernel/printk/printk.o
CC net/ethtool/bitset.o
CC kernel/printk/conopt.o
AR lib/crypto/built-in.a
CC sound/core/seq_device.o
CC lib/zlib_deflate/deflate.o
CC mm/shmem.o
CC [M] sound/core/hwdep.o
CC io_uring/timeout.o
CC kernel/locking/rtmutex_api.o
CC kernel/irq/irqdesc.o
CC drivers/acpi/acpica/dsargs.o
CC arch/x86/kernel/apic/probe_32.o
AR drivers/acpi/pmic/built-in.a
CC crypto/akcipher.o
CC crypto/sig.o
CC fs/proc/cpuinfo.o
CC security/selinux/ss/policydb.o
AR drivers/amba/built-in.a
CC [M] sound/pci/hda/hda_hwdep.o
CC drivers/pnp/pnpacpi/core.o
CC net/core/utils.o
CC net/core/link_watch.o
CC block/blk-mq.o
CC drivers/pnp/core.o
CC fs/jbd2/checkpoint.o
CC security/selinux/ss/services.o
CC net/core/filter.o
CC kernel/locking/qrwlock.o
CC block/blk-mq-tag.o
AR drivers/clk/actions/built-in.a
AR drivers/clk/analogbits/built-in.a
CC drivers/acpi/acpica/dscontrol.o
CC block/blk-stat.o
AR drivers/clk/bcm/built-in.a
AR drivers/clk/imgtec/built-in.a
CC drivers/pci/irq.o
CC drivers/pnp/pnpacpi/rsparser.o
AR drivers/clk/imx/built-in.a
CC drivers/dma/dw/core.o
CC crypto/kpp.o
AR drivers/clk/ingenic/built-in.a
AR drivers/clk/mediatek/built-in.a
AR arch/x86/kernel/apic/built-in.a
CC fs/jbd2/revoke.o
AR drivers/clk/microchip/built-in.a
CC fs/jbd2/journal.o
AR drivers/clk/mstar/built-in.a
AR drivers/clk/mvebu/built-in.a
CC kernel/irq/handle.o
AR drivers/clk/ralink/built-in.a
CC drivers/dma/hsu/hsu.o
CC net/ethtool/strset.o
AR drivers/clk/renesas/built-in.a
AR drivers/clk/socfpga/built-in.a
CC [M] sound/core/pcm.o
CC kernel/power/console.o
AR drivers/clk/sophgo/built-in.a
CC fs/proc/devices.o
CC net/ethtool/linkinfo.o
AR drivers/clk/sprd/built-in.a
CC io_uring/fdinfo.o
AR drivers/clk/starfive/built-in.a
AR drivers/clk/sunxi-ng/built-in.a
CC io_uring/cancel.o
AR drivers/clk/ti/built-in.a
CC lib/zlib_deflate/deftree.o
AR drivers/clk/versatile/built-in.a
CC fs/netfs/locking.o
AR drivers/clk/xilinx/built-in.a
AR drivers/clk/built-in.a
CC [M] sound/pci/hda/patch_hdmi.o
CC drivers/acpi/acpica/dsdebug.o
CC drivers/acpi/dptf/int340x_thermal.o
AR sound/pci/vx222/built-in.a
CC kernel/printk/printk_safe.o
CC kernel/printk/nbcon.o
ASN.1 crypto/rsapubkey.asn1.[ch]
CC arch/x86/kernel/platform-quirks.o
AR kernel/locking/built-in.a
CC kernel/power/process.o
AR drivers/soc/apple/built-in.a
CC kernel/power/suspend.o
AR drivers/soc/aspeed/built-in.a
AR drivers/soc/bcm/built-in.a
AR drivers/soc/fsl/built-in.a
AR drivers/soc/fujitsu/built-in.a
AR drivers/soc/hisilicon/built-in.a
AR drivers/soc/imx/built-in.a
CC io_uring/waitid.o
AR drivers/soc/ixp4xx/built-in.a
AR drivers/soc/loongson/built-in.a
CC arch/x86/kernel/cpu/aperfmperf.o
CC arch/x86/kernel/cpu/cpuid-deps.o
CC arch/x86/kernel/process_32.o
AR drivers/soc/mediatek/built-in.a
CC arch/x86/events/intel/uncore_discovery.o
AR drivers/soc/microchip/built-in.a
CC drivers/pci/vpd.o
AR drivers/soc/nuvoton/built-in.a
CC kernel/irq/manage.o
AR drivers/soc/pxa/built-in.a
CC drivers/acpi/acpica/dsfield.o
AR drivers/soc/amlogic/built-in.a
AR drivers/soc/qcom/built-in.a
CC drivers/pci/setup-bus.o
AR drivers/soc/renesas/built-in.a
AR drivers/soc/rockchip/built-in.a
AR drivers/soc/sunxi/built-in.a
AR drivers/soc/ti/built-in.a
CC kernel/rcu/update.o
AR drivers/soc/xilinx/built-in.a
AR drivers/soc/built-in.a
AR kernel/livepatch/built-in.a
ASN.1 crypto/rsaprivkey.asn1.[ch]
CC arch/x86/kernel/signal.o
CC crypto/rsa.o
CC kernel/dma/mapping.o
AR drivers/acpi/dptf/built-in.a
CC crypto/rsa_helper.o
CC kernel/irq/spurious.o
CC lib/zlib_deflate/deflate_syms.o
CC kernel/dma/direct.o
CC block/blk-mq-sysfs.o
CC drivers/acpi/acpica/dsinit.o
CC fs/proc/interrupts.o
CC kernel/dma/ops_helpers.o
AR drivers/dma/hsu/built-in.a
CC kernel/irq/resend.o
CC drivers/pnp/card.o
CC drivers/pnp/driver.o
AR drivers/pnp/pnpacpi/built-in.a
CC mm/util.o
CC block/blk-mq-cpumap.o
CC kernel/dma/dummy.o
CC kernel/dma/remap.o
CC kernel/power/hibernate.o
CC [M] sound/core/pcm_native.o
CC drivers/dma/dw/dw.o
CC drivers/acpi/acpica/dsmethod.o
CC crypto/rsa-pkcs1pad.o
CC net/ethtool/linkmodes.o
AR lib/zlib_deflate/built-in.a
CC fs/netfs/main.o
CC lib/lzo/lzo1x_compress.o
CC lib/lz4/lz4_decompress.o
CC crypto/acompress.o
CC net/netfilter/core.o
CC kernel/printk/printk_ringbuffer.o
CC arch/x86/kernel/cpu/umwait.o
CC net/netfilter/nf_log.o
CC fs/proc/loadavg.o
CC kernel/irq/chip.o
CC net/netfilter/nf_queue.o
CC drivers/dma/dw/idma32.o
CC [M] sound/pci/hda/hda_eld.o
CC drivers/virtio/virtio.o
CC kernel/power/snapshot.o
CC fs/hugetlbfs/inode.o
CC fs/fat/cache.o
CC io_uring/register.o
CC drivers/acpi/acpica/dsmthdat.o
CC fs/fat/dir.o
CC arch/x86/events/intel/cstate.o
CC drivers/pnp/resource.o
CC drivers/acpi/acpica/dsobject.o
CC lib/lzo/lzo1x_decompress_safe.o
CC arch/x86/kernel/signal_32.o
CC kernel/irq/dummychip.o
CC drivers/tty/vt/vt_ioctl.o
CC drivers/char/hw_random/core.o
AR drivers/iommu/amd/built-in.a
CC drivers/char/hw_random/intel-rng.o
AR drivers/iommu/intel/built-in.a
AR kernel/dma/built-in.a
CC drivers/char/hw_random/amd-rng.o
AR drivers/iommu/arm/arm-smmu/built-in.a
AR drivers/iommu/arm/arm-smmu-v3/built-in.a
CC drivers/char/agp/backend.o
AR drivers/iommu/arm/built-in.a
AR drivers/iommu/iommufd/built-in.a
CC kernel/printk/sysctl.o
CC drivers/iommu/iommu.o
CC mm/mmzone.o
CC drivers/tty/vt/vc_screen.o
MKCAP arch/x86/kernel/cpu/capflags.c
CC fs/proc/meminfo.o
CC drivers/char/agp/generic.o
CC kernel/irq/devres.o
CC [M] sound/core/pcm_lib.o
CC crypto/scompress.o
CC drivers/acpi/acpica/dsopcode.o
AR kernel/printk/built-in.a
CC drivers/acpi/acpica/dspkginit.o
CC drivers/tty/hvc/hvc_console.o
AR lib/lzo/built-in.a
CC kernel/entry/common.o
CC drivers/dma/dw/acpi.o
CC drivers/tty/serial/8250/8250_core.o
CC drivers/pci/vc.o
CC net/ethtool/rss.o
CC security/selinux/ss/conditional.o
CC security/selinux/ss/mls.o
CC drivers/tty/serial/8250/8250_pnp.o
CC net/core/sock_diag.o
CC drivers/virtio/virtio_ring.o
AR lib/lz4/built-in.a
CC lib/zstd/zstd_decompress_module.o
CC [M] sound/pci/hda/hda_intel.o
CC drivers/acpi/acpica/dsutils.o
CC lib/xz/xz_dec_syms.o
CC kernel/irq/autoprobe.o
CC lib/zstd/decompress/huf_decompress.o
CC net/netfilter/nf_sockopt.o
AR arch/x86/events/intel/built-in.a
CC mm/vmstat.o
AR arch/x86/events/built-in.a
AR fs/jbd2/built-in.a
CC net/core/dev_ioctl.o
CC net/core/tso.o
CC drivers/virtio/virtio_anchor.o
CC drivers/char/hw_random/geode-rng.o
AR drivers/dma/idxd/built-in.a
CC drivers/virtio/virtio_pci_modern_dev.o
AR drivers/dma/mediatek/built-in.a
CC drivers/char/agp/isoch.o
CC lib/xz/xz_dec_stream.o
CC io_uring/truncate.o
CC fs/proc/stat.o
CC drivers/pnp/manager.o
CC drivers/char/hw_random/via-rng.o
CC fs/fat/fatent.o
CC fs/netfs/misc.o
CC drivers/tty/vt/selection.o
CC fs/fat/file.o
AR fs/hugetlbfs/built-in.a
CC arch/x86/kernel/traps.o
AR sound/arm/built-in.a
AR drivers/dma/dw/built-in.a
CC drivers/char/mem.o
AR drivers/dma/qcom/built-in.a
AR drivers/dma/ti/built-in.a
CC drivers/pci/mmap.o
AR drivers/dma/xilinx/built-in.a
CC drivers/dma/dmaengine.o
CC drivers/acpi/acpica/dswexec.o
CC kernel/rcu/sync.o
CC kernel/rcu/srcutree.o
CC kernel/irq/irqdomain.o
CC block/blk-mq-sched.o
CC crypto/algboss.o
AR drivers/tty/hvc/built-in.a
CC fs/proc/uptime.o
CC drivers/tty/serial/serial_core.o
CC drivers/tty/serial/8250/8250_port.o
CC drivers/virtio/virtio_pci_legacy_dev.o
CC net/ethtool/linkstate.o
CC lib/xz/xz_dec_lzma2.o
CC drivers/virtio/virtio_pci_modern.o
CC kernel/power/swap.o
CC kernel/entry/syscall_user_dispatch.o
AR sound/sh/built-in.a
LD [M] sound/pci/hda/snd-hda-codec.o
AR drivers/char/hw_random/built-in.a
CC lib/xz/xz_dec_bcj.o
AR sound/synth/emux/built-in.a
CC block/ioctl.o
LD [M] sound/pci/hda/snd-hda-codec-hdmi.o
AR sound/synth/built-in.a
CC kernel/power/user.o
AR sound/usb/misc/built-in.a
AR sound/usb/usx2y/built-in.a
CC drivers/pnp/support.o
AR sound/usb/caiaq/built-in.a
AR sound/usb/6fire/built-in.a
CC drivers/tty/serial/8250/8250_dma.o
AR sound/usb/hiface/built-in.a
AR sound/usb/bcd2000/built-in.a
AR sound/usb/built-in.a
AR sound/firewire/built-in.a
CC drivers/char/agp/amd64-agp.o
CC drivers/pnp/interface.o
CC block/genhd.o
CC drivers/acpi/acpica/dswload.o
CC [M] sound/core/pcm_misc.o
CC fs/ext4/extents_status.o
CC net/netfilter/utils.o
CC fs/proc/util.o
CC arch/x86/kernel/idt.o
CC security/selinux/ss/context.o
CC drivers/pci/devres.o
CC drivers/tty/vt/keyboard.o
CC drivers/iommu/iommu-traces.o
CC lib/zstd/decompress/zstd_ddict.o
CC io_uring/memmap.o
CC io_uring/io-wq.o
CC arch/x86/kernel/irq.o
CC crypto/testmgr.o
CC crypto/cmac.o
CC net/ipv4/netfilter/nf_defrag_ipv4.o
CC net/ipv4/route.o
AR kernel/entry/built-in.a
CC net/ipv4/netfilter/nf_reject_ipv4.o
CC net/ipv4/netfilter/ip_tables.o
CC kernel/module/main.o
CC lib/zstd/decompress/zstd_decompress.o
CC drivers/acpi/acpica/dswload2.o
CC net/ipv4/netfilter/iptable_filter.o
CC fs/netfs/objects.o
CC mm/backing-dev.o
AR lib/xz/built-in.a
CC net/netfilter/nfnetlink.o
CC fs/fat/inode.o
CC net/ipv4/netfilter/iptable_mangle.o
CC kernel/module/strict_rwx.o
CC net/netfilter/nfnetlink_log.o
LD [M] sound/pci/hda/snd-hda-intel.o
AR sound/pci/built-in.a
CC drivers/pnp/quirks.o
CC arch/x86/kernel/irq_32.o
CC drivers/pnp/system.o
CC fs/proc/version.o
CC drivers/virtio/virtio_pci_common.o
CC kernel/irq/proc.o
CC drivers/dma/virt-dma.o
CC kernel/module/kmod.o
CC block/ioprio.o
CC kernel/rcu/tree.o
CC [M] sound/core/pcm_memory.o
CC drivers/char/agp/intel-agp.o
CC net/ethtool/debug.o
AR sound/sparc/built-in.a
AR sound/spi/built-in.a
CC [M] sound/core/memalloc.o
CC drivers/pci/proc.o
CC drivers/acpi/acpica/dswscope.o
CC crypto/hmac.o
CC drivers/char/agp/intel-gtt.o
AR drivers/tty/ipwireless/built-in.a
CC arch/x86/kernel/dumpstack_32.o
CC drivers/tty/serial/serial_base_bus.o
CC kernel/power/poweroff.o
CC security/selinux/netlabel.o
CC net/core/sock_reuseport.o
CC fs/proc/softirqs.o
CC net/netfilter/nf_conntrack_core.o
CC drivers/iommu/iommu-sysfs.o
CC lib/zstd/decompress/zstd_decompress_block.o
CC net/netfilter/nf_conntrack_standalone.o
CC kernel/time/time.o
CC drivers/acpi/acpica/dswstate.o
AR kernel/power/built-in.a
CC kernel/time/timer.o
CC kernel/time/hrtimer.o
CC drivers/dma/acpi-dma.o
CC kernel/irq/migration.o
AR drivers/pnp/built-in.a
CC kernel/time/timekeeping.o
CC net/core/fib_notifier.o
CC drivers/tty/serial/8250/8250_dwlib.o
CC fs/ext4/file.o
CC drivers/acpi/acpica/evevent.o
CC drivers/acpi/acpica/evgpe.o
CC drivers/virtio/virtio_pci_legacy.o
CC fs/netfs/write_collect.o
CC fs/proc/namespaces.o
CC io_uring/futex.o
CC io_uring/napi.o
CC drivers/acpi/acpica/evgpeblk.o
CC lib/zstd/zstd_common_module.o
CC crypto/crypto_null.o
CC block/badblocks.o
CC drivers/tty/vt/vt.o
CC lib/zstd/common/debug.o
CC mm/mm_init.o
CC net/netfilter/nf_conntrack_expect.o
CC drivers/pci/pci-sysfs.o
CC kernel/irq/cpuhotplug.o
CC arch/x86/kernel/time.o
CC [M] sound/core/pcm_timer.o
CC net/ethtool/wol.o
CC block/blk-rq-qos.o
CC block/disk-events.o
LD [M] sound/core/snd-hwdep.o
CC net/netfilter/nf_conntrack_helper.o
CC drivers/iommu/dma-iommu.o
CC fs/proc/self.o
CC fs/fat/misc.o
AR drivers/char/agp/built-in.a
CC drivers/char/random.o
AR drivers/gpu/host1x/built-in.a
CC drivers/acpi/acpica/evgpeinit.o
CC drivers/acpi/acpica/evgpeutil.o
CC net/ipv4/netfilter/ipt_REJECT.o
CC drivers/acpi/acpica/evglock.o
CC net/core/xdp.o
COPY drivers/tty/vt/defkeymap.c
CC arch/x86/kernel/ioport.o
AR drivers/gpu/drm/tests/built-in.a
AR drivers/dma/built-in.a
AR drivers/gpu/drm/arm/built-in.a
CC fs/netfs/write_issue.o
CC drivers/gpu/drm/display/drm_display_helper_mod.o
CC mm/percpu.o
CC drivers/virtio/virtio_pci_admin_legacy_io.o
CC drivers/tty/serial/8250/8250_pcilib.o
CC crypto/md5.o
CC drivers/gpu/drm/display/drm_dp_dual_mode_helper.o
CC drivers/acpi/acpica/evhandler.o
CC kernel/rcu/rcu_segcblist.o
CC net/core/flow_offload.o
AR sound/core/built-in.a
LD [M] sound/core/snd-pcm.o
AR security/selinux/built-in.a
CC drivers/iommu/iova.o
CC arch/x86/kernel/dumpstack.o
CC net/ethtool/features.o
AR sound/parisc/built-in.a
AR security/built-in.a
CC net/ethtool/privflags.o
AR sound/pcmcia/vx/built-in.a
CC drivers/acpi/acpica/evmisc.o
AR sound/pcmcia/pdaudiocf/built-in.a
CC fs/proc/thread_self.o
AR sound/pcmcia/built-in.a
CC kernel/module/tree_lookup.o
CC kernel/irq/pm.o
AR sound/mips/built-in.a
AR sound/soc/built-in.a
AR sound/atmel/built-in.a
AR sound/hda/built-in.a
CC net/core/gro.o
CC [M] sound/hda/hda_bus_type.o
CC drivers/acpi/acpica/evregion.o
CC fs/proc/proc_sysctl.o
CC kernel/time/ntp.o
CC block/blk-ia-ranges.o
AR sound/x86/built-in.a
AR sound/xen/built-in.a
CC fs/fat/nfs.o
CC fs/fat/namei_vfat.o
CC kernel/irq/msi.o
CC fs/ext4/fsmap.o
CC kernel/irq/affinity.o
CC crypto/sha256_generic.o
CC crypto/sha512_generic.o
CC [M] net/ipv4/netfilter/iptable_nat.o
CC drivers/virtio/virtio_input.o
AR sound/virtio/built-in.a
CC drivers/virtio/virtio_dma_buf.o
CC drivers/gpu/drm/display/drm_dp_helper.o
CC drivers/pci/slot.o
CC drivers/tty/serial/8250/8250_early.o
CC drivers/pci/pci-acpi.o
CC drivers/gpu/drm/ttm/ttm_tt.o
AR drivers/gpu/vga/built-in.a
CC net/ethtool/rings.o
CC drivers/gpu/drm/ttm/ttm_bo.o
CC drivers/acpi/acpica/evrgnini.o
CC drivers/gpu/drm/i915/i915_config.o
AR io_uring/built-in.a
CC kernel/module/kallsyms.o
CC drivers/gpu/drm/ttm/ttm_bo_util.o
CC net/ipv4/inetpeer.o
CC kernel/futex/core.o
CC kernel/cgroup/cgroup.o
CC kernel/futex/syscalls.o
AR drivers/gpu/drm/renesas/rcar-du/built-in.a
CC net/netfilter/nf_conntrack_proto.o
AR drivers/gpu/drm/renesas/rz-du/built-in.a
AR drivers/gpu/drm/renesas/built-in.a
CC fs/proc/proc_net.o
CC net/core/netdev-genl.o
CC [M] sound/hda/hdac_bus.o
AR drivers/gpu/drm/omapdrm/built-in.a
CC [M] sound/hda/hdac_device.o
CC net/core/netdev-genl-gen.o
AR drivers/iommu/built-in.a
CC net/ethtool/channels.o
CC lib/zstd/common/entropy_common.o
CC drivers/char/misc.o
CC kernel/trace/trace_clock.o
CC drivers/gpu/drm/ttm/ttm_bo_vm.o
CC drivers/gpu/drm/i915/i915_driver.o
CC drivers/gpu/drm/i915/i915_drm_client.o
CC kernel/time/clocksource.o
AR fs/netfs/built-in.a
CC sound/sound_core.o
CC block/early-lookup.o
CC net/netfilter/nf_conntrack_proto_generic.o
CC net/ethtool/coalesce.o
CC net/core/gso.o
CC fs/ext4/fsync.o
CC lib/zstd/common/error_private.o
CC drivers/acpi/acpica/evsci.o
CC lib/zstd/common/fse_decompress.o
CC net/xfrm/xfrm_policy.o
CC fs/ext4/hash.o
CC drivers/tty/serial/8250/8250_exar.o
AR drivers/virtio/built-in.a
CC fs/ext4/ialloc.o
CC fs/ext4/indirect.o
CC crypto/sha3_generic.o
CC kernel/trace/ring_buffer.o
CC fs/fat/namei_msdos.o
CC fs/ext4/inline.o
CC kernel/module/procfs.o
CC kernel/irq/matrix.o
CC drivers/gpu/drm/ttm/ttm_module.o
CC drivers/acpi/acpica/evxface.o
CC drivers/gpu/drm/i915/i915_getparam.o
CC drivers/gpu/drm/display/drm_dp_mst_topology.o
CC drivers/gpu/drm/display/drm_dsc_helper.o
AR net/ipv4/netfilter/built-in.a
CC crypto/ecb.o
CC drivers/char/virtio_console.o
CC drivers/tty/vt/consolemap.o
CC fs/ext4/inode.o
CC net/ipv4/protocol.o
CC fs/ext4/ioctl.o
CC kernel/trace/trace.o
CC fs/proc/kcore.o
CC kernel/futex/pi.o
CC lib/zstd/common/zstd_common.o
CC drivers/pci/iomap.o
CC fs/proc/vmcore.o
CC block/bounce.o
AR lib/zstd/built-in.a
CC lib/dim/dim.o
CC block/bsg.o
CC kernel/trace/trace_output.o
CC [M] sound/hda/hdac_sysfs.o
CC kernel/time/jiffies.o
HOSTCC drivers/tty/vt/conmakehash
CC drivers/tty/serial/serial_ctrl.o
CC mm/slab_common.o
CC drivers/gpu/drm/ttm/ttm_execbuf_util.o
CC drivers/acpi/acpica/evxfevnt.o
CC mm/compaction.o
CC crypto/cbc.o
CC kernel/module/sysfs.o
CC fs/isofs/namei.o
CC net/ethtool/pause.o
CC arch/x86/kernel/cpu/powerflags.o
CC kernel/cgroup/rstat.o
CC net/ethtool/eee.o
CC drivers/tty/serial/8250/8250_lpss.o
CC lib/dim/net_dim.o
CC net/netfilter/nf_conntrack_proto_tcp.o
CC arch/x86/kernel/cpu/topology.o
CC net/unix/af_unix.o
AR fs/fat/built-in.a
CC net/core/net-sysfs.o
AR kernel/rcu/built-in.a
CC drivers/pci/quirks.o
CC net/ipv6/netfilter/ip6_tables.o
CC drivers/pci/pci-label.o
CC kernel/time/timer_list.o
CC net/core/hotdata.o
CC kernel/futex/requeue.o
CC drivers/acpi/acpica/evxfgpe.o
CC net/ipv6/af_inet6.o
CC drivers/tty/serial/serial_port.o
CC drivers/tty/vt/defkeymap.o
CC crypto/ctr.o
CC net/core/net-procfs.o
CC lib/dim/rdma_dim.o
CC drivers/tty/serial/earlycon.o
CC net/ipv4/ip_input.o
CC mm/show_mem.o
CC net/ipv6/anycast.o
CC drivers/gpu/drm/ttm/ttm_range_manager.o
CONMK drivers/tty/vt/consolemap_deftbl.c
CC drivers/tty/vt/consolemap_deftbl.o
CC [M] sound/hda/hdac_regmap.o
CC drivers/gpu/drm/i915/i915_ioctl.o
CC fs/proc/kmsg.o
AR kernel/irq/built-in.a
AR drivers/tty/vt/built-in.a
CC net/ethtool/tsinfo.o
CC fs/isofs/inode.o
CC kernel/cgroup/namespace.o
AR kernel/module/built-in.a
CC [M] sound/hda/hdac_controller.o
CC arch/x86/kernel/cpu/proc.o
CC arch/x86/kernel/cpu/feat_ctl.o
CC drivers/char/hpet.o
CC drivers/tty/serial/8250/8250_mid.o
CC drivers/acpi/acpica/evxfregn.o
AR lib/dim/built-in.a
CC lib/fonts/fonts.o
CC crypto/gcm.o
CC drivers/char/nvram.o
CC block/blk-cgroup.o
CC kernel/futex/waitwake.o
CC kernel/time/timeconv.o
CC lib/fonts/font_8x16.o
CC crypto/ccm.o
CC drivers/gpu/drm/ttm/ttm_resource.o
CC kernel/time/timecounter.o
CC fs/proc/page.o
CC kernel/time/alarmtimer.o
CC block/blk-ioprio.o
CC arch/x86/kernel/cpu/intel.o
CC fs/ext4/mballoc.o
CC arch/x86/kernel/nmi.o
CC kernel/cgroup/cgroup-v1.o
CC kernel/bpf/core.o
CC drivers/acpi/acpica/exconcat.o
CC net/core/netpoll.o
AR lib/fonts/built-in.a
CC [M] sound/hda/hdac_stream.o
CC lib/argv_split.o
CC arch/x86/kernel/cpu/intel_pconfig.o
CC drivers/tty/serial/8250/8250_pci.o
CC kernel/cgroup/freezer.o
CC drivers/tty/serial/8250/8250_pericom.o
CC arch/x86/kernel/cpu/tsx.o
CC block/blk-iolatency.o
CC arch/x86/kernel/cpu/intel_epb.o
CC drivers/acpi/acpica/exconfig.o
CC drivers/gpu/drm/i915/i915_irq.o
CC kernel/cgroup/legacy_freezer.o
CC kernel/trace/trace_seq.o
CC arch/x86/kernel/cpu/amd.o
CC net/ethtool/cabletest.o
CC [M] sound/hda/array.o
CC [M] sound/hda/hdmi_chmap.o
CC lib/bug.o
AR kernel/futex/built-in.a
CC net/netfilter/nf_conntrack_proto_udp.o
AR drivers/char/built-in.a
CC drivers/gpu/drm/i915/i915_mitigations.o
CC net/netfilter/nf_conntrack_proto_icmp.o
CC kernel/events/core.o
CC drivers/connector/cn_queue.o
CC net/ipv6/netfilter/ip6table_filter.o
CC net/unix/garbage.o
AR fs/proc/built-in.a
CC drivers/acpi/acpica/exconvrt.o
CC fs/isofs/dir.o
CC net/ipv4/ip_fragment.o
CC fs/nfs/client.o
CC net/netfilter/nf_conntrack_extend.o
CC net/ipv6/ip6_output.o
CC crypto/aes_generic.o
CC crypto/crc32c_generic.o
CC arch/x86/kernel/cpu/hygon.o
CC kernel/trace/trace_stat.o
CC drivers/gpu/drm/ttm/ttm_pool.o
CC drivers/base/power/sysfs.o
CC drivers/base/firmware_loader/builtin/main.o
CC drivers/base/firmware_loader/main.o
CC drivers/pci/vgaarb.o
CC kernel/fork.o
CC drivers/gpu/drm/display/drm_hdcp_helper.o
CC drivers/base/regmap/regmap.o
CC kernel/time/posix-timers.o
CC kernel/trace/trace_printk.o
CC net/xfrm/xfrm_state.o
CC kernel/time/posix-cpu-timers.o
CC drivers/acpi/acpica/excreate.o
CC drivers/base/regmap/regcache.o
CC arch/x86/kernel/ldt.o
CC lib/buildid.o
CC kernel/trace/pid_list.o
AR drivers/base/firmware_loader/builtin/built-in.a
CC fs/nfs/dir.o
CC net/packet/af_packet.o
CC arch/x86/kernel/cpu/centaur.o
CC kernel/events/ring_buffer.o
AR net/dsa/built-in.a
CC kernel/cgroup/pids.o
CC kernel/events/callchain.o
CC [M] sound/hda/trace.o
CC drivers/tty/tty_io.o
CC drivers/base/power/generic_ops.o
CC fs/isofs/util.o
CC net/ethtool/tunnels.o
AR drivers/tty/serial/8250/built-in.a
CC drivers/acpi/x86/apple.o
AR drivers/tty/serial/built-in.a
CC drivers/gpu/drm/i915/i915_module.o
CC drivers/connector/connector.o
CC drivers/acpi/acpica/exdebug.o
CC crypto/authenc.o
CC mm/shmem_quota.o
CC drivers/acpi/x86/cmos_rtc.o
CC net/core/fib_rules.o
CC block/blk-iocost.o
CC net/netfilter/nf_conntrack_acct.o
CC drivers/gpu/drm/display/drm_hdmi_helper.o
CC arch/x86/kernel/cpu/transmeta.o
CC drivers/gpu/drm/display/drm_scdc_helper.o
CC drivers/gpu/drm/i915/i915_params.o
CC net/unix/sysctl_net_unix.o
CC drivers/connector/cn_proc.o
CC lib/clz_tab.o
CC net/ipv6/netfilter/ip6table_mangle.o
CC lib/cmdline.o
CC drivers/base/power/common.o
CC kernel/cgroup/rdma.o
AR drivers/base/firmware_loader/built-in.a
CC kernel/events/hw_breakpoint.o
CC drivers/base/power/qos.o
CC kernel/events/uprobes.o
CC drivers/acpi/acpica/exdump.o
CC drivers/gpu/drm/ttm/ttm_device.o
CC net/ipv4/ip_forward.o
CC lib/cpumask.o
CC kernel/trace/trace_sched_switch.o
CC fs/isofs/rock.o
CC kernel/trace/trace_nop.o
AR drivers/pci/built-in.a
CC net/xfrm/xfrm_hash.o
CC kernel/trace/blktrace.o
CC kernel/exec_domain.o
CC kernel/panic.o
CC drivers/acpi/x86/lpss.o
CC drivers/gpu/drm/ttm/ttm_sys_manager.o
CC net/ipv6/netfilter/nf_defrag_ipv6_hooks.o
CC mm/interval_tree.o
CC kernel/time/posix-clock.o
CC drivers/acpi/acpica/exfield.o
CC net/netfilter/nf_conntrack_seqadj.o
CC arch/x86/kernel/cpu/zhaoxin.o
CC [M] sound/hda/hdac_component.o
AR drivers/base/test/built-in.a
CC kernel/cpu.o
CC arch/x86/kernel/setup.o
AR drivers/gpu/drm/display/built-in.a
CC arch/x86/kernel/x86_init.o
CC crypto/authencesn.o
CC kernel/cgroup/cpuset.o
CC sound/last.o
CC lib/ctype.o
AR kernel/bpf/built-in.a
AR drivers/gpu/drm/tilcdc/built-in.a
CC kernel/exit.o
CC lib/dec_and_lock.o
CC drivers/gpu/drm/virtio/virtgpu_drv.o
CC drivers/gpu/drm/i915/i915_pci.o
CC kernel/cgroup/misc.o
AR net/unix/built-in.a
CC net/ethtool/fec.o
CC net/netfilter/nf_conntrack_proto_icmpv6.o
CC drivers/acpi/acpica/exfldio.o
CC mm/list_lru.o
CC drivers/tty/n_tty.o
CC drivers/gpu/drm/ttm/ttm_backup_shmem.o
CC drivers/block/loop.o
CC drivers/tty/tty_ioctl.o
CC arch/x86/kernel/cpu/vortex.o
CC kernel/softirq.o
CC fs/isofs/export.o
CC lib/decompress.o
AR drivers/connector/built-in.a
CC fs/isofs/joliet.o
CC lib/decompress_bunzip2.o
CC drivers/acpi/x86/s2idle.o
AR drivers/misc/eeprom/built-in.a
AR drivers/misc/cb710/built-in.a
AR drivers/misc/ti-st/built-in.a
AR drivers/mfd/built-in.a
AR drivers/misc/lis3lv02d/built-in.a
CC lib/decompress_inflate.o
AR drivers/misc/cardreader/built-in.a
AR drivers/misc/built-in.a
CC kernel/time/itimer.o
CC drivers/gpu/drm/ttm/ttm_agp_backend.o
CC net/ipv6/netfilter/nf_conntrack_reasm.o
CC mm/workingset.o
CC [M] sound/hda/hdac_i915.o
CC net/core/net-traces.o
CC drivers/base/power/runtime.o
CC fs/isofs/compress.o
CC mm/debug.o
CC arch/x86/kernel/cpu/perfctr-watchdog.o
CC fs/ext4/migrate.o
CC kernel/time/clockevents.o
CC drivers/base/regmap/regcache-rbtree.o
CC drivers/acpi/acpica/exmisc.o
CC drivers/base/power/wakeirq.o
CC net/ipv4/ip_options.o
CC drivers/tty/tty_ldisc.o
CC drivers/gpu/drm/virtio/virtgpu_kms.o
CC drivers/gpu/drm/virtio/virtgpu_gem.o
CC net/ipv6/netfilter/nf_reject_ipv6.o
CC mm/gup.o
CC arch/x86/kernel/i8259.o
CC mm/mmap_lock.o
CC kernel/resource.o
CC net/ipv4/ip_output.o
CC lib/decompress_unlz4.o
CC crypto/lzo.o
CC fs/ext4/mmp.o
CC crypto/lzo-rle.o
CC kernel/sysctl.o
CC net/ipv6/netfilter/ip6t_ipv6header.o
CC drivers/gpu/drm/i915/i915_scatterlist.o
CC net/ethtool/eeprom.o
AR drivers/gpu/drm/ttm/built-in.a
CC drivers/acpi/acpica/exmutex.o
CC crypto/rng.o
CC kernel/trace/trace_events.o
CC [M] sound/hda/intel-dsp-config.o
CC drivers/acpi/x86/utils.o
CC drivers/base/power/main.o
CC net/xfrm/xfrm_input.o
CC arch/x86/kernel/cpu/vmware.o
CC mm/highmem.o
CC kernel/cgroup/debug.o
CC fs/nfs/file.o
CC kernel/time/tick-common.o
CC drivers/base/regmap/regcache-flat.o
CC net/netfilter/nf_conntrack_netlink.o
AR fs/isofs/built-in.a
CC drivers/tty/tty_buffer.o
CC kernel/capability.o
CC lib/decompress_unlzma.o
CC arch/x86/kernel/cpu/hypervisor.o
CC drivers/acpi/acpica/exnames.o
CC arch/x86/kernel/cpu/mshyperv.o
AR net/packet/built-in.a
CC block/mq-deadline.o
AR drivers/gpu/drm/imx/built-in.a
CC drivers/base/regmap/regcache-maple.o
CC drivers/acpi/x86/blacklist.o
CC block/kyber-iosched.o
CC kernel/ptrace.o
CC fs/ext4/move_extent.o
CC block/blk-mq-pci.o
AR drivers/nfc/built-in.a
CC drivers/gpu/drm/virtio/virtgpu_vram.o
CC arch/x86/kernel/irqinit.o
AR drivers/gpu/drm/i2c/built-in.a
CC drivers/base/power/wakeup.o
CC drivers/gpu/drm/i915/i915_suspend.o
CC drivers/block/virtio_blk.o
CC net/ipv4/ip_sockglue.o
CC drivers/gpu/drm/virtio/virtgpu_display.o
CC fs/ext4/namei.o
CC net/ipv4/inet_hashtables.o
CC net/ipv4/inet_timewait_sock.o
CC [M] sound/hda/intel-nhlt.o
CC drivers/gpu/drm/virtio/virtgpu_vq.o
CC net/sunrpc/auth_gss/auth_gss.o
CC drivers/gpu/drm/virtio/virtgpu_fence.o
CC crypto/drbg.o
CC net/sunrpc/auth_gss/gss_generic_token.o
CC drivers/acpi/acpica/exoparg1.o
CC net/core/selftests.o
CC fs/ext4/page-io.o
CC drivers/gpu/drm/i915/i915_switcheroo.o
AR drivers/acpi/x86/built-in.a
CC drivers/acpi/tables.o
CC net/ethtool/stats.o
CC net/ethtool/phc_vclocks.o
AR kernel/cgroup/built-in.a
CC kernel/user.o
CC drivers/base/regmap/regmap-debugfs.o
CC drivers/tty/tty_port.o
CC lib/decompress_unlzo.o
AR drivers/gpu/drm/panel/built-in.a
CC net/ipv6/netfilter/ip6t_REJECT.o
CC mm/memory.o
CC fs/nfs/getroot.o
CC drivers/acpi/acpica/exoparg2.o
CC net/netfilter/nf_conntrack_ftp.o
CC drivers/base/power/wakeup_stats.o
CC [M] sound/hda/intel-sdw-acpi.o
CC drivers/acpi/acpica/exoparg3.o
CC arch/x86/kernel/cpu/debugfs.o
CC mm/mincore.o
CC kernel/time/tick-broadcast.o
CC arch/x86/kernel/cpu/capflags.o
CC fs/ext4/readpage.o
CC kernel/signal.o
CC kernel/sys.o
CC drivers/gpu/drm/virtio/virtgpu_object.o
CC fs/nfs/inode.o
CC drivers/tty/tty_mutex.o
AR net/wireless/tests/built-in.a
AR drivers/gpu/drm/bridge/analogix/built-in.a
CC net/wireless/core.o
AR drivers/gpu/drm/bridge/cadence/built-in.a
CC drivers/acpi/acpica/exoparg6.o
AR drivers/gpu/drm/bridge/imx/built-in.a
CC net/xfrm/xfrm_output.o
AR drivers/gpu/drm/bridge/synopsys/built-in.a
AR drivers/gpu/drm/bridge/built-in.a
CC crypto/jitterentropy.o
CC lib/decompress_unxz.o
CC net/xfrm/xfrm_sysctl.o
CC fs/ext4/resize.o
CC crypto/jitterentropy-kcapi.o
CC block/blk-mq-virtio.o
CC block/blk-mq-debugfs.o
CC net/ipv6/ip6_input.o
AR drivers/gpu/drm/hisilicon/built-in.a
CC drivers/acpi/osi.o
AR drivers/gpu/drm/mxsfb/built-in.a
LD [M] sound/hda/snd-hda-core.o
CC drivers/acpi/osl.o
AR drivers/block/built-in.a
LD [M] sound/hda/snd-intel-dspcfg.o
CC kernel/umh.o
LD [M] sound/hda/snd-intel-sdw-acpi.o
AR drivers/base/regmap/built-in.a
AR sound/built-in.a
CC drivers/gpu/drm/i915/i915_sysfs.o
CC drivers/base/component.o
CC kernel/workqueue.o
CC drivers/base/power/trace.o
CC fs/nfs/super.o
AR drivers/gpu/drm/tiny/built-in.a
CC kernel/pid.o
CC drivers/acpi/acpica/exprep.o
AR arch/x86/kernel/cpu/built-in.a
CC drivers/acpi/acpica/exregion.o
CC crypto/ghash-generic.o
CC arch/x86/kernel/jump_label.o
CC net/ethtool/mm.o
CC net/xfrm/xfrm_replay.o
CC drivers/tty/tty_ldsem.o
CC kernel/time/tick-broadcast-hrtimer.o
CC net/ethtool/module.o
CC lib/decompress_unzstd.o
CC net/core/ptp_classifier.o
CC fs/nfs/io.o
CC kernel/time/tick-oneshot.o
CC fs/exportfs/expfs.o
CC kernel/trace/trace_export.o
CC fs/nfs/direct.o
CC drivers/gpu/drm/virtio/virtgpu_debugfs.o
CC drivers/acpi/acpica/exresnte.o
AR net/ipv6/netfilter/built-in.a
CC arch/x86/kernel/irq_work.o
CC fs/ext4/super.o
AR kernel/events/built-in.a
CC drivers/gpu/drm/virtio/virtgpu_plane.o
CC net/core/netprio_cgroup.o
CC crypto/hash_info.o
CC drivers/gpu/drm/virtio/virtgpu_ioctl.o
CC fs/ext4/symlink.o
CC net/ipv4/inet_connection_sock.o
CC crypto/rsapubkey.asn1.o
CC net/core/netclassid_cgroup.o
CC crypto/rsaprivkey.asn1.o
CC kernel/task_work.o
AR crypto/built-in.a
CC net/ipv4/tcp.o
CC net/ipv4/tcp_input.o
CC net/sunrpc/clnt.o
CC drivers/gpu/drm/i915/i915_utils.o
CC kernel/time/tick-sched.o
AR drivers/base/power/built-in.a
CC drivers/base/core.o
CC arch/x86/kernel/probe_roms.o
CC drivers/tty/tty_baudrate.o
CC net/sunrpc/auth_gss/gss_mech_switch.o
CC drivers/gpu/drm/virtio/virtgpu_prime.o
CC block/blk-pm.o
CC net/netfilter/nf_conntrack_irc.o
CC lib/dump_stack.o
CC drivers/acpi/acpica/exresolv.o
CC net/sunrpc/auth_gss/svcauth_gss.o
CC net/ipv4/tcp_output.o
AR fs/exportfs/built-in.a
CC kernel/time/timer_migration.o
CC drivers/acpi/utils.o
CC block/holder.o
CC kernel/trace/trace_event_perf.o
CC drivers/acpi/reboot.o
CC net/ethtool/pse-pd.o
CC kernel/extable.o
CC net/sunrpc/auth_gss/gss_rpc_upcall.o
CC net/xfrm/xfrm_device.o
CC net/sunrpc/auth_gss/gss_rpc_xdr.o
CC drivers/acpi/acpica/exresop.o
CC net/xfrm/xfrm_algo.o
CC kernel/params.o
CC kernel/trace/trace_events_filter.o
CC kernel/time/vsyscall.o
CC net/core/dst_cache.o
CC drivers/gpu/drm/virtio/virtgpu_trace_points.o
CC fs/lockd/clntlock.o
CC drivers/gpu/drm/virtio/virtgpu_submit.o
CC drivers/tty/tty_jobctrl.o
CC kernel/kthread.o
CC kernel/sys_ni.o
CC lib/earlycpio.o
CC arch/x86/kernel/sys_ia32.o
CC net/mac80211/main.o
CC fs/nls/nls_base.o
AR net/mac80211/tests/built-in.a
CC net/ipv6/addrconf.o
CC net/xfrm/xfrm_user.o
CC fs/nfs/pagelist.o
CC lib/extable.o
CC drivers/gpu/drm/i915/intel_clock_gating.o
CC drivers/acpi/acpica/exserial.o
AR block/built-in.a
CC drivers/acpi/acpica/exstore.o
CC drivers/acpi/nvs.o
CC drivers/acpi/wakeup.o
CC net/core/gro_cells.o
CC drivers/acpi/acpica/exstoren.o
CC drivers/acpi/acpica/exstorob.o
CC kernel/time/timekeeping_debug.o
CC kernel/trace/trace_events_trigger.o
CC net/netfilter/nf_conntrack_sip.o
CC fs/nls/nls_cp437.o
CC drivers/acpi/acpica/exsystem.o
CC lib/flex_proportions.o
CC drivers/acpi/acpica/extrace.o
CC net/ethtool/plca.o
CC drivers/gpu/drm/i915/intel_device_info.o
CC kernel/trace/trace_eprobe.o
CC drivers/gpu/drm/i915/intel_memory_region.o
CC drivers/acpi/acpica/exutils.o
CC kernel/time/namespace.o
CC drivers/acpi/acpica/hwacpi.o
CC drivers/gpu/drm/i915/intel_pcode.o
CC drivers/tty/n_null.o
CC lib/idr.o
CC drivers/acpi/sleep.o
CC drivers/tty/pty.o
CC arch/x86/kernel/ksysfs.o
AR drivers/gpu/drm/virtio/built-in.a
CC drivers/acpi/device_sysfs.o
CC net/ipv6/addrlabel.o
CC net/sunrpc/xprt.o
CC fs/nls/nls_ascii.o
CC net/ipv6/route.o
CC fs/nfs/read.o
CC drivers/acpi/acpica/hwesleep.o
CC mm/mlock.o
CC net/ipv4/tcp_timer.o
CC drivers/acpi/device_pm.o
CC net/ipv4/tcp_ipv4.o
CC net/mac80211/status.o
CC fs/nfs/symlink.o
CC fs/lockd/clntproc.o
AR fs/unicode/built-in.a
CC fs/lockd/clntxdr.o
CC net/core/failover.o
CC lib/irq_regs.o
CC net/sunrpc/socklib.o
CC fs/nls/nls_iso8859-1.o
CC kernel/trace/trace_kprobe.o
CC lib/is_single_threaded.o
CC net/sunrpc/xprtsock.o
CC lib/klist.o
CC drivers/acpi/acpica/hwgpe.o
CC fs/nls/nls_utf8.o
CC drivers/gpu/drm/i915/intel_region_ttm.o
CC kernel/nsproxy.o
CC net/sunrpc/auth_gss/trace.o
CC arch/x86/kernel/bootflag.o
AR kernel/time/built-in.a
CC net/sunrpc/sched.o
CC net/wireless/sysfs.o
CC lib/kobject.o
CC drivers/base/bus.o
CC kernel/trace/error_report-traces.o
CC drivers/tty/tty_audit.o
AR net/ethtool/built-in.a
CC net/ipv4/tcp_minisocks.o
CC drivers/acpi/acpica/hwregs.o
CC net/sunrpc/auth.o
CC arch/x86/kernel/e820.o
CC net/mac80211/driver-ops.o
CC kernel/notifier.o
CC drivers/base/dd.o
AR fs/nls/built-in.a
CC drivers/tty/sysrq.o
CC drivers/gpu/drm/i915/intel_runtime_pm.o
CC drivers/acpi/acpica/hwsleep.o
CC net/sunrpc/auth_gss/gss_krb5_mech.o
CC drivers/acpi/proc.o
AR net/core/built-in.a
CC drivers/acpi/bus.o
CC lib/kobject_uevent.o
CC drivers/gpu/drm/i915/intel_sbi.o
CC drivers/acpi/acpica/hwvalid.o
CC kernel/ksysfs.o
CC net/netfilter/nf_nat_core.o
CC drivers/acpi/acpica/hwxface.o
CC drivers/acpi/glue.o
CC arch/x86/kernel/pci-dma.o
CC mm/mmap.o
AR drivers/gpu/drm/xlnx/built-in.a
AR drivers/gpu/drm/gud/built-in.a
AR drivers/gpu/drm/solomon/built-in.a
CC [M] drivers/gpu/drm/scheduler/sched_main.o
CC [M] drivers/gpu/drm/xe/xe_bb.o
CC drivers/gpu/drm/drm_aperture.o
CC [M] drivers/gpu/drm/scheduler/sched_fence.o
CC [M] drivers/gpu/drm/xe/xe_bo.o
CC drivers/base/syscore.o
CC drivers/base/driver.o
CC net/sunrpc/auth_null.o
CC drivers/gpu/drm/drm_atomic.o
CC drivers/gpu/drm/i915/intel_step.o
CC fs/lockd/host.o
CC net/netfilter/nf_nat_proto.o
AR net/xfrm/built-in.a
CC drivers/base/class.o
CC drivers/acpi/acpica/hwxfsleep.o
CC kernel/cred.o
CC net/ipv4/tcp_cong.o
CC drivers/base/platform.o
CC drivers/gpu/drm/i915/intel_uncore.o
CC net/netlabel/netlabel_user.o
CC kernel/reboot.o
AR drivers/tty/built-in.a
CC drivers/gpu/drm/drm_atomic_uapi.o
CC kernel/async.o
AR drivers/dax/hmem/built-in.a
AR drivers/dax/built-in.a
CC net/rfkill/core.o
CC [M] drivers/gpu/drm/scheduler/sched_entity.o
CC drivers/dma-buf/dma-buf.o
CC net/rfkill/input.o
CC arch/x86/kernel/quirks.o
CC net/netfilter/nf_nat_helper.o
CC drivers/acpi/acpica/hwpci.o
CC kernel/trace/power-traces.o
CC fs/nfs/unlink.o
CC net/ipv4/tcp_metrics.o
CC fs/autofs/init.o
CC fs/9p/vfs_super.o
AR fs/hostfs/built-in.a
CC drivers/acpi/scan.o
CC net/ipv4/tcp_fastopen.o
CC lib/logic_pio.o
CC fs/autofs/inode.o
CC net/netlabel/netlabel_kapi.o
CC drivers/base/cpu.o
CC drivers/acpi/acpica/nsaccess.o
CC drivers/acpi/acpica/nsalloc.o
CC arch/x86/kernel/kdebugfs.o
CC net/wireless/radiotap.o
CC kernel/range.o
CC net/ipv6/ip6_fib.o
CC fs/9p/vfs_inode.o
CC fs/debugfs/inode.o
CC net/sunrpc/auth_gss/gss_krb5_seal.o
LD [M] drivers/gpu/drm/scheduler/gpu-sched.o
CC fs/debugfs/file.o
CC lib/maple_tree.o
CC drivers/gpu/drm/i915/intel_wakeref.o
CC net/ipv6/ipv6_sockglue.o
CC fs/lockd/svc.o
CC fs/lockd/svclock.o
CC kernel/smpboot.o
CC fs/ext4/sysfs.o
AR net/rfkill/built-in.a
CC drivers/gpu/drm/drm_auth.o
CC drivers/base/firmware.o
CC net/netlabel/netlabel_domainhash.o
CC net/netfilter/nf_nat_masquerade.o
CC fs/ext4/xattr.o
CC net/mac80211/sta_info.o
CC net/9p/mod.o
CC drivers/acpi/acpica/nsarguments.o
CC net/mac80211/wep.o
CC drivers/dma-buf/dma-fence.o
CC fs/9p/vfs_inode_dotl.o
CC drivers/acpi/mipi-disco-img.o
CC arch/x86/kernel/alternative.o
CC fs/autofs/root.o
CC net/wireless/util.o
CC net/netfilter/nf_nat_ftp.o
CC net/netlabel/netlabel_addrlist.o
CC drivers/base/init.o
CC drivers/base/map.o
CC fs/autofs/symlink.o
CC drivers/acpi/acpica/nsconvert.o
CC drivers/acpi/acpica/nsdump.o
CC [M] drivers/gpu/drm/xe/xe_bo_evict.o
CC net/sunrpc/auth_gss/gss_krb5_unseal.o
CC kernel/ucount.o
CC drivers/acpi/resource.o
CC net/9p/client.o
CC net/wireless/reg.o
CC net/wireless/scan.o
CC drivers/gpu/drm/drm_blend.o
CC drivers/acpi/acpica/nseval.o
CC [M] drivers/gpu/drm/xe/xe_debugfs.o
CC net/ipv6/ndisc.o
CC net/ipv4/tcp_rate.o
CC drivers/gpu/drm/drm_bridge.o
CC net/sunrpc/auth_tls.o
CC drivers/dma-buf/dma-fence-array.o
CC drivers/acpi/acpica/nsinit.o
CC drivers/dma-buf/dma-fence-chain.o
CC net/netfilter/nf_nat_irc.o
CC drivers/gpu/drm/i915/vlv_sideband.o
CC mm/mmu_gather.o
CC kernel/trace/rpm-traces.o
CC net/netfilter/nf_nat_sip.o
AR fs/debugfs/built-in.a
CC net/netfilter/x_tables.o
CC drivers/acpi/acpi_processor.o
CC drivers/base/devres.o
CC net/netlabel/netlabel_mgmt.o
CC fs/9p/vfs_addr.o
CC [M] drivers/gpu/drm/xe/xe_devcoredump.o
CC drivers/gpu/drm/drm_cache.o
CC fs/autofs/waitq.o
CC drivers/gpu/drm/drm_client.o
CC drivers/acpi/acpica/nsload.o
CC kernel/regset.o
CC drivers/gpu/drm/i915/vlv_suspend.o
CC net/sunrpc/auth_gss/gss_krb5_wrap.o
CC fs/nfs/write.o
CC fs/lockd/svcshare.o
CC net/sunrpc/auth_gss/gss_krb5_crypto.o
CC fs/autofs/expire.o
CC drivers/acpi/processor_core.o
CC fs/tracefs/inode.o
CC [M] fs/efivarfs/inode.o
CC fs/tracefs/event_inode.o
CC [M] fs/efivarfs/file.o
CC fs/autofs/dev-ioctl.o
CC arch/x86/kernel/i8253.o
CC [M] drivers/gpu/drm/xe/xe_device.o
CC drivers/dma-buf/dma-fence-unwrap.o
CC net/sunrpc/auth_gss/gss_krb5_keys.o
CC drivers/acpi/acpica/nsnames.o
CC kernel/ksyms_common.o
CC drivers/gpu/drm/i915/soc/intel_dram.o
CC mm/mprotect.o
CC mm/mremap.o
CC drivers/base/attribute_container.o
CC [M] drivers/gpu/drm/xe/xe_device_sysfs.o
CC drivers/gpu/drm/drm_client_modeset.o
CC net/ipv6/udp.o
CC net/netlabel/netlabel_unlabeled.o
CC kernel/trace/trace_dynevent.o
CC net/netlabel/netlabel_cipso_v4.o
CC drivers/gpu/drm/i915/soc/intel_gmch.o
CC drivers/gpu/drm/i915/soc/intel_pch.o
CC drivers/gpu/drm/drm_color_mgmt.o
CC fs/9p/vfs_file.o
CC net/9p/error.o
CC drivers/acpi/processor_pdc.o
CC arch/x86/kernel/hw_breakpoint.o
CC kernel/groups.o
CC [M] fs/efivarfs/super.o
CC net/9p/protocol.o
CC net/ipv4/tcp_recovery.o
CC drivers/acpi/acpica/nsobject.o
CC drivers/gpu/drm/drm_connector.o
CC drivers/dma-buf/dma-resv.o
CC mm/msync.o
CC mm/page_vma_mapped.o
CC drivers/base/transport_class.o
CC net/netlabel/netlabel_calipso.o
CC net/ipv4/tcp_ulp.o
CC net/netfilter/xt_tcpudp.o
CC net/ipv4/tcp_offload.o
CC net/ipv4/tcp_plb.o
CC fs/lockd/svcproc.o
AR fs/autofs/built-in.a
CC net/ipv4/datagram.o
CC kernel/kcmp.o
AR fs/tracefs/built-in.a
CC fs/9p/vfs_dir.o
CC drivers/acpi/ec.o
CC drivers/acpi/acpica/nsparse.o
CC net/9p/trans_common.o
AR net/sunrpc/auth_gss/built-in.a
CC fs/9p/vfs_dentry.o
CC net/ipv4/raw.o
CC fs/nfs/namespace.o
CC [M] drivers/gpu/drm/xe/xe_dma_buf.o
CC fs/9p/v9fs.o
CC drivers/base/topology.o
CC kernel/trace/trace_probe.o
CC net/netfilter/xt_CONNSECMARK.o
CC net/netfilter/xt_NFLOG.o
CC mm/pagewalk.o
CC drivers/gpu/drm/i915/i915_memcpy.o
CC [M] fs/efivarfs/vars.o
CC fs/nfs/mount_clnt.o
CC arch/x86/kernel/tsc.o
CC fs/open.o
CC fs/9p/fid.o
CC net/wireless/nl80211.o
CC drivers/acpi/acpica/nspredef.o
CC drivers/dma-buf/sync_file.o
CC mm/pgtable-generic.o
CC drivers/gpu/drm/i915/i915_mm.o
CC net/ipv6/udplite.o
CC drivers/gpu/drm/i915/i915_sw_fence.o
CC net/9p/trans_fd.o
CC arch/x86/kernel/tsc_msr.o
CC drivers/gpu/drm/i915/i915_sw_fence_work.o
CC kernel/freezer.o
CC kernel/profile.o
CC kernel/trace/trace_uprobe.o
CC drivers/acpi/dock.o
CC drivers/acpi/acpica/nsprepkg.o
CC drivers/acpi/acpica/nsrepair.o
CC net/netfilter/xt_SECMARK.o
CC fs/ext4/xattr_hurd.o
AR net/netlabel/built-in.a
CC drivers/gpu/drm/drm_crtc.o
CC drivers/acpi/acpica/nsrepair2.o
CC drivers/base/container.o
CC fs/read_write.o
CC fs/lockd/svcsubs.o
CC net/ipv6/raw.o
CC [M] drivers/gpu/drm/xe/xe_drm_client.o
CC drivers/gpu/drm/i915/i915_syncmap.o
CC drivers/acpi/acpica/nssearch.o
CC arch/x86/kernel/io_delay.o
CC net/dns_resolver/dns_key.o
CC net/ipv4/udp.o
AR drivers/dma-buf/built-in.a
CC fs/9p/xattr.o
CC net/ipv4/udplite.o
LD [M] fs/efivarfs/efivarfs.o
CC drivers/base/property.o
CC net/mac80211/aead_api.o
CC net/wireless/mlme.o
CC net/netfilter/xt_TCPMSS.o
CC fs/lockd/mon.o
CC mm/rmap.o
CC mm/vmalloc.o
CC drivers/acpi/pci_root.o
CC drivers/base/cacheinfo.o
CC drivers/acpi/acpica/nsutils.o
CC fs/lockd/trace.o
CC net/wireless/ibss.o
CC net/mac80211/wpa.o
CC drivers/gpu/drm/i915/i915_user_extensions.o
CC net/ipv4/udp_offload.o
CC fs/nfs/nfstrace.o
CC drivers/acpi/acpica/nswalk.o
CC fs/nfs/export.o
CC net/wireless/sme.o
CC arch/x86/kernel/rtc.o
CC arch/x86/kernel/resource.o
CC fs/ext4/xattr_trusted.o
CC drivers/base/swnode.o
CC fs/lockd/xdr.o
CC net/ipv4/arp.o
CC net/devres.o
CC net/handshake/alert.o
CC net/dns_resolver/dns_query.o
CC net/handshake/genl.o
CC fs/nfs/sysfs.o
CC fs/file_table.o
AR fs/9p/built-in.a
CC net/handshake/netlink.o
CC fs/super.o
CC drivers/gpu/drm/i915/i915_debugfs.o
CC net/mac80211/scan.o
CC net/socket.o
CC drivers/gpu/drm/i915/i915_debugfs_params.o
CC drivers/acpi/acpica/nsxfeval.o
AS arch/x86/kernel/irqflags.o
CC fs/char_dev.o
CC arch/x86/kernel/static_call.o
CC net/9p/trans_virtio.o
CC net/sunrpc/auth_unix.o
CC drivers/base/auxiliary.o
CC arch/x86/kernel/process.o
CC net/ipv4/icmp.o
CC [M] drivers/gpu/drm/xe/xe_exec.o
CC drivers/acpi/pci_link.o
CC fs/ext4/xattr_user.o
CC drivers/acpi/pci_irq.o
CC net/wireless/chan.o
CC drivers/acpi/acpica/nsxfname.o
CC fs/stat.o
CC arch/x86/kernel/ptrace.o
CC fs/lockd/clnt4xdr.o
CC drivers/gpu/drm/i915/i915_pmu.o
CC fs/lockd/xdr4.o
AR net/dns_resolver/built-in.a
CC kernel/trace/rethook.o
CC net/netfilter/xt_conntrack.o
CC net/ipv4/devinet.o
CC net/ipv4/af_inet.o
CC net/sysctl_net.o
CC net/netfilter/xt_policy.o
CC lib/memcat_p.o
CC drivers/base/devtmpfs.o
CC fs/exec.o
CC arch/x86/kernel/tls.o
CC fs/pipe.o
CC drivers/acpi/acpica/nsxfobj.o
CC drivers/gpu/drm/i915/gt/gen2_engine_cs.o
CC fs/namei.o
CC fs/fcntl.o
CC arch/x86/kernel/step.o
CC net/netfilter/xt_state.o
CC net/ipv6/icmp.o
CC lib/nmi_backtrace.o
CC net/handshake/request.o
CC fs/ext4/fast_commit.o
CC net/ipv6/mcast.o
CC [M] drivers/gpu/drm/xe/xe_execlist.o
CC fs/ioctl.o
CC arch/x86/kernel/i8237.o
CC net/sunrpc/svc.o
CC mm/process_vm_access.o
AR kernel/trace/built-in.a
AR net/9p/built-in.a
CC kernel/stacktrace.o
CC mm/page_alloc.o
CC drivers/acpi/acpica/psargs.o
CC drivers/gpu/drm/drm_displayid.o
CC drivers/gpu/drm/i915/gt/gen6_engine_cs.o
CC arch/x86/kernel/stacktrace.o
CC drivers/acpi/acpi_apd.o
CC kernel/dma.o
CC arch/x86/kernel/reboot.o
CC net/sunrpc/svcsock.o
CC drivers/base/module.o
CC arch/x86/kernel/msr.o
AR drivers/cxl/core/built-in.a
AR drivers/cxl/built-in.a
CC fs/lockd/svc4proc.o
CC drivers/macintosh/mac_hid.o
CC lib/objpool.o
CC arch/x86/kernel/cpuid.o
CC [M] net/netfilter/nf_log_syslog.o
CC net/ipv4/igmp.o
CC [M] net/netfilter/xt_mark.o
CC net/sunrpc/svcauth.o
CC drivers/acpi/acpica/psloop.o
CC [M] net/netfilter/xt_nat.o
CC drivers/gpu/drm/i915/gt/gen6_ppgtt.o
CC kernel/smp.o
CC lib/plist.o
CC drivers/gpu/drm/i915/gt/gen7_renderclear.o
CC lib/radix-tree.o
CC [M] drivers/gpu/drm/xe/xe_exec_queue.o
CC fs/nfs/fs_context.o
CC net/wireless/ethtool.o
CC drivers/base/devcoredump.o
CC fs/nfs/nfsroot.o
CC fs/ext4/orphan.o
CC mm/init-mm.o
CC net/wireless/mesh.o
CC net/ipv4/fib_frontend.o
CC fs/lockd/procfs.o
CC [M] drivers/gpu/drm/xe/xe_force_wake.o
CC [M] drivers/gpu/drm/xe/xe_ggtt.o
CC fs/readdir.o
CC drivers/gpu/drm/drm_drv.o
AR drivers/macintosh/built-in.a
CC drivers/acpi/acpica/psobject.o
CC net/wireless/ap.o
CC arch/x86/kernel/early-quirks.o
CC mm/memblock.o
CC mm/slub.o
CC fs/nfs/sysctl.o
CC mm/madvise.o
CC net/handshake/tlshd.o
CC net/ipv4/fib_semantics.o
CC net/ipv6/reassembly.o
CC [M] net/netfilter/xt_LOG.o
CC [M] net/netfilter/xt_MASQUERADE.o
CC net/ipv4/fib_trie.o
CC net/ipv4/fib_notifier.o
CC drivers/base/platform-msi.o
CC drivers/acpi/acpica/psopcode.o
CC mm/page_io.o
CC drivers/acpi/acpi_platform.o
CC lib/ratelimit.o
AR fs/lockd/built-in.a
CC net/mac80211/offchannel.o
CC drivers/acpi/acpi_pnp.o
CC [M] net/netfilter/xt_addrtype.o
CC fs/ext4/acl.o
CC net/handshake/trace.o
CC net/ipv6/tcp_ipv6.o
CC fs/ext4/xattr_security.o
CC drivers/acpi/acpica/psopinfo.o
CC kernel/uid16.o
CC lib/rbtree.o
CC drivers/acpi/acpica/psparse.o
CC [M] drivers/gpu/drm/xe/xe_gpu_scheduler.o
CC net/wireless/trace.o
CC arch/x86/kernel/smp.o
CC drivers/base/physical_location.o
CC drivers/gpu/drm/i915/gt/gen8_engine_cs.o
CC drivers/acpi/power.o
AR net/netfilter/built-in.a
CC drivers/acpi/event.o
CC drivers/acpi/acpica/psscope.o
CC kernel/kallsyms.o
CC drivers/acpi/acpica/pstree.o
HOSTCC drivers/gpu/drm/xe/xe_gen_wa_oob
CC lib/seq_buf.o
CC net/wireless/ocb.o
CC kernel/acct.o
CC arch/x86/kernel/smpboot.o
CC fs/nfs/nfs3super.o
CC drivers/acpi/acpica/psutils.o
CC [M] drivers/gpu/drm/xe/xe_gsc_proxy.o
CC mm/swap_state.o
CC drivers/base/trace.o
CC fs/nfs/nfs3client.o
CC [M] drivers/gpu/drm/xe/xe_gsc_submit.o
CC lib/siphash.o
CC fs/select.o
CC lib/string.o
CC mm/swapfile.o
CC net/sunrpc/svcauth_unix.o
CC drivers/acpi/evged.o
CC lib/timerqueue.o
CC drivers/acpi/sysfs.o
CC kernel/vmcore_info.o
AR fs/ext4/built-in.a
CC fs/dcache.o
CC mm/swap_slots.o
CC net/sunrpc/addr.o
CC net/sunrpc/rpcb_clnt.o
CC drivers/acpi/acpica/pswalk.o
CC drivers/acpi/property.o
CC fs/nfs/nfs3proc.o
CC net/ipv4/inet_fragment.o
CC net/ipv4/ping.o
CC drivers/gpu/drm/i915/gt/gen8_ppgtt.o
CC fs/inode.o
CC drivers/acpi/acpica/psxface.o
CC kernel/elfcorehdr.o
CC drivers/acpi/debugfs.o
CC drivers/acpi/acpi_lpat.o
CC fs/nfs/nfs3xdr.o
CC lib/vsprintf.o
CC [M] drivers/gpu/drm/xe/xe_gt.o
CC drivers/gpu/drm/i915/gt/intel_breadcrumbs.o
CC arch/x86/kernel/tsc_sync.o
CC drivers/acpi/acpica/rsaddr.o
CC mm/dmapool.o
AR drivers/base/built-in.a
AR net/handshake/built-in.a
CC drivers/acpi/acpica/rscalc.o
CC kernel/crash_reserve.o
CC arch/x86/kernel/setup_percpu.o
CC kernel/kexec_core.o
CC drivers/gpu/drm/i915/gt/intel_context.o
CC lib/win_minmax.o
CC drivers/gpu/drm/i915/gt/intel_context_sseu.o
CC drivers/gpu/drm/i915/gt/intel_engine_cs.o
CC net/wireless/pmsr.o
CC drivers/gpu/drm/i915/gt/intel_engine_heartbeat.o
CC net/mac80211/ht.o
CC kernel/crash_core.o
CC drivers/acpi/acpi_pcc.o
CC net/ipv6/ping.o
CC drivers/acpi/acpica/rscreate.o
CC fs/nfs/nfs3acl.o
CC arch/x86/kernel/mpparse.o
CC net/sunrpc/timer.o
CC drivers/gpu/drm/drm_dumb_buffers.o
CC net/mac80211/agg-tx.o
CC mm/hugetlb.o
CC fs/attr.o
CC fs/nfs/nfs4proc.o
CC fs/nfs/nfs4xdr.o
GEN net/wireless/shipped-certs.c
CC arch/x86/kernel/trace_clock.o
CC net/mac80211/agg-rx.o
CC drivers/acpi/acpica/rsdumpinfo.o
CC net/mac80211/vht.o
CC lib/xarray.o
CC drivers/acpi/acpica/rsinfo.o
CC drivers/gpu/drm/drm_edid.o
CC net/ipv4/ip_tunnel_core.o
CC drivers/gpu/drm/drm_eld.o
CC mm/mmu_notifier.o
CC drivers/gpu/drm/drm_encoder.o
CC net/sunrpc/xdr.o
CC drivers/acpi/acpica/rsio.o
CC fs/nfs/nfs4state.o
CC net/ipv4/gre_offload.o
CC [M] drivers/gpu/drm/xe/xe_gt_ccs_mode.o
CC fs/bad_inode.o
CC net/ipv6/exthdrs.o
CC mm/migrate.o
CC fs/nfs/nfs4renewd.o
CC net/ipv4/metrics.o
CC drivers/acpi/acpica/rsirq.o
CC kernel/kexec.o
CC net/mac80211/he.o
CC drivers/acpi/acpica/rslist.o
CC drivers/acpi/ac.o
CC fs/file.o
CC net/ipv6/datagram.o
CC arch/x86/kernel/trace.o
CC net/ipv6/ip6_flowlabel.o
CC drivers/gpu/drm/i915/gt/intel_engine_pm.o
CC drivers/gpu/drm/i915/gt/intel_engine_user.o
CC net/mac80211/s1g.o
CC drivers/acpi/acpica/rsmemory.o
CC kernel/utsname.o
CC mm/page_counter.o
CC drivers/acpi/acpica/rsmisc.o
CC fs/nfs/nfs4super.o
CC fs/filesystems.o
CC [M] drivers/gpu/drm/xe/xe_gt_clock.o
CC fs/nfs/nfs4file.o
CC fs/nfs/delegation.o
CC drivers/gpu/drm/drm_file.o
CC drivers/gpu/drm/i915/gt/intel_execlists_submission.o
CC drivers/acpi/acpica/rsserial.o
CC net/mac80211/ibss.o
CC net/sunrpc/sunrpc_syms.o
CC net/wireless/shipped-certs.o
CC fs/nfs/nfs4idmap.o
CC lib/lockref.o
CC drivers/gpu/drm/i915/gt/intel_ggtt.o
CC net/sunrpc/cache.o
CC kernel/pid_namespace.o
CC net/sunrpc/rpc_pipe.o
CC arch/x86/kernel/rethook.o
CC drivers/acpi/acpica/rsutils.o
CC lib/bcd.o
CC fs/nfs/callback.o
CC drivers/acpi/acpica/rsxface.o
CC mm/hugetlb_cgroup.o
CC net/ipv4/netlink.o
CC fs/nfs/callback_xdr.o
AR drivers/scsi/pcmcia/built-in.a
CC drivers/scsi/scsi.o
CC lib/sort.o
CC [M] drivers/gpu/drm/xe/xe_gt_debugfs.o
CC drivers/scsi/hosts.o
CC net/mac80211/iface.o
CC net/ipv6/inet6_connection_sock.o
CC lib/parser.o
CC fs/namespace.o
CC drivers/gpu/drm/i915/gt/intel_ggtt_fencing.o
CC net/sunrpc/sysfs.o
CC drivers/acpi/acpica/tbdata.o
CC drivers/gpu/drm/i915/gt/intel_gt.o
CC mm/early_ioremap.o
CC arch/x86/kernel/vmcore_info_32.o
AR drivers/nvme/common/built-in.a
AR drivers/nvme/host/built-in.a
CC mm/secretmem.o
CC mm/hmm.o
AR drivers/nvme/target/built-in.a
AR drivers/nvme/built-in.a
CC net/ipv6/udp_offload.o
CC mm/memfd.o
CC mm/ptdump.o
CC net/sunrpc/svc_xprt.o
CC net/ipv6/seg6.o
CC drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.o
CC lib/debug_locks.o
CC fs/nfs/callback_proc.o
CC kernel/stop_machine.o
CC lib/random32.o
CC [M] drivers/gpu/drm/xe/xe_gt_freq.o
CC [M] drivers/gpu/drm/xe/xe_gt_idle.o
CC mm/execmem.o
CC drivers/acpi/acpica/tbfadt.o
CC net/mac80211/link.o
CC net/mac80211/rate.o
CC arch/x86/kernel/machine_kexec_32.o
CC net/sunrpc/xprtmultipath.o
CC fs/nfs/nfs4namespace.o
CC net/ipv4/nexthop.o
CC net/ipv4/udp_tunnel_stub.o
CC drivers/gpu/drm/i915/gt/intel_gt_ccs_mode.o
CC fs/nfs/nfs4getroot.o
CC lib/bust_spinlocks.o
CC lib/kasprintf.o
CC fs/nfs/nfs4client.o
CC net/mac80211/michael.o
CC drivers/gpu/drm/drm_fourcc.o
CC drivers/gpu/drm/drm_framebuffer.o
CC fs/nfs/nfs4session.o
CC net/ipv4/ip_tunnel.o
CC drivers/acpi/acpica/tbfind.o
CC drivers/gpu/drm/drm_gem.o
CC drivers/acpi/acpica/tbinstal.o
CC drivers/gpu/drm/drm_ioctl.o
CC drivers/scsi/scsi_ioctl.o
CC kernel/audit.o
CC net/sunrpc/stats.o
CC drivers/gpu/drm/i915/gt/intel_gt_clock_utils.o
AR mm/built-in.a
CC drivers/acpi/acpica/tbprint.o
CC net/ipv6/fib6_notifier.o
CC lib/bitmap.o
CC [M] drivers/gpu/drm/xe/xe_gt_mcr.o
CC net/ipv6/rpl.o
CC [M] drivers/gpu/drm/xe/xe_gt_pagefault.o
CC net/ipv6/ioam6.o
CC net/mac80211/tkip.o
CC [M] drivers/gpu/drm/xe/xe_gt_sysfs.o
CC net/ipv6/sysctl_net_ipv6.o
CC fs/nfs/dns_resolve.o
CC lib/scatterlist.o
CC drivers/gpu/drm/drm_lease.o
AS arch/x86/kernel/relocate_kernel_32.o
CC lib/list_sort.o
CC drivers/acpi/acpica/tbutils.o
CC lib/uuid.o
CC arch/x86/kernel/crash_dump_32.o
CC drivers/acpi/button.o
CC drivers/gpu/drm/i915/gt/intel_gt_debugfs.o
CC lib/iov_iter.o
CC fs/nfs/nfs4trace.o
CC arch/x86/kernel/crash.o
CC kernel/auditfilter.o
CC drivers/gpu/drm/i915/gt/intel_gt_engines_debugfs.o
CC fs/nfs/nfs4sysctl.o
CC net/mac80211/aes_cmac.o
CC drivers/acpi/acpica/tbxface.o
CC net/sunrpc/sysctl.o
CC net/ipv6/xfrm6_policy.o
CC drivers/ata/libata-core.o
CC drivers/acpi/fan_core.o
CC drivers/ata/libata-scsi.o
CC [M] drivers/gpu/drm/xe/xe_gt_throttle.o
AR drivers/net/phy/qcom/built-in.a
CC drivers/scsi/scsicam.o
CC drivers/gpu/drm/drm_managed.o
CC drivers/net/phy/mdio-boardinfo.o
CC arch/x86/kernel/module.o
CC net/mac80211/aes_gmac.o
CC drivers/ata/libata-eh.o
CC drivers/scsi/scsi_error.o
CC drivers/firewire/init_ohci1394_dma.o
CC drivers/gpu/drm/i915/gt/intel_gt_irq.o
CC drivers/acpi/fan_attr.o
CC net/mac80211/fils_aead.o
CC net/mac80211/cfg.o
CC drivers/acpi/acpi_video.o
CC drivers/acpi/acpica/tbxfload.o
CC drivers/ata/libata-transport.o
CC drivers/ata/libata-trace.o
CC net/ipv6/xfrm6_state.o
CC drivers/gpu/drm/drm_mm.o
CC drivers/scsi/scsi_lib.o
CC lib/clz_ctz.o
CC drivers/acpi/acpica/tbxfroot.o
CC drivers/gpu/drm/drm_mode_config.o
CC [M] drivers/gpu/drm/xe/xe_gt_tlb_invalidation.o
CC drivers/gpu/drm/drm_mode_object.o
CC net/mac80211/ethtool.o
CC drivers/acpi/video_detect.o
CC drivers/gpu/drm/i915/gt/intel_gt_mcr.o
CC lib/bsearch.o
CC drivers/scsi/constants.o
CC drivers/acpi/processor_driver.o
CC arch/x86/kernel/doublefault_32.o
CC net/ipv6/xfrm6_input.o
CC net/ipv6/xfrm6_output.o
CC drivers/acpi/acpica/utaddress.o
CC drivers/gpu/drm/drm_modes.o
CC drivers/acpi/acpica/utalloc.o
CC drivers/acpi/processor_thermal.o
CC net/mac80211/rx.o
AR drivers/firewire/built-in.a
CC drivers/scsi/scsi_lib_dma.o
CC drivers/net/phy/stubs.o
CC net/ipv4/sysctl_net_ipv4.o
CC drivers/gpu/drm/i915/gt/intel_gt_pm.o
CC fs/seq_file.o
CC fs/xattr.o
CC drivers/acpi/acpica/utascii.o
CC net/mac80211/spectmgmt.o
CC kernel/auditsc.o
CC drivers/acpi/acpica/utbuffer.o
CC drivers/ata/libata-sata.o
CC drivers/acpi/acpica/utcksum.o
CC net/mac80211/tx.o
CC drivers/ata/libata-sff.o
CC drivers/net/phy/mdio_devres.o
CC drivers/scsi/scsi_scan.o
CC drivers/ata/libata-pmp.o
CC drivers/gpu/drm/drm_modeset_lock.o
CC net/ipv4/proc.o
CC drivers/net/phy/phy.o
CC drivers/cdrom/cdrom.o
CC net/mac80211/key.o
CC drivers/gpu/drm/drm_plane.o
CC lib/find_bit.o
CC [M] drivers/gpu/drm/xe/xe_gt_topology.o
CC drivers/acpi/acpica/utcopy.o
CC net/mac80211/util.o
CC drivers/acpi/processor_idle.o
CC drivers/net/phy/phy-c45.o
CC drivers/acpi/acpica/utexcep.o
CC drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.o
CC drivers/acpi/processor_throttling.o
CC lib/llist.o
AR drivers/auxdisplay/built-in.a
GEN xe_wa_oob.c xe_wa_oob.h
CC drivers/gpu/drm/drm_prime.o
CC drivers/acpi/acpica/utdebug.o
CC arch/x86/kernel/early_printk.o
AR net/sunrpc/built-in.a
CC drivers/acpi/processor_perflib.o
CC drivers/net/phy/phy-core.o
CC drivers/pcmcia/cs.o
CC lib/lwq.o
CC drivers/usb/common/common.o
CC drivers/net/phy/phy_device.o
CC drivers/usb/common/debug.o
CC drivers/acpi/acpica/utdecode.o
CC fs/libfs.o
CC lib/memweight.o
CC drivers/gpu/drm/drm_print.o
CC drivers/ata/libata-acpi.o
CC [M] drivers/gpu/drm/xe/xe_guc_ct.o
CC drivers/gpu/drm/i915/gt/intel_gt_pm_irq.o
CC drivers/acpi/acpica/utdelete.o
CC lib/kfifo.o
CC drivers/gpu/drm/drm_property.o
CC arch/x86/kernel/hpet.o
CC net/ipv6/xfrm6_protocol.o
GEN drivers/scsi/scsi_devinfo_tbl.c
CC drivers/scsi/scsi_devinfo.o
CC drivers/usb/core/usb.o
CC net/mac80211/parse.o
AR drivers/usb/phy/built-in.a
CC drivers/gpu/drm/i915/gt/intel_gt_requests.o
CC fs/fs-writeback.o
CC drivers/usb/mon/mon_main.o
CC net/mac80211/wme.o
CC net/mac80211/chan.o
CC drivers/usb/mon/mon_stat.o
CC net/mac80211/trace.o
CC drivers/acpi/container.o
CC drivers/usb/core/hub.o
CC lib/percpu-refcount.o
AR drivers/usb/common/built-in.a
CC drivers/net/phy/linkmode.o
CC drivers/scsi/scsi_sysctl.o
CC drivers/acpi/acpica/uterror.o
CC drivers/pcmcia/socket_sysfs.o
CC drivers/usb/core/hcd.o
CC [M] drivers/gpu/drm/xe/xe_guc_db_mgr.o
CC drivers/gpu/drm/drm_syncobj.o
CC arch/x86/kernel/amd_nb.o
CC net/ipv4/fib_rules.o
CC drivers/acpi/thermal_lib.o
CC arch/x86/kernel/kvm.o
CC drivers/gpu/drm/drm_sysfs.o
CC net/mac80211/mlme.o
AR fs/nfs/built-in.a
CC drivers/ata/libata-pata-timings.o
CC drivers/usb/host/pci-quirks.o
CC drivers/usb/host/ehci-hcd.o
CC drivers/acpi/acpica/uteval.o
CC drivers/usb/host/ehci-pci.o
CC net/ipv4/ipmr.o
CC drivers/usb/mon/mon_text.o
CC drivers/pcmcia/cardbus.o
CC [M] drivers/gpu/drm/xe/xe_guc_debugfs.o
AR drivers/cdrom/built-in.a
CC [M] drivers/gpu/drm/xe/xe_guc_hwconfig.o
CC drivers/acpi/thermal.o
CC drivers/acpi/acpica/utglobal.o
CC drivers/scsi/scsi_proc.o
CC kernel/audit_watch.o
CC net/ipv6/netfilter.o
CC lib/rhashtable.o
CC drivers/usb/core/urb.o
CC drivers/ata/ahci.o
CC [M] drivers/gpu/drm/xe/xe_guc_id_mgr.o
CC net/mac80211/tdls.o
CC kernel/audit_fsnotify.o
CC net/ipv6/proc.o
CC drivers/scsi/scsi_debugfs.o
CC drivers/acpi/acpica/uthex.o
CC drivers/gpu/drm/i915/gt/intel_gt_sysfs.o
CC drivers/ata/libahci.o
CC drivers/net/phy/mdio_bus.o
CC drivers/usb/core/message.o
CC drivers/ata/ata_piix.o
CC arch/x86/kernel/kvmclock.o
CC net/mac80211/ocb.o
CC drivers/usb/host/ohci-hcd.o
CC drivers/pcmcia/ds.o
CC drivers/usb/core/driver.o
CC drivers/acpi/acpica/utids.o
CC [M] drivers/gpu/drm/xe/xe_guc_klv_helpers.o
CC drivers/net/phy/mdio_device.o
CC net/ipv6/syncookies.o
CC drivers/usb/class/usblp.o
CC drivers/usb/storage/scsiglue.o
CC drivers/usb/mon/mon_bin.o
AR drivers/usb/misc/built-in.a
CC arch/x86/kernel/paravirt.o
CC drivers/gpu/drm/drm_trace_points.o
CC net/mac80211/airtime.o
CC drivers/gpu/drm/drm_vblank.o
CC drivers/usb/core/config.o
CC drivers/scsi/scsi_trace.o
CC net/ipv4/ipmr_base.o
CC drivers/usb/core/file.o
CC net/ipv4/syncookies.o
CC kernel/audit_tree.o
CC drivers/usb/core/buffer.o
CC net/mac80211/eht.o
CC [M] drivers/gpu/drm/xe/xe_guc_log.o
CC drivers/acpi/acpica/utinit.o
CC lib/base64.o
CC drivers/net/phy/swphy.o
AR net/wireless/built-in.a
CC drivers/net/phy/fixed_phy.o
CC lib/once.o
CC drivers/usb/storage/protocol.o
CC drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.o
CC drivers/ata/pata_amd.o
CC net/ipv6/calipso.o
CC drivers/usb/core/sysfs.o
CC drivers/acpi/acpica/utlock.o
CC drivers/usb/host/ohci-pci.o
CC arch/x86/kernel/pvclock.o
CC drivers/net/phy/realtek.o
CC drivers/input/serio/serio.o
CC drivers/usb/core/endpoint.o
CC drivers/usb/core/devio.o
AR drivers/usb/class/built-in.a
CC lib/refcount.o
CC drivers/usb/storage/transport.o
CC drivers/pcmcia/pcmcia_resource.o
CC drivers/input/serio/i8042.o
CC drivers/usb/core/notify.o
CC drivers/input/serio/serport.o
CC fs/pnode.o
CC fs/splice.o
CC fs/sync.o
CC drivers/scsi/scsi_logging.o
AR drivers/usb/mon/built-in.a
CC [M] drivers/gpu/drm/xe/xe_guc_pc.o
CC [M] drivers/gpu/drm/xe/xe_guc_submit.o
CC drivers/acpi/acpica/utmath.o
CC lib/rcuref.o
CC net/ipv6/ah6.o
CC net/ipv6/esp6.o
CC net/ipv6/sit.o
CC drivers/usb/core/generic.o
CC drivers/usb/storage/usb.o
CC drivers/usb/core/quirks.o
CC drivers/input/serio/libps2.o
CC lib/usercopy.o
CC net/ipv4/tunnel4.o
CC arch/x86/kernel/pcspeaker.o
CC drivers/acpi/nhlt.o
CC kernel/kprobes.o
CC net/mac80211/led.o
CC drivers/gpu/drm/drm_vblank_work.o
CC drivers/gpu/drm/drm_vma_manager.o
CC drivers/input/keyboard/atkbd.o
CC drivers/acpi/acpica/utmisc.o
CC drivers/usb/core/devices.o
CC drivers/gpu/drm/drm_writeback.o
CC drivers/ata/pata_oldpiix.o
CC drivers/input/mouse/psmouse-base.o
CC drivers/usb/core/phy.o
CC net/ipv4/ipconfig.o
CC drivers/input/mouse/synaptics.o
CC drivers/acpi/acpica/utmutex.o
CC lib/errseq.o
CC drivers/acpi/acpi_memhotplug.o
CC drivers/pcmcia/cistpl.o
CC fs/utimes.o
CC drivers/gpu/drm/i915/gt/intel_gtt.o
CC lib/bucket_locks.o
CC arch/x86/kernel/check.o
CC drivers/usb/host/uhci-hcd.o
CC fs/d_path.o
CC net/mac80211/pm.o
CC drivers/acpi/acpica/utnonansi.o
CC drivers/usb/core/port.o
CC drivers/acpi/ioapic.o
CC drivers/scsi/scsi_pm.o
AR drivers/input/joystick/built-in.a
CC drivers/usb/storage/initializers.o
CC drivers/usb/storage/sierra_ms.o
AR drivers/net/phy/built-in.a
CC net/mac80211/rc80211_minstrel_ht.o
AR drivers/net/pse-pd/built-in.a
CC drivers/input/mouse/focaltech.o
CC drivers/net/mdio/acpi_mdio.o
CC net/mac80211/wbrf.o
CC drivers/net/mdio/fwnode_mdio.o
AR drivers/net/pcs/built-in.a
CC [M] drivers/gpu/drm/xe/xe_heci_gsc.o
CC drivers/pcmcia/pcmcia_cis.o
AR drivers/input/serio/built-in.a
CC drivers/gpu/drm/drm_panel.o
CC fs/stack.o
CC drivers/ata/pata_sch.o
CC drivers/usb/core/hcd-pci.o
CC drivers/usb/storage/option_ms.o
CC drivers/acpi/acpica/utobject.o
CC drivers/usb/storage/usual-tables.o
CC drivers/gpu/drm/i915/gt/intel_llc.o
CC drivers/gpu/drm/i915/gt/intel_lrc.o
CC drivers/pcmcia/rsrc_mgr.o
CC arch/x86/kernel/uprobes.o
CC lib/generic-radix-tree.o
CC lib/bitmap-str.o
CC net/ipv4/netfilter.o
CC fs/fs_struct.o
CC net/ipv6/addrconf_core.o
CC kernel/seccomp.o
CC lib/string_helpers.o
AR drivers/input/keyboard/built-in.a
CC drivers/rtc/lib.o
CC drivers/gpu/drm/i915/gt/intel_migrate.o
CC drivers/ata/pata_mpiix.o
CC drivers/i2c/algos/i2c-algo-bit.o
CC drivers/ata/ata_generic.o
CC drivers/gpu/drm/i915/gt/intel_mocs.o
CC drivers/rtc/class.o
CC net/ipv6/exthdrs_core.o
CC drivers/acpi/battery.o
CC drivers/scsi/scsi_bsg.o
CC drivers/i2c/busses/i2c-i801.o
CC drivers/acpi/acpica/utosi.o
CC drivers/acpi/bgrt.o
CC [M] drivers/gpu/drm/xe/xe_hw_engine.o
CC drivers/scsi/scsi_common.o
CC [M] drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.o
CC drivers/input/mouse/alps.o
CC drivers/input/mouse/byd.o
CC drivers/acpi/spcr.o
AR drivers/net/mdio/built-in.a
CC [M] drivers/gpu/drm/xe/xe_hw_fence.o
AR drivers/input/tablet/built-in.a
AR drivers/i2c/muxes/built-in.a
AR drivers/net/ethernet/3com/built-in.a
CC drivers/i2c/i2c-boardinfo.o
CC drivers/net/ethernet/8390/ne2k-pci.o
AR drivers/input/touchscreen/built-in.a
AR drivers/usb/storage/built-in.a
CC drivers/input/input.o
CC drivers/net/ethernet/8390/8390.o
AR drivers/input/misc/built-in.a
CC drivers/rtc/interface.o
AR drivers/i3c/built-in.a
CC drivers/pcmcia/rsrc_nonstatic.o
CC net/ipv4/tcp_cubic.o
CC [M] drivers/gpu/drm/xe/xe_huc.o
AR drivers/media/i2c/built-in.a
CC [M] drivers/gpu/drm/xe/xe_huc_debugfs.o
CC fs/statfs.o
AR drivers/media/tuners/built-in.a
CC fs/fs_pin.o
CC drivers/usb/core/usb-acpi.o
AR drivers/media/rc/keymaps/built-in.a
AR drivers/media/rc/built-in.a
CC fs/nsfs.o
AR drivers/media/common/b2c2/built-in.a
CC lib/hexdump.o
AR drivers/media/common/saa7146/built-in.a
CC drivers/rtc/nvmem.o
AR drivers/media/common/siano/built-in.a
CC drivers/acpi/acpica/utownerid.o
CC drivers/pcmcia/yenta_socket.o
CC arch/x86/kernel/perf_regs.o
AR drivers/media/common/v4l2-tpg/built-in.a
AR drivers/media/common/videobuf2/built-in.a
AR drivers/media/common/built-in.a
CC drivers/acpi/acpica/utpredef.o
AR drivers/media/platform/allegro-dvt/built-in.a
AR drivers/media/platform/amlogic/meson-ge2d/built-in.a
AR drivers/media/platform/amlogic/built-in.a
AR drivers/media/platform/amphion/built-in.a
CC drivers/rtc/dev.o
AR drivers/media/platform/aspeed/built-in.a
CC drivers/gpu/drm/drm_pci.o
AR drivers/media/platform/atmel/built-in.a
CC drivers/rtc/proc.o
CC lib/kstrtox.o
CC drivers/gpu/drm/drm_debugfs.o
AR drivers/media/platform/broadcom/built-in.a
AR drivers/media/platform/cadence/built-in.a
AR drivers/media/platform/chips-media/coda/built-in.a
AR drivers/media/platform/chips-media/wave5/built-in.a
AR drivers/media/platform/chips-media/built-in.a
CC drivers/scsi/scsi_transport_spi.o
CC fs/fs_types.o
CC drivers/usb/host/xhci.o
AR drivers/media/platform/intel/built-in.a
AR drivers/ata/built-in.a
CC fs/fs_context.o
AR drivers/media/platform/marvell/built-in.a
CC fs/fs_parser.o
CC lib/iomap.o
CC drivers/gpu/drm/i915/gt/intel_ppgtt.o
AR drivers/media/platform/mediatek/jpeg/built-in.a
AR drivers/media/platform/mediatek/mdp/built-in.a
AR drivers/i2c/algos/built-in.a
CC drivers/acpi/acpica/utresdecode.o
CC drivers/rtc/sysfs.o
CC drivers/i2c/i2c-core-base.o
AR drivers/media/platform/mediatek/vcodec/common/built-in.a
CC drivers/usb/host/xhci-mem.o
CC drivers/usb/host/xhci-ext-caps.o
AR drivers/media/platform/mediatek/vcodec/encoder/built-in.a
AR drivers/media/platform/mediatek/vcodec/decoder/built-in.a
CC arch/x86/kernel/tracepoint.o
AR drivers/media/platform/mediatek/vcodec/built-in.a
CC drivers/scsi/virtio_scsi.o
AR drivers/media/platform/mediatek/vpu/built-in.a
AR drivers/media/platform/mediatek/mdp3/built-in.a
CC net/ipv6/ip6_checksum.o
AR drivers/media/platform/mediatek/built-in.a
CC drivers/usb/early/ehci-dbgp.o
CC drivers/scsi/sd.o
AR drivers/media/platform/microchip/built-in.a
CC [M] drivers/gpu/drm/xe/xe_irq.o
AR drivers/media/platform/nuvoton/built-in.a
CC lib/iomap_copy.o
CC drivers/acpi/acpica/utresrc.o
AR drivers/media/platform/nvidia/tegra-vde/built-in.a
AR drivers/media/platform/nvidia/built-in.a
AR drivers/usb/core/built-in.a
CC drivers/scsi/sr.o
AR drivers/media/platform/nxp/dw100/built-in.a
AR drivers/media/platform/nxp/imx-jpeg/built-in.a
CC [M] drivers/gpu/drm/xe/xe_lrc.o
AR drivers/media/platform/nxp/imx8-isi/built-in.a
CC [M] drivers/gpu/drm/xe/xe_migrate.o
CC drivers/gpu/drm/i915/gt/intel_rc6.o
AR drivers/media/platform/nxp/built-in.a
CC lib/devres.o
CC [M] drivers/gpu/drm/xe/xe_mmio.o
CC drivers/acpi/acpica/utstate.o
AR drivers/media/platform/qcom/camss/built-in.a
AR drivers/media/platform/qcom/venus/built-in.a
CC drivers/gpu/drm/drm_debugfs_crc.o
AR drivers/media/platform/qcom/built-in.a
AR drivers/i2c/busses/built-in.a
CC lib/check_signature.o
CC drivers/gpu/drm/drm_panel_orientation_quirks.o
CC kernel/relay.o
AR drivers/media/platform/renesas/rcar-vin/built-in.a
AR drivers/media/platform/renesas/rzg2l-cru/built-in.a
AR drivers/media/platform/rockchip/rga/built-in.a
CC lib/interval_tree.o
AR drivers/media/platform/renesas/vsp1/built-in.a
CC fs/fsopen.o
CC lib/assoc_array.o
AR drivers/media/platform/rockchip/rkisp1/built-in.a
AR drivers/media/platform/renesas/built-in.a
CC kernel/utsname_sysctl.o
AR drivers/media/platform/rockchip/built-in.a
CC drivers/rtc/rtc-mc146818-lib.o
CC kernel/delayacct.o
CC kernel/taskstats.o
AR drivers/media/platform/samsung/exynos-gsc/built-in.a
CC drivers/gpu/drm/i915/gt/intel_region_lmem.o
AR drivers/media/platform/samsung/exynos4-is/built-in.a
CC arch/x86/kernel/itmt.o
AR drivers/media/platform/samsung/s3c-camif/built-in.a
AR drivers/net/ethernet/8390/built-in.a
AR drivers/media/platform/samsung/s5p-g2d/built-in.a
AR drivers/net/ethernet/adaptec/built-in.a
CC drivers/gpu/drm/drm_buddy.o
AR drivers/media/platform/samsung/s5p-jpeg/built-in.a
AR drivers/net/ethernet/agere/built-in.a
AR drivers/media/platform/samsung/s5p-mfc/built-in.a
AR drivers/net/ethernet/alacritech/built-in.a
AR drivers/media/platform/samsung/built-in.a
AR drivers/net/ethernet/alteon/built-in.a
AR drivers/net/ethernet/amazon/built-in.a
AR drivers/media/platform/st/sti/bdisp/built-in.a
AR drivers/net/ethernet/amd/built-in.a
AR drivers/media/platform/sunxi/sun4i-csi/built-in.a
AR drivers/media/platform/st/sti/c8sectpfe/built-in.a
AR drivers/media/platform/st/sti/hva/built-in.a
AR drivers/media/platform/st/sti/delta/built-in.a
AR drivers/net/ethernet/aquantia/built-in.a
CC lib/bitrev.o
CC drivers/acpi/acpica/utstring.o
CC drivers/acpi/acpica/utstrsuppt.o
AR drivers/media/platform/sunxi/sun6i-csi/built-in.a
AR drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/built-in.a
AR drivers/media/platform/sunxi/sun6i-mipi-csi2/built-in.a
AR drivers/net/ethernet/arc/built-in.a
AR drivers/media/platform/st/stm32/built-in.a
CC net/ipv4/tcp_sigpool.o
CC fs/init.o
CC drivers/input/input-compat.o
AR drivers/media/platform/sunxi/sun8i-di/built-in.a
AR drivers/media/platform/st/built-in.a
AR drivers/net/ethernet/asix/built-in.a
AR drivers/media/pci/ttpci/built-in.a
CC arch/x86/kernel/umip.o
CC arch/x86/kernel/unwind_frame.o
AR drivers/media/platform/sunxi/sun8i-rotate/built-in.a
AR drivers/media/pci/b2c2/built-in.a
AR drivers/net/ethernet/atheros/built-in.a
AR drivers/media/platform/sunxi/built-in.a
CC drivers/input/input-mt.o
CC drivers/input/mouse/logips2pp.o
AR drivers/net/ethernet/cadence/built-in.a
CC drivers/input/mouse/lifebook.o
CC drivers/net/ethernet/broadcom/bnx2.o
CC drivers/net/ethernet/broadcom/tg3.o
AR drivers/media/pci/pluto2/built-in.a
AR drivers/media/platform/ti/am437x/built-in.a
AR drivers/pcmcia/built-in.a
AR drivers/media/pci/dm1105/built-in.a
AR drivers/media/pci/pt1/built-in.a
AR drivers/net/ethernet/brocade/built-in.a
AR drivers/media/platform/ti/cal/built-in.a
AR drivers/media/platform/verisilicon/built-in.a
CC drivers/input/mouse/trackpoint.o
CC drivers/input/mouse/cypress_ps2.o
AR drivers/media/pci/pt3/built-in.a
AR drivers/media/platform/ti/vpe/built-in.a
AR drivers/media/pci/mantis/built-in.a
AR drivers/net/ethernet/cavium/common/built-in.a
CC drivers/input/mouse/psmouse-smbus.o
AR drivers/media/platform/ti/davinci/built-in.a
AR drivers/media/pci/ngene/built-in.a
AR drivers/net/ethernet/cavium/thunder/built-in.a
AR drivers/media/platform/ti/j721e-csi2rx/built-in.a
AR drivers/media/pci/ddbridge/built-in.a
AR drivers/net/ethernet/cavium/liquidio/built-in.a
AR drivers/media/platform/ti/omap/built-in.a
AR drivers/media/pci/saa7146/built-in.a
AR drivers/net/ethernet/cavium/octeon/built-in.a
AR drivers/net/ethernet/cavium/built-in.a
AR drivers/media/platform/ti/omap3isp/built-in.a
AR drivers/media/pci/smipcie/built-in.a
AR drivers/media/platform/ti/built-in.a
CC lib/crc-ccitt.o
AR drivers/media/pci/netup_unidvb/built-in.a
CC lib/crc16.o
AR drivers/usb/early/built-in.a
AR drivers/media/pci/intel/ipu3/built-in.a
AR drivers/media/platform/via/built-in.a
AR drivers/media/usb/b2c2/built-in.a
CC drivers/i2c/i2c-core-smbus.o
AR drivers/media/platform/xilinx/built-in.a
AR drivers/media/pci/intel/ivsc/built-in.a
AR drivers/media/pci/intel/built-in.a
AR drivers/media/platform/built-in.a
AR drivers/media/mmc/siano/built-in.a
CC drivers/i2c/i2c-core-acpi.o
AR drivers/media/usb/dvb-usb/built-in.a
AR drivers/media/pci/built-in.a
AR drivers/media/mmc/built-in.a
AR drivers/media/usb/dvb-usb-v2/built-in.a
AR drivers/media/firewire/built-in.a
AR drivers/media/usb/s2255/built-in.a
AR drivers/media/spi/built-in.a
CC drivers/acpi/acpica/utstrtoul64.o
CC [M] drivers/gpu/drm/xe/xe_mocs.o
CC drivers/acpi/acpica/utxface.o
AR drivers/media/usb/siano/built-in.a
CC drivers/rtc/rtc-cmos.o
AR drivers/net/ethernet/chelsio/built-in.a
CC [M] drivers/gpu/drm/xe/xe_module.o
HOSTCC lib/gen_crc32table
CC kernel/tsacct.o
AR drivers/media/usb/ttusb-budget/built-in.a
AR drivers/net/ethernet/cisco/built-in.a
AR drivers/net/ethernet/cortina/built-in.a
CC kernel/tracepoint.o
AR drivers/media/usb/ttusb-dec/built-in.a
CC fs/kernel_read_file.o
AR drivers/media/usb/built-in.a
CC drivers/gpu/drm/i915/gt/intel_renderstate.o
CC net/ipv6/ip6_icmp.o
AR drivers/media/test-drivers/built-in.a
AR drivers/media/built-in.a
CC drivers/acpi/acpica/utxfinit.o
CC drivers/acpi/acpica/utxferror.o
CC drivers/scsi/sr_ioctl.o
CC drivers/acpi/acpica/utxfmutex.o
CC net/ipv6/output_core.o
CC net/ipv4/cipso_ipv4.o
AR drivers/net/ethernet/dec/tulip/built-in.a
CC net/ipv4/xfrm4_policy.o
AR drivers/net/ethernet/dec/built-in.a
CC drivers/scsi/sr_vendor.o
CC kernel/irq_work.o
CC lib/xxhash.o
CC lib/genalloc.o
AR drivers/net/wireless/admtek/built-in.a
CC drivers/gpu/drm/drm_gem_shmem_helper.o
CC fs/mnt_idmapping.o
CC drivers/net/mii.o
AR drivers/net/usb/built-in.a
AR drivers/net/wireless/ath/built-in.a
CC fs/remap_range.o
CC drivers/gpu/drm/drm_atomic_helper.o
CC fs/pidfs.o
AR drivers/net/wireless/atmel/built-in.a
AR drivers/net/wireless/broadcom/built-in.a
AR drivers/net/wireless/intel/built-in.a
AR drivers/net/wireless/intersil/built-in.a
AR drivers/net/wireless/marvell/built-in.a
CC fs/buffer.o
AR drivers/net/wireless/mediatek/built-in.a
CC drivers/net/loopback.o
CC fs/mpage.o
AR drivers/net/wireless/microchip/built-in.a
CC drivers/gpu/drm/drm_atomic_state_helper.o
AR drivers/net/wireless/purelifi/built-in.a
AR drivers/net/wireless/quantenna/built-in.a
CC drivers/scsi/sg.o
AR arch/x86/kernel/built-in.a
CC drivers/i2c/i2c-smbus.o
AR drivers/net/wireless/ralink/built-in.a
CC drivers/net/netconsole.o
CC kernel/static_call.o
AR drivers/net/wireless/realtek/built-in.a
AR arch/x86/built-in.a
CC drivers/net/virtio_net.o
AR drivers/net/wireless/rsi/built-in.a
AR drivers/acpi/acpica/built-in.a
CC kernel/padata.o
AR drivers/net/wireless/silabs/built-in.a
CC kernel/jump_label.o
CC lib/percpu_counter.o
AR drivers/acpi/built-in.a
AR drivers/net/wireless/st/built-in.a
AR drivers/input/mouse/built-in.a
AR drivers/net/wireless/ti/built-in.a
CC drivers/input/input-poller.o
AR drivers/net/wireless/zydas/built-in.a
AR drivers/net/wireless/virtual/built-in.a
AR drivers/net/wireless/built-in.a
CC lib/audit.o
CC drivers/net/net_failover.o
AR drivers/pps/clients/built-in.a
AR drivers/pps/generators/built-in.a
CC drivers/pps/pps.o
CC drivers/ptp/ptp_clock.o
CC drivers/power/supply/power_supply_core.o
CC drivers/hwmon/hwmon.o
CC drivers/input/ff-core.o
CC drivers/input/touchscreen.o
CC fs/proc_namespace.o
CC drivers/usb/host/xhci-ring.o
CC net/ipv4/xfrm4_state.o
CC lib/syscall.o
AR drivers/rtc/built-in.a
CC drivers/ptp/ptp_chardev.o
CC drivers/pps/kapi.o
CC fs/direct-io.o
CC drivers/power/supply/power_supply_sysfs.o
CC drivers/scsi/scsi_sysfs.o
CC drivers/ptp/ptp_sysfs.o
CC net/ipv4/xfrm4_input.o
CC drivers/input/ff-memless.o
CC kernel/context_tracking.o
CC lib/errname.o
CC drivers/input/sparse-keymap.o
CC drivers/gpu/drm/drm_bridge_connector.o
CC drivers/power/supply/power_supply_leds.o
CC drivers/gpu/drm/drm_crtc_helper.o
AR drivers/net/ethernet/dlink/built-in.a
CC drivers/gpu/drm/drm_damage_helper.o
CC kernel/iomem.o
CC net/ipv6/protocol.o
CC drivers/gpu/drm/i915/gt/intel_reset.o
CC drivers/gpu/drm/drm_encoder_slave.o
CC drivers/input/vivaldi-fmap.o
AR drivers/net/ethernet/emulex/built-in.a
CC drivers/ptp/ptp_vclock.o
CC kernel/rseq.o
CC drivers/pps/sysfs.o
AR drivers/i2c/built-in.a
AR drivers/thermal/broadcom/built-in.a
CC [M] drivers/gpu/drm/xe/xe_pat.o
AR drivers/thermal/samsung/built-in.a
AR drivers/watchdog/built-in.a
CC drivers/thermal/intel/intel_tcc.o
CC drivers/thermal/intel/therm_throt.o
CC fs/eventpoll.o
CC drivers/md/md.o
CC lib/nlattr.o
CC drivers/cpufreq/cpufreq.o
CC drivers/md/md-bitmap.o
CC [M] drivers/gpu/drm/xe/xe_pci.o
CC drivers/cpufreq/freq_table.o
CC [M] drivers/gpu/drm/xe/xe_pcode.o
CC [M] drivers/gpu/drm/xe/xe_pm.o
AR net/mac80211/built-in.a
CC drivers/cpufreq/cpufreq_performance.o
CC [M] drivers/gpu/drm/xe/xe_preempt_fence.o
CC drivers/usb/host/xhci-hub.o
CC drivers/input/input-leds.o
CC drivers/ptp/ptp_kvm_x86.o
CC drivers/power/supply/power_supply_hwmon.o
AR drivers/pps/built-in.a
CC drivers/gpu/drm/i915/gt/intel_ring.o
CC fs/anon_inodes.o
CC fs/signalfd.o
CC drivers/input/evdev.o
CC [M] drivers/gpu/drm/xe/xe_pt.o
AR drivers/net/ethernet/engleder/built-in.a
CC drivers/usb/host/xhci-dbg.o
CC drivers/md/md-autodetect.o
CC drivers/cpufreq/cpufreq_userspace.o
CC [M] drivers/thermal/intel/x86_pkg_temp_thermal.o
AR drivers/hwmon/built-in.a
CC drivers/gpu/drm/drm_flip_work.o
CC lib/cpu_rmap.o
CC net/ipv4/xfrm4_output.o
CC drivers/gpu/drm/drm_format_helper.o
CC drivers/md/dm.o
CC drivers/gpu/drm/drm_gem_atomic_helper.o
CC drivers/gpu/drm/drm_gem_framebuffer_helper.o
CC drivers/cpufreq/cpufreq_ondemand.o
CC fs/timerfd.o
AR drivers/thermal/st/built-in.a
AR drivers/thermal/qcom/built-in.a
AR drivers/thermal/tegra/built-in.a
AR drivers/thermal/mediatek/built-in.a
CC drivers/thermal/thermal_core.o
CC drivers/usb/host/xhci-trace.o
CC lib/dynamic_queue_limits.o
AR drivers/power/supply/built-in.a
AR drivers/power/built-in.a
CC drivers/cpufreq/cpufreq_governor.o
AR kernel/built-in.a
CC net/ipv4/xfrm4_protocol.o
CC lib/glob.o
CC net/ipv6/ip6_offload.o
AR drivers/net/ethernet/ezchip/built-in.a
AR drivers/scsi/built-in.a
CC net/ipv6/tcpv6_offload.o
CC lib/strncpy_from_user.o
CC lib/strnlen_user.o
CC drivers/cpufreq/cpufreq_governor_attr_set.o
CC [M] drivers/gpu/drm/xe/xe_pt_walk.o
CC drivers/ptp/ptp_kvm_common.o
CC drivers/gpu/drm/i915/gt/intel_ring_submission.o
CC drivers/cpuidle/governors/menu.o
CC drivers/cpuidle/cpuidle.o
AR drivers/mmc/built-in.a
AR drivers/ufs/built-in.a
CC drivers/gpu/drm/drm_kms_helper_common.o
AR drivers/thermal/intel/built-in.a
CC drivers/usb/host/xhci-debugfs.o
CC net/ipv6/exthdrs_offload.o
CC net/ipv6/inet6_hashtables.o
CC drivers/gpu/drm/drm_modeset_helper.o
CC lib/net_utils.o
CC drivers/thermal/thermal_sysfs.o
CC [M] drivers/gpu/drm/xe/xe_query.o
CC lib/sg_pool.o
CC net/ipv6/mcast_snoop.o
CC drivers/gpu/drm/drm_plane_helper.o
CC fs/eventfd.o
CC drivers/gpu/drm/drm_probe_helper.o
AR drivers/input/built-in.a
CC fs/aio.o
AR drivers/net/ethernet/fujitsu/built-in.a
CC drivers/cpuidle/governors/haltpoll.o
CC drivers/gpu/drm/drm_rect.o
CC drivers/gpu/drm/i915/gt/intel_rps.o
CC drivers/gpu/drm/drm_self_refresh_helper.o
CC drivers/gpu/drm/i915/gt/intel_sa_media.o
CC drivers/thermal/thermal_trip.o
CC drivers/cpufreq/acpi-cpufreq.o
CC [M] drivers/gpu/drm/xe/xe_range_fence.o
CC drivers/cpufreq/amd-pstate.o
CC drivers/usb/host/xhci-pci.o
AR drivers/leds/trigger/built-in.a
CC [M] drivers/gpu/drm/xe/xe_reg_sr.o
AR drivers/leds/blink/built-in.a
CC fs/locks.o
AR drivers/leds/simple/built-in.a
CC drivers/leds/led-core.o
CC drivers/gpu/drm/i915/gt/intel_sseu.o
CC [M] drivers/gpu/drm/xe/xe_reg_whitelist.o
AR drivers/ptp/built-in.a
CC drivers/thermal/thermal_helpers.o
CC drivers/gpu/drm/drm_simple_kms_helper.o
CC fs/binfmt_misc.o
CC lib/stackdepot.o
AR drivers/net/ethernet/fungible/built-in.a
CC drivers/gpu/drm/bridge/panel.o
CC lib/asn1_decoder.o
CC drivers/thermal/thermal_hwmon.o
CC drivers/gpu/drm/drm_mipi_dsi.o
GEN lib/oid_registry_data.c
AR net/ipv4/built-in.a
CC drivers/gpu/drm/i915/gt/intel_sseu_debugfs.o
CC lib/ucs2_string.o
AR drivers/firmware/arm_ffa/built-in.a
CC lib/sbitmap.o
AR drivers/firmware/arm_scmi/built-in.a
CC lib/group_cpus.o
AR drivers/firmware/broadcom/built-in.a
AR drivers/firmware/cirrus/built-in.a
CC lib/fw_table.o
AR drivers/firmware/meson/built-in.a
CC drivers/cpuidle/driver.o
AR drivers/firmware/microchip/built-in.a
CC [M] drivers/gpu/drm/drm_exec.o
CC fs/binfmt_script.o
CC drivers/firmware/efi/efi-bgrt.o
CC drivers/firmware/efi/efi.o
CC [M] drivers/gpu/drm/drm_gpuvm.o
CC drivers/firmware/efi/vars.o
CC drivers/firmware/efi/libstub/efi-stub-helper.o
CC drivers/firmware/efi/libstub/gop.o
CC drivers/leds/led-class.o
CC drivers/gpu/drm/i915/gt/intel_timeline.o
CC drivers/firmware/efi/reboot.o
CC drivers/cpuidle/governor.o
CC drivers/firmware/efi/memattr.o
CC drivers/leds/led-triggers.o
CC drivers/cpuidle/sysfs.o
AR drivers/crypto/stm32/built-in.a
CC drivers/md/dm-table.o
CC drivers/clocksource/acpi_pm.o
AR drivers/crypto/xilinx/built-in.a
AR drivers/crypto/hisilicon/built-in.a
CC drivers/thermal/gov_step_wise.o
CC [M] drivers/gpu/drm/drm_suballoc.o
AR drivers/crypto/intel/keembay/built-in.a
AR drivers/crypto/intel/ixp4xx/built-in.a
CC drivers/clocksource/i8253.o
CC drivers/thermal/gov_user_space.o
AR drivers/crypto/intel/built-in.a
CC [M] drivers/gpu/drm/xe/xe_rtp.o
AR drivers/crypto/starfive/built-in.a
CC [M] drivers/gpu/drm/drm_gem_ttm_helper.o
AR drivers/crypto/built-in.a
AR drivers/cpuidle/governors/built-in.a
CC drivers/md/dm-target.o
AR drivers/firmware/imx/built-in.a
AR lib/lib.a
CC fs/binfmt_elf.o
AR net/ipv6/built-in.a
CC fs/mbcache.o
AR drivers/net/ethernet/google/built-in.a
AR net/built-in.a
CC fs/posix_acl.o
CC drivers/firmware/efi/libstub/secureboot.o
CC drivers/md/dm-linear.o
CC drivers/md/dm-stripe.o
CC drivers/gpu/drm/i915/gt/intel_tlb.o
CC drivers/hid/usbhid/hid-core.o
GEN lib/crc32table.h
AR drivers/platform/x86/amd/built-in.a
AR drivers/platform/surface/built-in.a
AR drivers/perf/built-in.a
CC drivers/gpu/drm/i915/gt/intel_wopcm.o
CC drivers/cpufreq/amd-pstate-trace.o
CC drivers/mailbox/mailbox.o
AR drivers/platform/x86/intel/built-in.a
CC drivers/hid/usbhid/hiddev.o
CC drivers/platform/x86/wmi.o
CC drivers/cpufreq/intel_pstate.o
CC drivers/platform/x86/wmi-bmof.o
CC drivers/hid/usbhid/hid-pidff.o
CC drivers/hid/hid-core.o
CC drivers/firmware/efi/tpm.o
CC drivers/firmware/efi/memmap.o
CC drivers/cpuidle/poll_state.o
CC drivers/firmware/efi/capsule.o
CC lib/oid_registry.o
CC fs/coredump.o
CC drivers/md/dm-ioctl.o
AR drivers/thermal/built-in.a
CC drivers/firmware/efi/esrt.o
CC drivers/hid/hid-input.o
CC drivers/gpu/drm/i915/gt/intel_workarounds.o
CC drivers/firmware/efi/libstub/tpm.o
AR drivers/net/ethernet/huawei/built-in.a
LD [M] drivers/gpu/drm/drm_suballoc_helper.o
AR drivers/firmware/psci/built-in.a
AR drivers/firmware/qcom/built-in.a
CC drivers/net/ethernet/intel/e1000/e1000_main.o
CC drivers/net/ethernet/intel/e1000e/82571.o
AR drivers/net/ethernet/i825xx/built-in.a
AR drivers/clocksource/built-in.a
AR drivers/usb/host/built-in.a
CC drivers/net/ethernet/intel/e100.o
AR drivers/usb/built-in.a
AR drivers/leds/built-in.a
AR drivers/hwtracing/intel_th/built-in.a
AR drivers/firmware/smccc/built-in.a
AR drivers/android/built-in.a
CC drivers/firmware/efi/libstub/file.o
AR drivers/firmware/tegra/built-in.a
CC drivers/mailbox/pcc.o
CC drivers/cpuidle/cpuidle-haltpoll.o
AR drivers/nvmem/layouts/built-in.a
CC drivers/nvmem/core.o
CC fs/drop_caches.o
AR drivers/firmware/xilinx/built-in.a
CC drivers/firmware/efi/runtime-wrappers.o
CC drivers/net/ethernet/intel/e1000/e1000_hw.o
CC drivers/net/ethernet/intel/e1000e/ich8lan.o
CC lib/crc32.o
CC drivers/net/ethernet/intel/e1000e/80003es2lan.o
CC drivers/net/ethernet/intel/e1000/e1000_ethtool.o
CC drivers/gpu/drm/i915/gt/shmem_utils.o
CC drivers/firmware/dmi_scan.o
CC drivers/firmware/efi/capsule-loader.o
CC [M] drivers/gpu/drm/xe/xe_ring_ops.o
CC drivers/platform/x86/eeepc-laptop.o
CC drivers/gpu/drm/i915/gt/sysfs_engines.o
AR drivers/net/ethernet/microsoft/built-in.a
AR drivers/net/ethernet/litex/built-in.a
AR drivers/net/ethernet/marvell/octeon_ep/built-in.a
CC drivers/platform/x86/p2sb.o
AR drivers/net/ethernet/marvell/octeon_ep_vf/built-in.a
LD [M] drivers/gpu/drm/drm_ttm_helper.o
CC drivers/gpu/drm/i915/gt/intel_ggtt_gmch.o
AR drivers/net/ethernet/marvell/octeontx2/built-in.a
AR drivers/net/ethernet/marvell/prestera/built-in.a
CC drivers/net/ethernet/marvell/sky2.o
CC drivers/firmware/efi/earlycon.o
CC [M] drivers/gpu/drm/xe/xe_sa.o
CC [M] drivers/gpu/drm/xe/xe_sched_job.o
CC drivers/gpu/drm/i915/gt/gen6_renderstate.o
AR drivers/cpuidle/built-in.a
CC drivers/gpu/drm/i915/gt/gen7_renderstate.o
CC drivers/net/ethernet/intel/e1000/e1000_param.o
CC fs/sysctls.o
CC drivers/firmware/dmi-id.o
CC drivers/firmware/memmap.o
AR drivers/net/ethernet/mellanox/built-in.a
AR drivers/net/ethernet/micrel/built-in.a
AR drivers/net/ethernet/microchip/built-in.a
AR drivers/net/ethernet/mscc/built-in.a
CC drivers/firmware/efi/libstub/mem.o
AR drivers/net/ethernet/myricom/built-in.a
AR drivers/mailbox/built-in.a
CC [M] drivers/gpu/drm/xe/xe_shrinker.o
CC [M] drivers/gpu/drm/xe/xe_step.o
CC fs/fhandle.o
AR drivers/net/ethernet/natsemi/built-in.a
CC drivers/firmware/efi/libstub/random.o
AR drivers/net/ethernet/neterion/built-in.a
CC drivers/firmware/efi/libstub/randomalloc.o
CC drivers/firmware/efi/libstub/pci.o
AR drivers/net/ethernet/netronome/built-in.a
CC drivers/firmware/efi/libstub/skip_spaces.o
CC drivers/hid/hid-quirks.o
AR lib/built-in.a
CC drivers/firmware/efi/libstub/lib-cmdline.o
CC drivers/hid/hid-debug.o
CC [M] drivers/gpu/drm/xe/xe_sync.o
CC [M] drivers/gpu/drm/xe/xe_tile.o
CC drivers/gpu/drm/i915/gt/gen8_renderstate.o
CC drivers/md/dm-io.o
CC drivers/firmware/efi/libstub/lib-ctype.o
AR drivers/hid/usbhid/built-in.a
AR drivers/net/ethernet/ni/built-in.a
CC drivers/firmware/efi/libstub/alignedmem.o
CC drivers/firmware/efi/libstub/relocate.o
CC drivers/net/ethernet/nvidia/forcedeth.o
AR drivers/net/ethernet/oki-semi/built-in.a
AR drivers/net/ethernet/packetengines/built-in.a
AR drivers/net/ethernet/qlogic/built-in.a
AR drivers/net/ethernet/qualcomm/emac/built-in.a
AR drivers/net/ethernet/qualcomm/built-in.a
CC [M] drivers/gpu/drm/xe/xe_tile_sysfs.o
CC drivers/net/ethernet/realtek/8139too.o
CC drivers/hid/hidraw.o
CC drivers/net/ethernet/realtek/r8169_main.o
AR drivers/nvmem/built-in.a
CC drivers/net/ethernet/realtek/r8169_firmware.o
CC drivers/net/ethernet/realtek/r8169_phy_config.o
AR drivers/firmware/efi/built-in.a
CC drivers/gpu/drm/i915/gt/gen9_renderstate.o
CC drivers/hid/hid-generic.o
CC drivers/md/dm-kcopyd.o
CC drivers/net/ethernet/intel/e1000e/mac.o
CC [M] drivers/gpu/drm/xe/xe_trace.o
CC drivers/firmware/efi/libstub/printk.o
CC drivers/net/ethernet/intel/e1000e/manage.o
CC drivers/firmware/efi/libstub/vsprintf.o
AR drivers/platform/x86/built-in.a
CC drivers/gpu/drm/i915/gem/i915_gem_busy.o
AR drivers/platform/built-in.a
CC drivers/gpu/drm/i915/gem/i915_gem_clflush.o
CC drivers/net/ethernet/intel/e1000e/nvm.o
CC [M] drivers/gpu/drm/xe/xe_trace_bo.o
CC drivers/md/dm-sysfs.o
CC drivers/firmware/efi/libstub/x86-stub.o
STUBCPY drivers/firmware/efi/libstub/efi-stub-helper.stub.o
CC drivers/net/ethernet/intel/e1000e/phy.o
STUBCPY drivers/firmware/efi/libstub/file.stub.o
STUBCPY drivers/firmware/efi/libstub/gop.stub.o
CC drivers/net/ethernet/intel/e1000e/param.o
CC drivers/net/ethernet/intel/e1000e/ethtool.o
AR drivers/net/ethernet/renesas/built-in.a
CC [M] drivers/gpu/drm/xe/xe_trace_guc.o
AR drivers/net/ethernet/rdc/built-in.a
AR drivers/net/ethernet/rocker/built-in.a
AR drivers/net/ethernet/samsung/built-in.a
AR drivers/net/ethernet/seeq/built-in.a
AR drivers/net/ethernet/silan/built-in.a
AR fs/built-in.a
STUBCPY drivers/firmware/efi/libstub/lib-cmdline.stub.o
AR drivers/net/ethernet/sis/built-in.a
CC drivers/gpu/drm/i915/gem/i915_gem_context.o
STUBCPY drivers/firmware/efi/libstub/lib-ctype.stub.o
STUBCPY drivers/firmware/efi/libstub/mem.stub.o
AR drivers/net/ethernet/sfc/built-in.a
CC drivers/gpu/drm/i915/gem/i915_gem_create.o
STUBCPY drivers/firmware/efi/libstub/pci.stub.o
CC drivers/gpu/drm/i915/gem/i915_gem_dmabuf.o
AR drivers/net/ethernet/smsc/built-in.a
CC drivers/net/ethernet/intel/e1000e/netdev.o
CC drivers/hid/hid-a4tech.o
AR drivers/net/ethernet/socionext/built-in.a
AR drivers/net/ethernet/stmicro/built-in.a
CC drivers/net/ethernet/intel/e1000e/ptp.o
CC drivers/gpu/drm/i915/gem/i915_gem_domain.o
AR drivers/net/ethernet/sun/built-in.a
CC drivers/md/dm-stats.o
CC [M] drivers/gpu/drm/xe/xe_ttm_sys_mgr.o
AR drivers/net/ethernet/tehuti/built-in.a
CC drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o
AR drivers/net/ethernet/ti/built-in.a
AR drivers/net/ethernet/vertexcom/built-in.a
AR drivers/cpufreq/built-in.a
AR drivers/net/ethernet/via/built-in.a
AR drivers/net/ethernet/wangxun/built-in.a
STUBCPY drivers/firmware/efi/libstub/random.stub.o
AR drivers/net/ethernet/wiznet/built-in.a
STUBCPY drivers/firmware/efi/libstub/randomalloc.stub.o
STUBCPY drivers/firmware/efi/libstub/relocate.stub.o
AR drivers/net/ethernet/xilinx/built-in.a
CC drivers/gpu/drm/i915/gem/i915_gem_internal.o
CC [M] drivers/gpu/drm/xe/xe_ttm_stolen_mgr.o
AR drivers/net/ethernet/xircom/built-in.a
AR drivers/net/ethernet/synopsys/built-in.a
STUBCPY drivers/firmware/efi/libstub/secureboot.stub.o
CC drivers/hid/hid-apple.o
CC [M] drivers/gpu/drm/xe/xe_ttm_vram_mgr.o
AR drivers/net/ethernet/pensando/built-in.a
CC [M] drivers/gpu/drm/xe/xe_tuning.o
CC [M] drivers/gpu/drm/xe/xe_uc.o
CC drivers/hid/hid-belkin.o
CC drivers/hid/hid-cherry.o
CC drivers/hid/hid-chicony.o
CC drivers/hid/hid-cypress.o
STUBCPY drivers/firmware/efi/libstub/skip_spaces.stub.o
STUBCPY drivers/firmware/efi/libstub/tpm.stub.o
CC drivers/hid/hid-ezkey.o
CC drivers/gpu/drm/i915/gem/i915_gem_lmem.o
CC drivers/md/dm-rq.o
CC drivers/gpu/drm/i915/gem/i915_gem_mman.o
CC drivers/gpu/drm/i915/gem/i915_gem_object.o
CC drivers/gpu/drm/i915/gem/i915_gem_pages.o
STUBCPY drivers/firmware/efi/libstub/vsprintf.stub.o
STUBCPY drivers/firmware/efi/libstub/x86-stub.stub.o
CC drivers/hid/hid-gyration.o
STUBCPY drivers/firmware/efi/libstub/alignedmem.stub.o
STUBCPY drivers/firmware/efi/libstub/printk.stub.o
CC [M] drivers/gpu/drm/xe/xe_uc_debugfs.o
CC drivers/gpu/drm/i915/gem/i915_gem_phys.o
AR drivers/firmware/efi/libstub/lib.a
CC [M] drivers/gpu/drm/xe/xe_uc_fw.o
AR drivers/firmware/built-in.a
CC [M] drivers/gpu/drm/xe/xe_vm.o
CC drivers/md/dm-io-rewind.o
CC drivers/md/dm-builtin.o
CC [M] drivers/gpu/drm/xe/xe_vram.o
CC drivers/gpu/drm/i915/gem/i915_gem_pm.o
CC drivers/hid/hid-ite.o
CC drivers/md/dm-raid1.o
CC drivers/md/dm-log.o
CC drivers/md/dm-region-hash.o
CC drivers/hid/hid-kensington.o
CC drivers/hid/hid-lg.o
CC drivers/md/dm-zero.o
CC drivers/hid/hid-lgff.o
CC drivers/gpu/drm/i915/gem/i915_gem_region.o
CC [M] drivers/gpu/drm/xe/xe_vram_freq.o
CC [M] drivers/gpu/drm/xe/xe_wait_user_fence.o
CC [M] drivers/gpu/drm/xe/xe_wa.o
CC drivers/gpu/drm/i915/gem/i915_gem_shmem.o
CC drivers/hid/hid-lg4ff.o
CC [M] drivers/gpu/drm/xe/xe_wopcm.o
CC [M] drivers/gpu/drm/xe/xe_hmm.o
CC drivers/hid/hid-lg-g15.o
CC drivers/gpu/drm/i915/gem/i915_gem_shrinker.o
CC [M] drivers/gpu/drm/xe/xe_hwmon.o
CC [M] drivers/gpu/drm/xe/xe_gt_sriov_vf.o
CC drivers/hid/hid-microsoft.o
CC drivers/gpu/drm/i915/gem/i915_gem_stolen.o
CC [M] drivers/gpu/drm/xe/xe_gt_sriov_vf_debugfs.o
AR drivers/net/ethernet/intel/e1000/built-in.a
CC drivers/gpu/drm/i915/gem/i915_gem_throttle.o
CC drivers/gpu/drm/i915/gem/i915_gem_tiling.o
CC drivers/hid/hid-monterey.o
CC [M] drivers/gpu/drm/xe/xe_guc_relay.o
CC [M] drivers/gpu/drm/xe/xe_memirq.o
CC [M] drivers/gpu/drm/xe/xe_sriov.o
CC drivers/hid/hid-ntrig.o
CC drivers/hid/hid-pl.o
CC drivers/hid/hid-petalynx.o
CC [M] drivers/gpu/drm/xe/display/ext/i915_irq.o
CC [M] drivers/gpu/drm/xe/display/ext/i915_utils.o
AR drivers/net/ethernet/marvell/built-in.a
CC drivers/hid/hid-redragon.o
CC drivers/gpu/drm/i915/gem/i915_gem_ttm.o
CC [M] drivers/gpu/drm/xe/display/intel_fb_bo.o
CC [M] drivers/gpu/drm/xe/display/intel_fbdev_fb.o
CC drivers/gpu/drm/i915/gem/i915_gem_ttm_move.o
CC [M] drivers/gpu/drm/xe/display/xe_display.o
CC drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.o
CC drivers/gpu/drm/i915/gem/i915_gem_userptr.o
CC [M] drivers/gpu/drm/xe/display/xe_display_misc.o
CC drivers/gpu/drm/i915/gem/i915_gem_wait.o
CC [M] drivers/gpu/drm/xe/display/xe_display_rps.o
CC drivers/hid/hid-samsung.o
CC drivers/gpu/drm/i915/gem/i915_gemfs.o
CC [M] drivers/gpu/drm/xe/display/xe_dsb_buffer.o
CC drivers/gpu/drm/i915/i915_active.o
CC [M] drivers/gpu/drm/xe/display/xe_fb_pin.o
CC [M] drivers/gpu/drm/xe/display/xe_hdcp_gsc.o
CC [M] drivers/gpu/drm/xe/display/xe_plane_initial.o
CC [M] drivers/gpu/drm/xe/display/xe_tdf.o
CC drivers/gpu/drm/i915/i915_cmd_parser.o
CC drivers/gpu/drm/i915/i915_deps.o
CC drivers/gpu/drm/i915/i915_gem.o
CC drivers/hid/hid-sony.o
CC [M] drivers/gpu/drm/xe/i915-soc/intel_dram.o
AR drivers/md/built-in.a
CC drivers/hid/hid-sunplus.o
CC drivers/hid/hid-topseed.o
In file included from /workspace/kernel/include/drm/drm_mm.h:51,
from /workspace/kernel/drivers/gpu/drm/i915/gem/i915_gem_stolen.c:10:
/workspace/kernel/drivers/gpu/drm/i915/gem/i915_gem_stolen.c: In function ‘i915_gem_stolen_lmem_setup’:
/workspace/kernel/drivers/gpu/drm/i915/gem/i915_gem_stolen.c:941:5: error: format ‘%lli’ expects argument of type ‘long long int’, but argument 5 has type ‘resource_size_t’ {aka ‘unsigned int’} [-Werror=format=]
941 | "Disabling stolen memory support due to OOB placement: lmem_size = %lli vs dsm_base = %lli\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
942 | lmem_size, dsm_base);
| ~~~~~~~~~
| |
| resource_size_t {aka unsigned int}
/workspace/kernel/include/drm/drm_print.h:424:32: note: in definition of macro ‘drm_dev_dbg’
424 | __drm_dev_dbg(NULL, dev, cat, fmt, ##__VA_ARGS__)
| ^~~
/workspace/kernel/include/drm/drm_print.h:524:32: note: in expansion of macro ‘drm_dbg_driver’
524 | #define drm_dbg(drm, fmt, ...) drm_dbg_driver(drm, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~
/workspace/kernel/drivers/gpu/drm/i915/gem/i915_gem_stolen.c:940:4: note: in expansion of macro ‘drm_dbg’
940 | drm_dbg(&i915->drm,
| ^~~~~~~
/workspace/kernel/drivers/gpu/drm/i915/gem/i915_gem_stolen.c:941:75: note: format string is defined here
941 | "Disabling stolen memory support due to OOB placement: lmem_size = %lli vs dsm_base = %lli\n",
| ~~~^
| |
| long long int
| %i
In file included from /workspace/kernel/include/drm/drm_mm.h:51,
from /workspace/kernel/drivers/gpu/drm/i915/gem/i915_gem_stolen.c:10:
/workspace/kernel/drivers/gpu/drm/i915/gem/i915_gem_stolen.c:941:5: error: format ‘%lli’ expects argument of type ‘long long int’, but argument 6 has type ‘resource_size_t’ {aka ‘unsigned int’} [-Werror=format=]
941 | "Disabling stolen memory support due to OOB placement: lmem_size = %lli vs dsm_base = %lli\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
942 | lmem_size, dsm_base);
| ~~~~~~~~
| |
| resource_size_t {aka unsigned int}
/workspace/kernel/include/drm/drm_print.h:424:32: note: in definition of macro ‘drm_dev_dbg’
424 | __drm_dev_dbg(NULL, dev, cat, fmt, ##__VA_ARGS__)
| ^~~
/workspace/kernel/include/drm/drm_print.h:524:32: note: in expansion of macro ‘drm_dbg_driver’
524 | #define drm_dbg(drm, fmt, ...) drm_dbg_driver(drm, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~
/workspace/kernel/drivers/gpu/drm/i915/gem/i915_gem_stolen.c:940:4: note: in expansion of macro ‘drm_dbg’
940 | drm_dbg(&i915->drm,
| ^~~~~~~
/workspace/kernel/drivers/gpu/drm/i915/gem/i915_gem_stolen.c:941:94: note: format string is defined here
941 | "Disabling stolen memory support due to OOB placement: lmem_size = %lli vs dsm_base = %lli\n",
| ~~~^
| |
| long long int
| %i
CC drivers/gpu/drm/i915/i915_gem_evict.o
CC [M] drivers/gpu/drm/xe/i915-soc/intel_pch.o
AR drivers/net/ethernet/nvidia/built-in.a
CC [M] drivers/gpu/drm/xe/i915-display/icl_dsi.o
CC drivers/gpu/drm/i915/i915_gem_gtt.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_alpm.o
AR drivers/net/ethernet/realtek/built-in.a
CC [M] drivers/gpu/drm/xe/i915-display/intel_atomic.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_atomic_plane.o
AR drivers/net/ethernet/broadcom/built-in.a
CC [M] drivers/gpu/drm/xe/i915-display/intel_audio.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_backlight.o
CC drivers/gpu/drm/i915/i915_gem_ww.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_bios.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_bw.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_cdclk.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_color.o
CC drivers/gpu/drm/i915/i915_query.o
CC drivers/gpu/drm/i915/i915_request.o
CC drivers/gpu/drm/i915/i915_scheduler.o
CC drivers/gpu/drm/i915/i915_trace_points.o
CC drivers/gpu/drm/i915/i915_ttm_buddy_manager.o
cc1: all warnings being treated as errors
make[6]: *** [/workspace/kernel/scripts/Makefile.build:244: drivers/gpu/drm/i915/gem/i915_gem_stolen.o] Error 1
make[6]: *** Waiting for unfinished jobs....
CC [M] drivers/gpu/drm/xe/i915-display/intel_combo_phy.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_connector.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_crtc.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_crtc_state_dump.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_cursor.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_cx0_phy.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_ddi.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_ddi_buf_trans.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_display.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_display_device.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_display_driver.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_display_irq.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_display_params.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_display_power.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_display_power_map.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_display_power_well.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_display_trace.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_display_wa.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_dkl_phy.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_dmc.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_dp.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_dp_aux.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_dp_aux_backlight.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_dp_hdcp.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_dp_link_training.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_dp_mst.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_dpll.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_dpll_mgr.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_dpt_common.o
AR drivers/hid/built-in.a
CC [M] drivers/gpu/drm/xe/i915-display/intel_drrs.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_dsb.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_dsi.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_dsi_dcs_backlight.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_dsi_vbt.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_encoder.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_fb.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_fbc.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_fdi.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_fifo_underrun.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_frontbuffer.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_global_state.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_gmbus.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_hdcp.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_hdcp_gsc_message.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_hdmi.o
AR drivers/net/ethernet/intel/e1000e/built-in.a
AR drivers/net/ethernet/intel/built-in.a
CC [M] drivers/gpu/drm/xe/i915-display/intel_hotplug.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_hotplug_irq.o
AR drivers/net/ethernet/built-in.a
CC [M] drivers/gpu/drm/xe/i915-display/intel_hti.o
AR drivers/net/built-in.a
CC [M] drivers/gpu/drm/xe/i915-display/intel_link_bw.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_lspcon.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_modeset_lock.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_modeset_setup.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_modeset_verify.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_panel.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_pmdemand.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_pps.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_psr.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_qp_tables.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_quirks.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_snps_phy.o
make[5]: *** [/workspace/kernel/scripts/Makefile.build:485: drivers/gpu/drm/i915] Error 2
make[5]: *** Waiting for unfinished jobs....
CC [M] drivers/gpu/drm/xe/i915-display/intel_tc.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_vblank.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_vdsc.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_vga.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_vrr.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_dmc_wl.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_wm.o
CC [M] drivers/gpu/drm/xe/i915-display/skl_scaler.o
CC [M] drivers/gpu/drm/xe/i915-display/skl_universal_plane.o
CC [M] drivers/gpu/drm/xe/i915-display/skl_watermark.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_acpi.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_opregion.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_display_debugfs.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_display_debugfs_params.o
CC [M] drivers/gpu/drm/xe/i915-display/intel_pipe_crc.o
CC [M] drivers/gpu/drm/xe/xe_gsc.o
CC [M] drivers/gpu/drm/xe/xe_guc.o
CC [M] drivers/gpu/drm/xe/xe_guc_ads.o
LD [M] drivers/gpu/drm/xe/xe.o
make[4]: *** [/workspace/kernel/scripts/Makefile.build:485: drivers/gpu/drm] Error 2
make[3]: *** [/workspace/kernel/scripts/Makefile.build:485: drivers/gpu] Error 2
make[2]: *** [/workspace/kernel/scripts/Makefile.build:485: drivers] Error 2
make[1]: *** [/workspace/kernel/Makefile:1934: .] Error 2
make: *** [/workspace/kernel/Makefile:240: __sub-make] Error 2
run-parts: /workspace/ci/hooks/11-build-32b exited with return code 2
^ permalink raw reply [flat|nested] 36+ messages in thread
* ✗ CI.checksparse: warning for TTM shrinker helpers and xe buffer object shrinker (rev5)
2024-06-18 7:18 [PATCH v5 00/12] TTM shrinker helpers and xe buffer object shrinker Thomas Hellström
` (16 preceding siblings ...)
2024-06-18 7:39 ` ✗ CI.Hooks: failure " Patchwork
@ 2024-06-18 7:41 ` Patchwork
2024-06-18 8:03 ` ✓ CI.BAT: success " Patchwork
2024-06-18 19:08 ` ✗ CI.FULL: failure " Patchwork
19 siblings, 0 replies; 36+ messages in thread
From: Patchwork @ 2024-06-18 7:41 UTC (permalink / raw)
To: Thomas Hellström; +Cc: intel-xe
== Series Details ==
Series: TTM shrinker helpers and xe buffer object shrinker (rev5)
URL : https://patchwork.freedesktop.org/series/131815/
State : warning
== Summary ==
+ trap cleanup EXIT
+ KERNEL=/kernel
+ MT=/root/linux/maintainer-tools
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools /root/linux/maintainer-tools
Cloning into '/root/linux/maintainer-tools'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ make -C /root/linux/maintainer-tools
make: Entering directory '/root/linux/maintainer-tools'
cc -O2 -g -Wextra -o remap-log remap-log.c
make: Leaving directory '/root/linux/maintainer-tools'
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ /root/linux/maintainer-tools/dim sparse --fast 7f26b37f8cb73f5cf2251d7fff5b55240e04f153
Sparse version: 0.6.1 (Ubuntu: 0.6.1-2build1)
Fast mode used, each commit won't be checked separately.
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
^ permalink raw reply [flat|nested] 36+ messages in thread
* ✓ CI.BAT: success for TTM shrinker helpers and xe buffer object shrinker (rev5)
2024-06-18 7:18 [PATCH v5 00/12] TTM shrinker helpers and xe buffer object shrinker Thomas Hellström
` (17 preceding siblings ...)
2024-06-18 7:41 ` ✗ CI.checksparse: warning " Patchwork
@ 2024-06-18 8:03 ` Patchwork
2024-06-18 19:08 ` ✗ CI.FULL: failure " Patchwork
19 siblings, 0 replies; 36+ messages in thread
From: Patchwork @ 2024-06-18 8:03 UTC (permalink / raw)
To: Thomas Hellström; +Cc: intel-xe
[-- Attachment #1: Type: text/plain, Size: 2327 bytes --]
== Series Details ==
Series: TTM shrinker helpers and xe buffer object shrinker (rev5)
URL : https://patchwork.freedesktop.org/series/131815/
State : success
== Summary ==
CI Bug Log - changes from xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153_BAT -> xe-pw-131815v5_BAT
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (5 -> 5)
------------------------------
No changes in participating hosts
New tests
---------
New tests have been introduced between xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153_BAT and xe-pw-131815v5_BAT:
### New IGT tests (1) ###
* igt@xe_live_ktest@xe_bo@xe_bo_shrink_kunit:
- Statuses : 5 pass(s)
- Exec time: [6.54, 56.12] s
Known issues
------------
Here are the changes found in xe-pw-131815v5_BAT that come from known issues:
### IGT changes ###
#### Possible fixes ####
* igt@xe_evict@evict-beng-small-external:
- bat-pvc-2: [FAIL][1] ([Intel XE#1000]) -> [PASS][2] +3 other tests pass
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/bat-pvc-2/igt@xe_evict@evict-beng-small-external.html
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/bat-pvc-2/igt@xe_evict@evict-beng-small-external.html
* igt@xe_evict@evict-small-external-cm:
- bat-pvc-2: [DMESG-FAIL][3] ([Intel XE#482]) -> [PASS][4] +3 other tests pass
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/bat-pvc-2/igt@xe_evict@evict-small-external-cm.html
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/bat-pvc-2/igt@xe_evict@evict-small-external-cm.html
[Intel XE#1000]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1000
[Intel XE#482]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/482
Build changes
-------------
* Linux: xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153 -> xe-pw-131815v5
IGT_7890: a137e386eba9f46f838315f5d93b87561691d45e @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153: 7f26b37f8cb73f5cf2251d7fff5b55240e04f153
xe-pw-131815v5: 131815v5
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/index.html
[-- Attachment #2: Type: text/html, Size: 2957 bytes --]
^ permalink raw reply [flat|nested] 36+ messages in thread
* ✗ CI.FULL: failure for TTM shrinker helpers and xe buffer object shrinker (rev5)
2024-06-18 7:18 [PATCH v5 00/12] TTM shrinker helpers and xe buffer object shrinker Thomas Hellström
` (18 preceding siblings ...)
2024-06-18 8:03 ` ✓ CI.BAT: success " Patchwork
@ 2024-06-18 19:08 ` Patchwork
19 siblings, 0 replies; 36+ messages in thread
From: Patchwork @ 2024-06-18 19:08 UTC (permalink / raw)
To: Thomas Hellström; +Cc: intel-xe
[-- Attachment #1: Type: text/plain, Size: 65696 bytes --]
== Series Details ==
Series: TTM shrinker helpers and xe buffer object shrinker (rev5)
URL : https://patchwork.freedesktop.org/series/131815/
State : failure
== Summary ==
CI Bug Log - changes from xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153_full -> xe-pw-131815v5_full
====================================================
Summary
-------
**WARNING**
Minor unknown changes coming with xe-pw-131815v5_full need to be verified
manually.
If you think the reported changes have nothing to do with the changes
introduced in xe-pw-131815v5_full, please notify your bug team (I915-ci-infra@lists.freedesktop.org) to allow them
to document this new failure mode, which will reduce false positives in CI.
Participating hosts (3 -> 3)
------------------------------
No changes in participating hosts
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in xe-pw-131815v5_full:
### IGT changes ###
#### Warnings ####
* igt@kms_vblank@ts-continuation-suspend:
- shard-dg2-set2: [DMESG-WARN][1] ([Intel XE#1214]) -> [DMESG-WARN][2] +1 other test dmesg-warn
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_vblank@ts-continuation-suspend.html
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_vblank@ts-continuation-suspend.html
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses.
They do not affect the overall result.
* igt@kms_big_fb@4-tiled-max-hw-stride-64bpp-rotate-0-hflip-async-flip:
- {shard-lnl}: NOTRUN -> [INCOMPLETE][3]
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-lnl-6/igt@kms_big_fb@4-tiled-max-hw-stride-64bpp-rotate-0-hflip-async-flip.html
* igt@kms_pipe_crc_basic@suspend-read-crc@pipe-a-edp-1:
- {shard-lnl}: [PASS][4] -> [DMESG-WARN][5] +3 other tests dmesg-warn
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-lnl-2/igt@kms_pipe_crc_basic@suspend-read-crc@pipe-a-edp-1.html
[5]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-lnl-8/igt@kms_pipe_crc_basic@suspend-read-crc@pipe-a-edp-1.html
* igt@xe_exec_fault_mode@once-bindexecqueue-userptr-invalidate-race-imm:
- {shard-lnl}: [PASS][6] -> [DMESG-FAIL][7]
[6]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-lnl-7/igt@xe_exec_fault_mode@once-bindexecqueue-userptr-invalidate-race-imm.html
[7]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-lnl-8/igt@xe_exec_fault_mode@once-bindexecqueue-userptr-invalidate-race-imm.html
* igt@xe_live_ktest@xe_migrate:
- {shard-lnl}: [PASS][8] -> [INCOMPLETE][9]
[8]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-lnl-1/igt@xe_live_ktest@xe_migrate.html
[9]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-lnl-5/igt@xe_live_ktest@xe_migrate.html
* igt@xe_pm_residency@idle-residency-on-exec:
- {shard-lnl}: [PASS][10] -> [TIMEOUT][11]
[10]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-lnl-7/igt@xe_pm_residency@idle-residency-on-exec.html
[11]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-lnl-6/igt@xe_pm_residency@idle-residency-on-exec.html
New tests
---------
New tests have been introduced between xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153_full and xe-pw-131815v5_full:
### New IGT tests (1) ###
* igt@xe_live_ktest@xe_bo@xe_bo_shrink_kunit:
- Statuses : 1 pass(s)
- Exec time: [13.00] s
Known issues
------------
Here are the changes found in xe-pw-131815v5_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@core_hotunplug@hotrebind:
- shard-dg2-set2: [PASS][12] -> [DMESG-WARN][13] ([Intel XE#1214])
[12]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-464/igt@core_hotunplug@hotrebind.html
[13]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-433/igt@core_hotunplug@hotrebind.html
* igt@kms_big_fb@4-tiled-addfb-size-overflow:
- shard-adlp: NOTRUN -> [SKIP][14] ([Intel XE#1201] / [Intel XE#610])
[14]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-4/igt@kms_big_fb@4-tiled-addfb-size-overflow.html
* igt@kms_big_fb@linear-64bpp-rotate-90:
- shard-adlp: NOTRUN -> [SKIP][15] ([Intel XE#1201] / [Intel XE#316]) +1 other test skip
[15]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-6/igt@kms_big_fb@linear-64bpp-rotate-90.html
* igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-180-hflip:
- shard-adlp: NOTRUN -> [FAIL][16] ([Intel XE#1874])
[16]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-4/igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-180-hflip.html
* igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip:
- shard-adlp: NOTRUN -> [FAIL][17] ([Intel XE#1231]) +1 other test fail
[17]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-4/igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip.html
* igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180-hflip:
- shard-dg2-set2: NOTRUN -> [SKIP][18] ([Intel XE#1124] / [Intel XE#1201]) +1 other test skip
[18]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180-hflip.html
* igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-180:
- shard-adlp: NOTRUN -> [SKIP][19] ([Intel XE#1124] / [Intel XE#1201]) +4 other tests skip
[19]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-4/igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-180.html
* igt@kms_bw@linear-tiling-1-displays-2160x1440p:
- shard-adlp: NOTRUN -> [SKIP][20] ([Intel XE#1201] / [Intel XE#367])
[20]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-6/igt@kms_bw@linear-tiling-1-displays-2160x1440p.html
* igt@kms_ccs@crc-primary-basic-yf-tiled-ccs@pipe-b-hdmi-a-1:
- shard-adlp: NOTRUN -> [SKIP][21] ([Intel XE#1201] / [Intel XE#787]) +20 other tests skip
[21]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-4/igt@kms_ccs@crc-primary-basic-yf-tiled-ccs@pipe-b-hdmi-a-1.html
* igt@kms_ccs@crc-primary-rotation-180-4-tiled-dg2-rc-ccs-cc@pipe-d-hdmi-a-1:
- shard-adlp: NOTRUN -> [SKIP][22] ([Intel XE#1201] / [Intel XE#455] / [Intel XE#787]) +13 other tests skip
[22]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-4/igt@kms_ccs@crc-primary-rotation-180-4-tiled-dg2-rc-ccs-cc@pipe-d-hdmi-a-1.html
* igt@kms_ccs@random-ccs-data-4-tiled-mtl-mc-ccs:
- shard-dg2-set2: NOTRUN -> [SKIP][23] ([Intel XE#1201] / [Intel XE#455] / [Intel XE#787]) +1 other test skip
[23]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_ccs@random-ccs-data-4-tiled-mtl-mc-ccs.html
* igt@kms_ccs@random-ccs-data-4-tiled-mtl-mc-ccs@pipe-b-hdmi-a-6:
- shard-dg2-set2: NOTRUN -> [SKIP][24] ([Intel XE#1201] / [Intel XE#787]) +6 other tests skip
[24]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_ccs@random-ccs-data-4-tiled-mtl-mc-ccs@pipe-b-hdmi-a-6.html
* igt@kms_ccs@random-ccs-data-4-tiled-xe2-ccs:
- shard-adlp: NOTRUN -> [SKIP][25] ([Intel XE#1201] / [Intel XE#1252])
[25]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-6/igt@kms_ccs@random-ccs-data-4-tiled-xe2-ccs.html
* igt@kms_chamelium_edid@dp-edid-stress-resolution-4k:
- shard-dg2-set2: NOTRUN -> [SKIP][26] ([Intel XE#1201] / [Intel XE#373])
[26]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_chamelium_edid@dp-edid-stress-resolution-4k.html
* igt@kms_chamelium_frames@hdmi-crc-single:
- shard-adlp: NOTRUN -> [SKIP][27] ([Intel XE#1201] / [Intel XE#373]) +5 other tests skip
[27]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-6/igt@kms_chamelium_frames@hdmi-crc-single.html
* igt@kms_cursor_crc@cursor-offscreen-32x32:
- shard-adlp: NOTRUN -> [SKIP][28] ([Intel XE#1201] / [Intel XE#455]) +4 other tests skip
[28]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-4/igt@kms_cursor_crc@cursor-offscreen-32x32.html
* igt@kms_cursor_crc@cursor-sliding-512x170:
- shard-adlp: NOTRUN -> [SKIP][29] ([Intel XE#1201] / [Intel XE#308])
[29]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-4/igt@kms_cursor_crc@cursor-sliding-512x170.html
* igt@kms_cursor_legacy@2x-flip-vs-cursor-legacy:
- shard-adlp: NOTRUN -> [SKIP][30] ([Intel XE#1201] / [Intel XE#309]) +2 other tests skip
[30]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-6/igt@kms_cursor_legacy@2x-flip-vs-cursor-legacy.html
* igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions:
- shard-dg2-set2: [PASS][31] -> [DMESG-WARN][32] ([Intel XE#1214] / [Intel XE#282]) +7 other tests dmesg-warn
[31]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-434/igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions.html
[32]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-434/igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions.html
- shard-adlp: [PASS][33] -> [INCOMPLETE][34] ([Intel XE#1195]) +2 other tests incomplete
[33]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-adlp-8/igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions.html
[34]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-8/igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions.html
* igt@kms_flip@2x-nonexisting-fb-interruptible:
- shard-adlp: NOTRUN -> [SKIP][35] ([Intel XE#1201] / [Intel XE#310]) +4 other tests skip
[35]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-4/igt@kms_flip@2x-nonexisting-fb-interruptible.html
* igt@kms_frontbuffer_tracking@drrs-1p-primscrn-cur-indfb-draw-mmap-wc:
- shard-dg2-set2: NOTRUN -> [SKIP][36] ([Intel XE#1201] / [Intel XE#651]) +1 other test skip
[36]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_frontbuffer_tracking@drrs-1p-primscrn-cur-indfb-draw-mmap-wc.html
* igt@kms_frontbuffer_tracking@drrs-2p-primscrn-spr-indfb-draw-mmap-wc:
- shard-adlp: NOTRUN -> [SKIP][37] ([Intel XE#1201] / [Intel XE#656]) +19 other tests skip
[37]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-6/igt@kms_frontbuffer_tracking@drrs-2p-primscrn-spr-indfb-draw-mmap-wc.html
* igt@kms_frontbuffer_tracking@fbcdrrs-1p-pri-indfb-multidraw:
- shard-adlp: NOTRUN -> [SKIP][38] ([Intel XE#1201] / [Intel XE#651]) +10 other tests skip
[38]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-6/igt@kms_frontbuffer_tracking@fbcdrrs-1p-pri-indfb-multidraw.html
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-mmap-wc:
- shard-adlp: NOTRUN -> [SKIP][39] ([Intel XE#1201] / [Intel XE#653]) +7 other tests skip
[39]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-4/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-mmap-wc.html
* igt@kms_plane_multiple@tiling-y:
- shard-dg2-set2: NOTRUN -> [SKIP][40] ([Intel XE#1201] / [Intel XE#455])
[40]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_plane_multiple@tiling-y.html
* igt@kms_plane_scaling@intel-max-src-size@pipe-a-hdmi-a-1:
- shard-adlp: NOTRUN -> [FAIL][41] ([Intel XE#361]) +1 other test fail
[41]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-4/igt@kms_plane_scaling@intel-max-src-size@pipe-a-hdmi-a-1.html
* igt@kms_pm_dc@dc5-psr:
- shard-adlp: NOTRUN -> [SKIP][42] ([Intel XE#1129] / [Intel XE#1201])
[42]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-4/igt@kms_pm_dc@dc5-psr.html
* igt@kms_psr2_sf@fbc-overlay-plane-move-continuous-sf:
- shard-adlp: NOTRUN -> [SKIP][43] ([Intel XE#1201]) +3 other tests skip
[43]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-4/igt@kms_psr2_sf@fbc-overlay-plane-move-continuous-sf.html
* igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area:
- shard-dg2-set2: NOTRUN -> [SKIP][44] ([Intel XE#1201] / [Intel XE#929])
[44]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area.html
* igt@kms_psr@psr-cursor-blt:
- shard-adlp: NOTRUN -> [SKIP][45] ([Intel XE#1201] / [Intel XE#929]) +7 other tests skip
[45]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-6/igt@kms_psr@psr-cursor-blt.html
* igt@kms_psr_stress_test@invalidate-primary-flip-overlay:
- shard-adlp: NOTRUN -> [SKIP][46] ([Intel XE#1149] / [Intel XE#1201]) +1 other test skip
[46]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-4/igt@kms_psr_stress_test@invalidate-primary-flip-overlay.html
* igt@kms_rotation_crc@primary-y-tiled-reflect-x-270:
- shard-dg2-set2: NOTRUN -> [SKIP][47] ([Intel XE#1201] / [Intel XE#327])
[47]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_rotation_crc@primary-y-tiled-reflect-x-270.html
* igt@kms_rotation_crc@primary-y-tiled-reflect-x-90:
- shard-adlp: NOTRUN -> [SKIP][48] ([Intel XE#1201] / [Intel XE#327]) +1 other test skip
[48]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-4/igt@kms_rotation_crc@primary-y-tiled-reflect-x-90.html
* igt@kms_tiled_display@basic-test-pattern-with-chamelium:
- shard-adlp: NOTRUN -> [SKIP][49] ([Intel XE#1201] / [Intel XE#362])
[49]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-8/igt@kms_tiled_display@basic-test-pattern-with-chamelium.html
* igt@kms_universal_plane@cursor-fb-leak@pipe-a-hdmi-a-6:
- shard-dg2-set2: [PASS][50] -> [FAIL][51] ([Intel XE#899])
[50]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-463/igt@kms_universal_plane@cursor-fb-leak@pipe-a-hdmi-a-6.html
[51]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-464/igt@kms_universal_plane@cursor-fb-leak@pipe-a-hdmi-a-6.html
* igt@kms_writeback@writeback-fb-id:
- shard-adlp: NOTRUN -> [SKIP][52] ([Intel XE#1201] / [Intel XE#756])
[52]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-4/igt@kms_writeback@writeback-fb-id.html
* igt@xe_ccs@ctrl-surf-copy:
- shard-adlp: NOTRUN -> [SKIP][53] ([Intel XE#1201] / [Intel XE#455] / [Intel XE#488]) +1 other test skip
[53]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-6/igt@xe_ccs@ctrl-surf-copy.html
* igt@xe_evict@evict-beng-cm-threads-large:
- shard-dg2-set2: [PASS][54] -> [TIMEOUT][55] ([Intel XE#1473] / [Intel XE#392])
[54]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@xe_evict@evict-beng-cm-threads-large.html
[55]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@xe_evict@evict-beng-cm-threads-large.html
* igt@xe_evict@evict-beng-mixed-many-threads-small:
- shard-dg2-set2: [PASS][56] -> [TIMEOUT][57] ([Intel XE#1473] / [Intel XE#402])
[56]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-436/igt@xe_evict@evict-beng-mixed-many-threads-small.html
[57]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-436/igt@xe_evict@evict-beng-mixed-many-threads-small.html
* igt@xe_evict@evict-beng-small-multi-vm:
- shard-adlp: NOTRUN -> [SKIP][58] ([Intel XE#1201] / [Intel XE#261] / [Intel XE#688])
[58]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-6/igt@xe_evict@evict-beng-small-multi-vm.html
* igt@xe_evict@evict-cm-threads-large:
- shard-adlp: NOTRUN -> [SKIP][59] ([Intel XE#1201] / [Intel XE#261]) +2 other tests skip
[59]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-4/igt@xe_evict@evict-cm-threads-large.html
* igt@xe_exec_basic@multigpu-once-basic-defer-bind:
- shard-adlp: NOTRUN -> [SKIP][60] ([Intel XE#1201] / [Intel XE#1392]) +2 other tests skip
[60]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-6/igt@xe_exec_basic@multigpu-once-basic-defer-bind.html
* igt@xe_exec_fault_mode@many-invalid-userptr-fault:
- shard-adlp: NOTRUN -> [SKIP][61] ([Intel XE#1201] / [Intel XE#288]) +12 other tests skip
[61]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-4/igt@xe_exec_fault_mode@many-invalid-userptr-fault.html
* igt@xe_exec_fault_mode@twice-bindexecqueue-userptr-prefetch:
- shard-dg2-set2: NOTRUN -> [SKIP][62] ([Intel XE#1201] / [Intel XE#288])
[62]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@xe_exec_fault_mode@twice-bindexecqueue-userptr-prefetch.html
* igt@xe_exec_reset@parallel-gt-reset:
- shard-dg2-set2: NOTRUN -> [INCOMPLETE][63] ([Intel XE#1195])
[63]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@xe_exec_reset@parallel-gt-reset.html
* igt@xe_gt_freq@freq_reset_multiple:
- shard-adlp: [PASS][64] -> [DMESG-WARN][65] ([Intel XE#1214] / [Intel XE#1975])
[64]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-adlp-1/igt@xe_gt_freq@freq_reset_multiple.html
[65]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-9/igt@xe_gt_freq@freq_reset_multiple.html
* igt@xe_live_ktest@xe_dma_buf:
- shard-adlp: NOTRUN -> [SKIP][66] ([Intel XE#1192] / [Intel XE#1201]) +1 other test skip
[66]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-6/igt@xe_live_ktest@xe_dma_buf.html
* igt@xe_pm@d3cold-multiple-execs:
- shard-adlp: NOTRUN -> [SKIP][67] ([Intel XE#1201] / [Intel XE#366]) +1 other test skip
[67]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-6/igt@xe_pm@d3cold-multiple-execs.html
* igt@xe_pm@s2idle-exec-after:
- shard-adlp: NOTRUN -> [DMESG-WARN][68] ([Intel XE#1191] / [Intel XE#1214])
[68]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-6/igt@xe_pm@s2idle-exec-after.html
* igt@xe_pm@s2idle-mocs:
- shard-adlp: NOTRUN -> [DMESG-WARN][69] ([Intel XE#1214])
[69]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-4/igt@xe_pm@s2idle-mocs.html
* igt@xe_pm_residency@toggle-gt-c6:
- shard-adlp: [PASS][70] -> [FAIL][71] ([Intel XE#958])
[70]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-adlp-4/igt@xe_pm_residency@toggle-gt-c6.html
[71]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-1/igt@xe_pm_residency@toggle-gt-c6.html
* igt@xe_query@multigpu-query-gt-list:
- shard-adlp: NOTRUN -> [SKIP][72] ([Intel XE#1201] / [Intel XE#944]) +1 other test skip
[72]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-4/igt@xe_query@multigpu-query-gt-list.html
* igt@xe_vm@unbind-all-8-vmas:
- shard-adlp: [PASS][73] -> [DMESG-WARN][74] ([Intel XE#1214]) +4 other tests dmesg-warn
[73]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-adlp-4/igt@xe_vm@unbind-all-8-vmas.html
[74]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-1/igt@xe_vm@unbind-all-8-vmas.html
#### Possible fixes ####
* igt@kms_cursor_legacy@2x-cursor-vs-flip-atomic:
- shard-dg2-set2: [DMESG-WARN][75] ([Intel XE#1214] / [Intel XE#282] / [Intel XE#910]) -> [PASS][76]
[75]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_cursor_legacy@2x-cursor-vs-flip-atomic.html
[76]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_cursor_legacy@2x-cursor-vs-flip-atomic.html
* igt@kms_cursor_legacy@2x-flip-vs-cursor-atomic:
- shard-dg2-set2: [DMESG-WARN][77] ([Intel XE#1214] / [Intel XE#282]) -> [PASS][78] +8 other tests pass
[77]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-436/igt@kms_cursor_legacy@2x-flip-vs-cursor-atomic.html
[78]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-436/igt@kms_cursor_legacy@2x-flip-vs-cursor-atomic.html
* igt@kms_flip@2x-flip-vs-blocking-wf-vblank:
- shard-dg2-set2: [INCOMPLETE][79] ([Intel XE#1195] / [Intel XE#2049]) -> [PASS][80]
[79]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-464/igt@kms_flip@2x-flip-vs-blocking-wf-vblank.html
[80]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_flip@2x-flip-vs-blocking-wf-vblank.html
* igt@kms_flip@2x-flip-vs-blocking-wf-vblank@bd-hdmi-a6-dp4:
- shard-dg2-set2: [INCOMPLETE][81] ([Intel XE#1195]) -> [PASS][82]
[81]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-464/igt@kms_flip@2x-flip-vs-blocking-wf-vblank@bd-hdmi-a6-dp4.html
[82]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_flip@2x-flip-vs-blocking-wf-vblank@bd-hdmi-a6-dp4.html
* igt@kms_hdr@invalid-hdr:
- shard-dg2-set2: [SKIP][83] ([Intel XE#1201] / [Intel XE#455]) -> [PASS][84]
[83]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-435/igt@kms_hdr@invalid-hdr.html
[84]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-463/igt@kms_hdr@invalid-hdr.html
* igt@kms_pipe_crc_basic@suspend-read-crc@pipe-b-hdmi-a-1:
- shard-adlp: [DMESG-WARN][85] ([Intel XE#1191] / [Intel XE#1214]) -> [PASS][86] +1 other test pass
[85]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-adlp-1/igt@kms_pipe_crc_basic@suspend-read-crc@pipe-b-hdmi-a-1.html
[86]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-1/igt@kms_pipe_crc_basic@suspend-read-crc@pipe-b-hdmi-a-1.html
* igt@kms_pm_dc@dc6-psr:
- {shard-lnl}: [FAIL][87] ([Intel XE#1430]) -> [PASS][88]
[87]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-lnl-8/igt@kms_pm_dc@dc6-psr.html
[88]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-lnl-3/igt@kms_pm_dc@dc6-psr.html
* igt@kms_psr@fbc-psr2-suspend:
- {shard-lnl}: [DMESG-WARN][89] -> [PASS][90] +5 other tests pass
[89]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-lnl-3/igt@kms_psr@fbc-psr2-suspend.html
[90]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-lnl-2/igt@kms_psr@fbc-psr2-suspend.html
* igt@kms_universal_plane@cursor-fb-leak:
- shard-adlp: [FAIL][91] ([Intel XE#771] / [Intel XE#899]) -> [PASS][92]
[91]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-adlp-6/igt@kms_universal_plane@cursor-fb-leak.html
[92]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-6/igt@kms_universal_plane@cursor-fb-leak.html
* igt@kms_universal_plane@cursor-fb-leak@pipe-c-hdmi-a-1:
- shard-adlp: [FAIL][93] ([Intel XE#899]) -> [PASS][94]
[93]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-adlp-6/igt@kms_universal_plane@cursor-fb-leak@pipe-c-hdmi-a-1.html
[94]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-6/igt@kms_universal_plane@cursor-fb-leak@pipe-c-hdmi-a-1.html
* igt@kms_universal_plane@cursor-fb-leak@pipe-c-hdmi-a-6:
- shard-dg2-set2: [FAIL][95] ([Intel XE#899]) -> [PASS][96]
[95]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-463/igt@kms_universal_plane@cursor-fb-leak@pipe-c-hdmi-a-6.html
[96]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-464/igt@kms_universal_plane@cursor-fb-leak@pipe-c-hdmi-a-6.html
* igt@xe_evict@evict-mixed-threads-large:
- shard-dg2-set2: [TIMEOUT][97] ([Intel XE#1041] / [Intel XE#1473] / [Intel XE#392]) -> [PASS][98]
[97]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-463/igt@xe_evict@evict-mixed-threads-large.html
[98]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-464/igt@xe_evict@evict-mixed-threads-large.html
* igt@xe_exec_compute_mode@twice-userptr-invalidate:
- {shard-lnl}: [FAIL][99] ([Intel XE#1069]) -> [PASS][100]
[99]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-lnl-3/igt@xe_exec_compute_mode@twice-userptr-invalidate.html
[100]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-lnl-2/igt@xe_exec_compute_mode@twice-userptr-invalidate.html
* igt@xe_gt_freq@freq_fixed_exec:
- shard-adlp: [FAIL][101] ([Intel XE#1414]) -> [PASS][102]
[101]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-adlp-6/igt@xe_gt_freq@freq_fixed_exec.html
[102]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-6/igt@xe_gt_freq@freq_fixed_exec.html
* igt@xe_gt_freq@freq_reset_multiple:
- {shard-lnl}: [DMESG-WARN][103] ([Intel XE#1620]) -> [PASS][104]
[103]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-lnl-7/igt@xe_gt_freq@freq_reset_multiple.html
[104]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-lnl-6/igt@xe_gt_freq@freq_reset_multiple.html
* igt@xe_pm@s4-basic:
- shard-adlp: [ABORT][105] ([Intel XE#1358]) -> [PASS][106]
[105]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-adlp-9/igt@xe_pm@s4-basic.html
[106]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-8/igt@xe_pm@s4-basic.html
* igt@xe_vm@mixed-userptr-misaligned-binds-3145728:
- shard-adlp: [DMESG-WARN][107] ([Intel XE#1214]) -> [PASS][108] +2 other tests pass
[107]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-adlp-4/igt@xe_vm@mixed-userptr-misaligned-binds-3145728.html
[108]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-1/igt@xe_vm@mixed-userptr-misaligned-binds-3145728.html
#### Warnings ####
* igt@kms_async_flips@async-flip-with-page-flip-events@pipe-c-hdmi-a-6-4-mc-ccs:
- shard-dg2-set2: [SKIP][109] ([Intel XE#1201] / [Intel XE#801]) -> [SKIP][110] ([Intel XE#801]) +23 other tests skip
[109]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_async_flips@async-flip-with-page-flip-events@pipe-c-hdmi-a-6-4-mc-ccs.html
[110]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_async_flips@async-flip-with-page-flip-events@pipe-c-hdmi-a-6-4-mc-ccs.html
* igt@kms_big_fb@linear-8bpp-rotate-270:
- shard-dg2-set2: [SKIP][111] ([Intel XE#1201] / [Intel XE#316]) -> [SKIP][112] ([Intel XE#316]) +2 other tests skip
[111]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_big_fb@linear-8bpp-rotate-270.html
[112]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_big_fb@linear-8bpp-rotate-270.html
* igt@kms_big_fb@x-tiled-16bpp-rotate-270:
- shard-dg2-set2: [SKIP][113] ([Intel XE#316]) -> [SKIP][114] ([Intel XE#1201] / [Intel XE#316]) +2 other tests skip
[113]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@kms_big_fb@x-tiled-16bpp-rotate-270.html
[114]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_big_fb@x-tiled-16bpp-rotate-270.html
* igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-180-hflip-async-flip:
- shard-adlp: [FAIL][115] ([Intel XE#1231]) -> [DMESG-FAIL][116] ([Intel XE#324])
[115]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-adlp-1/igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-180-hflip-async-flip.html
[116]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-1/igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-180-hflip-async-flip.html
* igt@kms_big_fb@y-tiled-8bpp-rotate-270:
- shard-dg2-set2: [SKIP][117] ([Intel XE#1124]) -> [SKIP][118] ([Intel XE#1124] / [Intel XE#1201]) +5 other tests skip
[117]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@kms_big_fb@y-tiled-8bpp-rotate-270.html
[118]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-433/igt@kms_big_fb@y-tiled-8bpp-rotate-270.html
* igt@kms_big_fb@y-tiled-addfb:
- shard-dg2-set2: [SKIP][119] ([Intel XE#1201] / [Intel XE#619]) -> [SKIP][120] ([Intel XE#619])
[119]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_big_fb@y-tiled-addfb.html
[120]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_big_fb@y-tiled-addfb.html
* igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-async-flip:
- shard-adlp: [DMESG-FAIL][121] ([Intel XE#324]) -> [FAIL][122] ([Intel XE#1231]) +1 other test fail
[121]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-adlp-1/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-async-flip.html
[122]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-1/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-async-flip.html
* igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180-hflip-async-flip:
- shard-dg2-set2: [SKIP][123] ([Intel XE#1124] / [Intel XE#1201]) -> [SKIP][124] ([Intel XE#1124]) +8 other tests skip
[123]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180-hflip-async-flip.html
[124]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180-hflip-async-flip.html
* igt@kms_big_joiner@invalid-modeset:
- shard-dg2-set2: [SKIP][125] ([Intel XE#346]) -> [SKIP][126] ([Intel XE#1201] / [Intel XE#346])
[125]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@kms_big_joiner@invalid-modeset.html
[126]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-433/igt@kms_big_joiner@invalid-modeset.html
* igt@kms_bw@linear-tiling-4-displays-1920x1080p:
- shard-dg2-set2: [SKIP][127] ([Intel XE#367]) -> [SKIP][128] ([Intel XE#1201] / [Intel XE#367]) +1 other test skip
[127]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@kms_bw@linear-tiling-4-displays-1920x1080p.html
[128]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_bw@linear-tiling-4-displays-1920x1080p.html
* igt@kms_bw@linear-tiling-4-displays-2160x1440p:
- shard-dg2-set2: [SKIP][129] ([Intel XE#1201] / [Intel XE#367]) -> [SKIP][130] ([Intel XE#367]) +1 other test skip
[129]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_bw@linear-tiling-4-displays-2160x1440p.html
[130]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_bw@linear-tiling-4-displays-2160x1440p.html
* igt@kms_ccs@crc-primary-basic-y-tiled-gen12-rc-ccs-cc@pipe-a-dp-4:
- shard-dg2-set2: [SKIP][131] ([Intel XE#787]) -> [SKIP][132] ([Intel XE#1201] / [Intel XE#787]) +62 other tests skip
[131]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@kms_ccs@crc-primary-basic-y-tiled-gen12-rc-ccs-cc@pipe-a-dp-4.html
[132]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-433/igt@kms_ccs@crc-primary-basic-y-tiled-gen12-rc-ccs-cc@pipe-a-dp-4.html
* igt@kms_ccs@crc-sprite-planes-basic-yf-tiled-ccs:
- shard-dg2-set2: [SKIP][133] ([Intel XE#1201] / [Intel XE#455] / [Intel XE#787]) -> [SKIP][134] ([Intel XE#455] / [Intel XE#787]) +13 other tests skip
[133]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_ccs@crc-sprite-planes-basic-yf-tiled-ccs.html
[134]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_ccs@crc-sprite-planes-basic-yf-tiled-ccs.html
* igt@kms_ccs@crc-sprite-planes-basic-yf-tiled-ccs@pipe-d-hdmi-a-6:
- shard-dg2-set2: [SKIP][135] ([Intel XE#1201] / [Intel XE#787]) -> [SKIP][136] ([Intel XE#787]) +48 other tests skip
[135]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_ccs@crc-sprite-planes-basic-yf-tiled-ccs@pipe-d-hdmi-a-6.html
[136]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_ccs@crc-sprite-planes-basic-yf-tiled-ccs@pipe-d-hdmi-a-6.html
* igt@kms_ccs@missing-ccs-buffer-4-tiled-mtl-mc-ccs@pipe-d-dp-4:
- shard-dg2-set2: [SKIP][137] ([Intel XE#455] / [Intel XE#787]) -> [SKIP][138] ([Intel XE#1201] / [Intel XE#455] / [Intel XE#787]) +17 other tests skip
[137]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@kms_ccs@missing-ccs-buffer-4-tiled-mtl-mc-ccs@pipe-d-dp-4.html
[138]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_ccs@missing-ccs-buffer-4-tiled-mtl-mc-ccs@pipe-d-dp-4.html
* igt@kms_cdclk@plane-scaling@pipe-b-dp-4:
- shard-dg2-set2: [SKIP][139] ([Intel XE#1152]) -> [SKIP][140] ([Intel XE#1152] / [Intel XE#1201]) +3 other tests skip
[139]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@kms_cdclk@plane-scaling@pipe-b-dp-4.html
[140]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-433/igt@kms_cdclk@plane-scaling@pipe-b-dp-4.html
* igt@kms_chamelium_color@ctm-0-75:
- shard-dg2-set2: [SKIP][141] ([Intel XE#306]) -> [SKIP][142] ([Intel XE#1201] / [Intel XE#306]) +2 other tests skip
[141]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@kms_chamelium_color@ctm-0-75.html
[142]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_chamelium_color@ctm-0-75.html
* igt@kms_chamelium_color@ctm-red-to-blue:
- shard-dg2-set2: [SKIP][143] ([Intel XE#1201] / [Intel XE#306]) -> [SKIP][144] ([Intel XE#306]) +1 other test skip
[143]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_chamelium_color@ctm-red-to-blue.html
[144]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_chamelium_color@ctm-red-to-blue.html
* igt@kms_chamelium_frames@vga-frame-dump:
- shard-dg2-set2: [SKIP][145] ([Intel XE#373]) -> [SKIP][146] ([Intel XE#1201] / [Intel XE#373]) +4 other tests skip
[145]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@kms_chamelium_frames@vga-frame-dump.html
[146]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-433/igt@kms_chamelium_frames@vga-frame-dump.html
* igt@kms_chamelium_hpd@vga-hpd-for-each-pipe:
- shard-dg2-set2: [SKIP][147] ([Intel XE#1201] / [Intel XE#373]) -> [SKIP][148] ([Intel XE#373]) +6 other tests skip
[147]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_chamelium_hpd@vga-hpd-for-each-pipe.html
[148]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_chamelium_hpd@vga-hpd-for-each-pipe.html
* igt@kms_content_protection@dp-mst-lic-type-0:
- shard-dg2-set2: [SKIP][149] ([Intel XE#307]) -> [SKIP][150] ([Intel XE#1201] / [Intel XE#307])
[149]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@kms_content_protection@dp-mst-lic-type-0.html
[150]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_content_protection@dp-mst-lic-type-0.html
* igt@kms_cursor_crc@cursor-offscreen-512x170:
- shard-dg2-set2: [SKIP][151] ([Intel XE#308]) -> [SKIP][152] ([Intel XE#1201] / [Intel XE#308]) +1 other test skip
[151]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@kms_cursor_crc@cursor-offscreen-512x170.html
[152]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_cursor_crc@cursor-offscreen-512x170.html
* igt@kms_cursor_crc@cursor-random-512x512:
- shard-dg2-set2: [SKIP][153] ([Intel XE#1201] / [Intel XE#308]) -> [SKIP][154] ([Intel XE#308]) +1 other test skip
[153]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_cursor_crc@cursor-random-512x512.html
[154]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_cursor_crc@cursor-random-512x512.html
* igt@kms_cursor_crc@cursor-rapid-movement-max-size:
- shard-dg2-set2: [SKIP][155] ([Intel XE#455]) -> [SKIP][156] ([Intel XE#1201] / [Intel XE#455]) +12 other tests skip
[155]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@kms_cursor_crc@cursor-rapid-movement-max-size.html
[156]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_cursor_crc@cursor-rapid-movement-max-size.html
* igt@kms_cursor_crc@cursor-suspend@pipe-d-hdmi-a-1:
- shard-adlp: [DMESG-WARN][157] ([Intel XE#1191] / [Intel XE#1214]) -> [DMESG-WARN][158] ([Intel XE#1214])
[157]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-adlp-4/igt@kms_cursor_crc@cursor-suspend@pipe-d-hdmi-a-1.html
[158]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-1/igt@kms_cursor_crc@cursor-suspend@pipe-d-hdmi-a-1.html
* igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
- shard-dg2-set2: [DMESG-WARN][159] ([Intel XE#1214] / [Intel XE#282]) -> [DMESG-WARN][160] ([Intel XE#1214] / [Intel XE#282] / [Intel XE#910])
[159]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-466/igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy.html
[160]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-466/igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy.html
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-varying-size:
- shard-dg2-set2: [SKIP][161] ([Intel XE#323]) -> [SKIP][162] ([Intel XE#1201] / [Intel XE#323])
[161]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-varying-size.html
[162]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-varying-size.html
* igt@kms_cursor_legacy@cursorb-vs-flipb-varying-size:
- shard-dg2-set2: [DMESG-WARN][163] ([Intel XE#282]) -> [DMESG-WARN][164] ([Intel XE#1214] / [Intel XE#282]) +4 other tests dmesg-warn
[163]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@kms_cursor_legacy@cursorb-vs-flipb-varying-size.html
[164]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-433/igt@kms_cursor_legacy@cursorb-vs-flipb-varying-size.html
* igt@kms_cursor_legacy@short-busy-flip-before-cursor-toggle:
- shard-dg2-set2: [SKIP][165] ([Intel XE#1201] / [Intel XE#323]) -> [SKIP][166] ([Intel XE#323])
[165]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_cursor_legacy@short-busy-flip-before-cursor-toggle.html
[166]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_cursor_legacy@short-busy-flip-before-cursor-toggle.html
* igt@kms_cursor_legacy@single-bo@all-pipes:
- shard-dg2-set2: [DMESG-WARN][167] ([Intel XE#1214] / [Intel XE#282]) -> [DMESG-WARN][168] ([Intel XE#282]) +2 other tests dmesg-warn
[167]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_cursor_legacy@single-bo@all-pipes.html
[168]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_cursor_legacy@single-bo@all-pipes.html
* igt@kms_dither@fb-8bpc-vs-panel-6bpc@pipe-a-hdmi-a-6:
- shard-dg2-set2: [SKIP][169] ([i915#3804]) -> [SKIP][170] ([Intel XE#1201] / [i915#3804])
[169]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@kms_dither@fb-8bpc-vs-panel-6bpc@pipe-a-hdmi-a-6.html
[170]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-433/igt@kms_dither@fb-8bpc-vs-panel-6bpc@pipe-a-hdmi-a-6.html
* igt@kms_fbcon_fbt@psr-suspend:
- shard-dg2-set2: [SKIP][171] ([Intel XE#1201] / [Intel XE#776]) -> [SKIP][172] ([Intel XE#776])
[171]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_fbcon_fbt@psr-suspend.html
[172]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_fbcon_fbt@psr-suspend.html
* igt@kms_feature_discovery@display-3x:
- shard-dg2-set2: [SKIP][173] ([Intel XE#703]) -> [SKIP][174] ([Intel XE#1201] / [Intel XE#703])
[173]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@kms_feature_discovery@display-3x.html
[174]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_feature_discovery@display-3x.html
* igt@kms_feature_discovery@psr2:
- shard-dg2-set2: [SKIP][175] ([Intel XE#1135]) -> [SKIP][176] ([Intel XE#1135] / [Intel XE#1201])
[175]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@kms_feature_discovery@psr2.html
[176]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_feature_discovery@psr2.html
* igt@kms_flip@flip-vs-suspend-interruptible@b-hdmi-a1:
- shard-adlp: [DMESG-WARN][177] ([Intel XE#1214]) -> [DMESG-WARN][178] ([Intel XE#1191] / [Intel XE#1214]) +3 other tests dmesg-warn
[177]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-adlp-2/igt@kms_flip@flip-vs-suspend-interruptible@b-hdmi-a1.html
[178]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-4/igt@kms_flip@flip-vs-suspend-interruptible@b-hdmi-a1.html
* igt@kms_force_connector_basic@prune-stale-modes:
- shard-dg2-set2: [SKIP][179] ([Intel XE#1201] / [i915#5274]) -> [SKIP][180] ([i915#5274])
[179]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_force_connector_basic@prune-stale-modes.html
[180]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_force_connector_basic@prune-stale-modes.html
* igt@kms_frontbuffer_tracking@drrs-2p-scndscrn-indfb-msflip-blt:
- shard-dg2-set2: [SKIP][181] ([Intel XE#1201] / [Intel XE#651]) -> [SKIP][182] ([Intel XE#651]) +20 other tests skip
[181]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_frontbuffer_tracking@drrs-2p-scndscrn-indfb-msflip-blt.html
[182]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_frontbuffer_tracking@drrs-2p-scndscrn-indfb-msflip-blt.html
* igt@kms_frontbuffer_tracking@drrs-suspend:
- shard-dg2-set2: [SKIP][183] ([Intel XE#651]) -> [SKIP][184] ([Intel XE#1201] / [Intel XE#651]) +22 other tests skip
[183]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@kms_frontbuffer_tracking@drrs-suspend.html
[184]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-433/igt@kms_frontbuffer_tracking@drrs-suspend.html
* igt@kms_frontbuffer_tracking@fbcpsr-tiling-4:
- shard-dg2-set2: [SKIP][185] ([Intel XE#1201] / [Intel XE#653]) -> [SKIP][186] ([Intel XE#653]) +22 other tests skip
[185]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_frontbuffer_tracking@fbcpsr-tiling-4.html
[186]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_frontbuffer_tracking@fbcpsr-tiling-4.html
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-blt:
- shard-dg2-set2: [SKIP][187] ([Intel XE#653]) -> [SKIP][188] ([Intel XE#1201] / [Intel XE#653]) +19 other tests skip
[187]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-blt.html
[188]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-blt.html
* igt@kms_multipipe_modeset@basic-max-pipe-crc-check:
- shard-dg2-set2: [SKIP][189] ([Intel XE#1201] / [Intel XE#356]) -> [SKIP][190] ([Intel XE#356])
[189]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_multipipe_modeset@basic-max-pipe-crc-check.html
[190]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_multipipe_modeset@basic-max-pipe-crc-check.html
* igt@kms_plane_scaling@plane-downscale-factor-0-25-with-modifiers:
- shard-dg2-set2: [SKIP][191] ([Intel XE#1201] / [Intel XE#455] / [Intel XE#498]) -> [SKIP][192] ([Intel XE#455] / [Intel XE#498]) +1 other test skip
[191]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_plane_scaling@plane-downscale-factor-0-25-with-modifiers.html
[192]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_plane_scaling@plane-downscale-factor-0-25-with-modifiers.html
* igt@kms_plane_scaling@plane-downscale-factor-0-25-with-modifiers@pipe-a-hdmi-a-6:
- shard-dg2-set2: [SKIP][193] ([Intel XE#1201] / [Intel XE#498]) -> [SKIP][194] ([Intel XE#498]) +2 other tests skip
[193]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_plane_scaling@plane-downscale-factor-0-25-with-modifiers@pipe-a-hdmi-a-6.html
[194]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_plane_scaling@plane-downscale-factor-0-25-with-modifiers@pipe-a-hdmi-a-6.html
* igt@kms_pm_backlight@fade-with-suspend:
- shard-dg2-set2: [SKIP][195] ([Intel XE#870]) -> [SKIP][196] ([Intel XE#1201] / [Intel XE#870]) +1 other test skip
[195]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@kms_pm_backlight@fade-with-suspend.html
[196]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_pm_backlight@fade-with-suspend.html
* igt@kms_psr2_su@page_flip-nv12:
- shard-dg2-set2: [SKIP][197] ([Intel XE#1122] / [Intel XE#1201]) -> [SKIP][198] ([Intel XE#1122]) +1 other test skip
[197]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_psr2_su@page_flip-nv12.html
[198]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_psr2_su@page_flip-nv12.html
* igt@kms_psr@fbc-psr2-sprite-plane-move:
- shard-dg2-set2: [SKIP][199] ([Intel XE#1201] / [Intel XE#929]) -> [SKIP][200] ([Intel XE#929]) +12 other tests skip
[199]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_psr@fbc-psr2-sprite-plane-move.html
[200]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_psr@fbc-psr2-sprite-plane-move.html
* igt@kms_psr@pr-cursor-plane-onoff:
- shard-dg2-set2: [SKIP][201] ([Intel XE#929]) -> [SKIP][202] ([Intel XE#1201] / [Intel XE#929]) +13 other tests skip
[201]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@kms_psr@pr-cursor-plane-onoff.html
[202]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_psr@pr-cursor-plane-onoff.html
* igt@kms_rotation_crc@sprite-rotation-90-pos-100-0:
- shard-dg2-set2: [SKIP][203] ([Intel XE#1201] / [Intel XE#327]) -> [SKIP][204] ([Intel XE#327]) +1 other test skip
[203]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_rotation_crc@sprite-rotation-90-pos-100-0.html
[204]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_rotation_crc@sprite-rotation-90-pos-100-0.html
* igt@kms_tiled_display@basic-test-pattern-with-chamelium:
- shard-dg2-set2: [SKIP][205] ([Intel XE#1500]) -> [SKIP][206] ([Intel XE#1201] / [Intel XE#1500])
[205]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@kms_tiled_display@basic-test-pattern-with-chamelium.html
[206]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_tiled_display@basic-test-pattern-with-chamelium.html
* igt@kms_vrr@flip-dpms:
- shard-dg2-set2: [SKIP][207] ([Intel XE#1201] / [Intel XE#455]) -> [SKIP][208] ([Intel XE#455]) +12 other tests skip
[207]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_vrr@flip-dpms.html
[208]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_vrr@flip-dpms.html
* igt@kms_writeback@writeback-fb-id-xrgb2101010:
- shard-dg2-set2: [SKIP][209] ([Intel XE#1201] / [Intel XE#756]) -> [SKIP][210] ([Intel XE#756]) +1 other test skip
[209]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@kms_writeback@writeback-fb-id-xrgb2101010.html
[210]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@kms_writeback@writeback-fb-id-xrgb2101010.html
* igt@kms_writeback@writeback-pixel-formats:
- shard-dg2-set2: [SKIP][211] ([Intel XE#756]) -> [SKIP][212] ([Intel XE#1201] / [Intel XE#756])
[211]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@kms_writeback@writeback-pixel-formats.html
[212]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@kms_writeback@writeback-pixel-formats.html
* igt@sriov_basic@enable-vfs-bind-unbind-each:
- shard-dg2-set2: [SKIP][213] ([Intel XE#1091]) -> [SKIP][214] ([Intel XE#1091] / [Intel XE#1201])
[213]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@sriov_basic@enable-vfs-bind-unbind-each.html
[214]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-433/igt@sriov_basic@enable-vfs-bind-unbind-each.html
* igt@xe_copy_basic@mem-set-linear-0xfffe:
- shard-dg2-set2: [SKIP][215] ([Intel XE#1126] / [Intel XE#1201]) -> [SKIP][216] ([Intel XE#1126])
[215]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@xe_copy_basic@mem-set-linear-0xfffe.html
[216]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@xe_copy_basic@mem-set-linear-0xfffe.html
* igt@xe_evict@evict-cm-threads-large:
- shard-dg2-set2: [TIMEOUT][217] ([Intel XE#1473] / [Intel XE#392]) -> [TIMEOUT][218] ([Intel XE#1041] / [Intel XE#1473] / [Intel XE#392])
[217]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-436/igt@xe_evict@evict-cm-threads-large.html
[218]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-436/igt@xe_evict@evict-cm-threads-large.html
* igt@xe_exec_fault_mode@twice-bindexecqueue-rebind-imm:
- shard-dg2-set2: [SKIP][219] ([Intel XE#288]) -> [SKIP][220] ([Intel XE#1201] / [Intel XE#288]) +17 other tests skip
[219]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@xe_exec_fault_mode@twice-bindexecqueue-rebind-imm.html
[220]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@xe_exec_fault_mode@twice-bindexecqueue-rebind-imm.html
* igt@xe_exec_fault_mode@twice-invalid-fault:
- shard-dg2-set2: [SKIP][221] ([Intel XE#1201] / [Intel XE#288]) -> [SKIP][222] ([Intel XE#288]) +18 other tests skip
[221]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@xe_exec_fault_mode@twice-invalid-fault.html
[222]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@xe_exec_fault_mode@twice-invalid-fault.html
* igt@xe_huc_copy@huc_copy:
- shard-dg2-set2: [SKIP][223] ([Intel XE#255]) -> [SKIP][224] ([Intel XE#1201] / [Intel XE#255])
[223]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@xe_huc_copy@huc_copy.html
[224]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@xe_huc_copy@huc_copy.html
* igt@xe_media_fill@media-fill:
- shard-dg2-set2: [SKIP][225] ([Intel XE#1201] / [Intel XE#560]) -> [SKIP][226] ([Intel XE#560])
[225]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@xe_media_fill@media-fill.html
[226]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@xe_media_fill@media-fill.html
* igt@xe_pm@d3cold-basic-exec:
- shard-dg2-set2: [SKIP][227] ([Intel XE#1201] / [Intel XE#366]) -> [SKIP][228] ([Intel XE#366]) +1 other test skip
[227]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@xe_pm@d3cold-basic-exec.html
[228]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@xe_pm@d3cold-basic-exec.html
* igt@xe_pm@s4-basic-exec:
- shard-dg2-set2: [DMESG-WARN][229] -> [DMESG-WARN][230] ([Intel XE#1214]) +2 other tests dmesg-warn
[229]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@xe_pm@s4-basic-exec.html
[230]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-433/igt@xe_pm@s4-basic-exec.html
- shard-adlp: [DMESG-WARN][231] ([Intel XE#1214]) -> [ABORT][232] ([Intel XE#1358] / [Intel XE#1794])
[231]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-adlp-4/igt@xe_pm@s4-basic-exec.html
[232]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-9/igt@xe_pm@s4-basic-exec.html
* igt@xe_pm@s4-d3hot-basic-exec:
- shard-adlp: [DMESG-WARN][233] ([Intel XE#1214]) -> [WARN][234] ([Intel XE#1639])
[233]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-adlp-1/igt@xe_pm@s4-d3hot-basic-exec.html
[234]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-1/igt@xe_pm@s4-d3hot-basic-exec.html
* igt@xe_query@multigpu-query-engines:
- shard-dg2-set2: [SKIP][235] ([Intel XE#1201] / [Intel XE#944]) -> [SKIP][236] ([Intel XE#944]) +2 other tests skip
[235]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-433/igt@xe_query@multigpu-query-engines.html
[236]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-432/igt@xe_query@multigpu-query-engines.html
* igt@xe_query@multigpu-query-uc-fw-version-huc:
- shard-dg2-set2: [SKIP][237] ([Intel XE#944]) -> [SKIP][238] ([Intel XE#1201] / [Intel XE#944]) +3 other tests skip
[237]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-dg2-432/igt@xe_query@multigpu-query-uc-fw-version-huc.html
[238]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-dg2-435/igt@xe_query@multigpu-query-uc-fw-version-huc.html
* igt@xe_wedged@wedged-at-any-timeout:
- shard-adlp: [DMESG-WARN][239] ([Intel XE#1214] / [Intel XE#1330] / [Intel XE#1760]) -> [DMESG-WARN][240] ([Intel XE#1214] / [Intel XE#1760])
[239]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153/shard-adlp-8/igt@xe_wedged@wedged-at-any-timeout.html
[240]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/shard-adlp-2/igt@xe_wedged@wedged-at-any-timeout.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[Intel XE#1041]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1041
[Intel XE#1069]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1069
[Intel XE#1091]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1091
[Intel XE#1122]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1122
[Intel XE#1124]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1124
[Intel XE#1126]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1126
[Intel XE#1129]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1129
[Intel XE#1135]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1135
[Intel XE#1149]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1149
[Intel XE#1152]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1152
[Intel XE#1191]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1191
[Intel XE#1192]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1192
[Intel XE#1195]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1195
[Intel XE#1201]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1201
[Intel XE#1211]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1211
[Intel XE#1214]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1214
[Intel XE#1231]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1231
[Intel XE#1252]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1252
[Intel XE#1330]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1330
[Intel XE#1358]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1358
[Intel XE#1392]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1392
[Intel XE#1399]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1399
[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#1414]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1414
[Intel XE#1424]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1424
[Intel XE#1430]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1430
[Intel XE#1473]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1473
[Intel XE#1491]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1491
[Intel XE#1500]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1500
[Intel XE#1595]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1595
[Intel XE#1616]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1616
[Intel XE#1620]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1620
[Intel XE#1622]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1622
[Intel XE#1638]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1638
[Intel XE#1639]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1639
[Intel XE#1659]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1659
[Intel XE#1760]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1760
[Intel XE#1794]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1794
[Intel XE#1874]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1874
[Intel XE#1975]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1975
[Intel XE#2049]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2049
[Intel XE#255]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/255
[Intel XE#261]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/261
[Intel XE#282]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/282
[Intel XE#288]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/288
[Intel XE#306]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/306
[Intel XE#307]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/307
[Intel XE#308]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/308
[Intel XE#309]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/309
[Intel XE#310]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/310
[Intel XE#316]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/316
[Intel XE#323]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/323
[Intel XE#324]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/324
[Intel XE#327]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/327
[Intel XE#346]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/346
[Intel XE#356]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/356
[Intel XE#361]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/361
[Intel XE#362]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/362
[Intel XE#366]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/366
[Intel XE#367]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/367
[Intel XE#373]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/373
[Intel XE#392]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/392
[Intel XE#402]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/402
[Intel XE#455]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/455
[Intel XE#488]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/488
[Intel XE#498]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/498
[Intel XE#560]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/560
[Intel XE#599]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/599
[Intel XE#610]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/610
[Intel XE#619]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/619
[Intel XE#651]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/651
[Intel XE#653]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/653
[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#703]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/703
[Intel XE#756]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/756
[Intel XE#771]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/771
[Intel XE#776]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/776
[Intel XE#787]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/787
[Intel XE#801]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/801
[Intel XE#870]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/870
[Intel XE#899]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/899
[Intel XE#910]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/910
[Intel XE#929]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/929
[Intel XE#944]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/944
[Intel XE#958]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/958
[i915#3804]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3804
[i915#5274]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5274
Build changes
-------------
* Linux: xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153 -> xe-pw-131815v5
IGT_7890: a137e386eba9f46f838315f5d93b87561691d45e @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-1486-7f26b37f8cb73f5cf2251d7fff5b55240e04f153: 7f26b37f8cb73f5cf2251d7fff5b55240e04f153
xe-pw-131815v5: 131815v5
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-131815v5/index.html
[-- Attachment #2: Type: text/html, Size: 86155 bytes --]
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v5 05/12] drm/ttm: Provide a generic LRU walker helper
2024-06-18 7:18 ` [PATCH v5 05/12] drm/ttm: Provide a generic LRU walker helper Thomas Hellström
@ 2024-06-18 22:11 ` Matthew Brost
2024-06-19 7:31 ` Thomas Hellström
0 siblings, 1 reply; 36+ messages in thread
From: Matthew Brost @ 2024-06-18 22:11 UTC (permalink / raw)
To: Thomas Hellström
Cc: intel-xe, Christian König, Somalapuram Amaranath, dri-devel
On Tue, Jun 18, 2024 at 09:18:13AM +0200, Thomas Hellström wrote:
Replying to correct version...
> Provide a generic LRU walker in TTM, in the spirit of drm_gem_lru_scan()
> but building on the restartable TTM LRU functionality.
>
> The LRU walker optionally supports locking objects as part of
> a ww mutex locking transaction, to mimic to some extent the
> current functionality in ttm. However any -EDEADLK return
> is converted to -ENOMEM, so that the driver will need to back
> off and possibly retry without being able to keep the
> ticket.
>
Wouldn't the backoff be unlock everything but keep the ticket?
> v3:
> - Move the helper to core ttm.
> - Remove the drm_exec usage from it for now, it will be
> reintroduced later in the series.
> v4:
> - Handle the -EALREADY case if ticketlocking.
>
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> Cc: <dri-devel@lists.freedesktop.org>
> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> ---
> drivers/gpu/drm/ttm/ttm_bo_util.c | 145 ++++++++++++++++++++++++++++++
> include/drm/ttm/ttm_bo.h | 32 +++++++
> 2 files changed, 177 insertions(+)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
> index 0b3f4267130c..45fcaf6f8644 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo_util.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
> @@ -768,3 +768,148 @@ int ttm_bo_pipeline_gutting(struct ttm_buffer_object *bo)
> ttm_tt_destroy(bo->bdev, ttm);
> return ret;
> }
> +
> +static bool ttm_lru_walk_trylock(struct ttm_lru_walk *walk,
> + struct ttm_buffer_object *bo,
> + bool *needs_unlock)
> +{
> + struct ttm_operation_ctx *ctx = walk->ctx;
> +
> + *needs_unlock = false;
> +
> + if (dma_resv_trylock(bo->base.resv)) {
> + *needs_unlock = true;
> + return true;
> + }
> +
> + if (bo->base.resv == ctx->resv && ctx->allow_res_evict) {
> + dma_resv_assert_held(bo->base.resv);
> + return true;
> + }
> +i
Any reason this is done after the try lock? Just kinda goofy as if this
statement is true the dma_resv_trylock will always fail.
> + return false;
> +}
> +
> +static int ttm_lru_walk_ticketlock(struct ttm_lru_walk *walk,
> + struct ttm_buffer_object *bo,
> + bool *needs_unlock)
> +{
> + struct dma_resv *resv = bo->base.resv;
> + int ret;
> +
I suppose we don't have asserts here like in Xe but if we did,
assert(walk->ticket)?
> + if (walk->ctx->interruptible)
> + ret = dma_resv_lock_interruptible(resv, walk->ticket);
> + else
> + ret = dma_resv_lock(resv, walk->ticket);
> +
> + if (!ret) {
> + *needs_unlock = true;
> + /* Only a single ticketlock per loop. */
> + walk->ticket = NULL;
Can you explain this a bit more? I see that once the walk->ticket is set
to NULL this function will not be called again (i.e. only try locking
will be used). I want to understand the reasoning for this.
It might be helpful for a more lengthly explaination in the comments of
the code too.
> + } else if (ret == -EDEADLK) {
> + /* Caller needs to exit the ww transaction. */
> + ret = -ENOSPC;
The commit message says -ENOMEM.
> + }
> +
> + return ret;
> +}
> +
> +static void ttm_lru_walk_unlock(struct ttm_buffer_object *bo, bool locked)
> +{
> + if (locked)
> + dma_resv_unlock(bo->base.resv);
> +}
> +
> +/**
> + * ttm_lru_walk_for_evict() - Perform a LRU list walk, with actions taken on
> + * valid items.
> + * @walk: describe the walks and actions taken
> + * @bdev: The TTM device.
> + * @man: The struct ttm_resource manager whose LRU lists we're walking.
> + * @target: The end condition for the walk.
> + *
> + * The LRU lists of @man are walk, and for each struct ttm_resource encountered,
> + * the corresponding ttm_buffer_object is locked and taken a reference on, and
> + * the LRU lock is dropped. the LRU lock may be dropped before locking and, in
> + * that case, it's verified that the item actually remains on the LRU list after
> + * the lock, and that the buffer object didn't switch resource in between.
> + *
> + * With a locked object, the actions indicated by @walk->process_bo are
> + * performed, and after that, the bo is unlocked, the refcount dropped and the
> + * next struct ttm_resource is processed. Here, the walker relies on
> + * TTM's restartable LRU list implementation.
> + *
> + * Typically @walk->process_bo() would return the number of pages evicted,
> + * swapped or shrunken, so that when the total exceeds @target, or when the
> + * LRU list has been walked in full, iteration is terminated. It's also terminated
> + * on error. Note that the definition of @target is done by the caller, it
> + * could have a different meaning than the number of pages.
> + *
> + * Note that the way dma_resv individualization is done, locking needs to be done
> + * either with the LRU lock held (trylocking only) or with a reference on the
> + * object.
> + *
> + * Return: The progress made towards target or negative error code on error.
> + */
> +long ttm_lru_walk_for_evict(struct ttm_lru_walk *walk, struct ttm_device *bdev,
> + struct ttm_resource_manager *man, long target)
> +{
> + struct ttm_resource_cursor cursor;
> + struct ttm_resource *res;
> + long sofar = 0;
s/sofar/evicted?
> + long lret;
> +
> + spin_lock(&bdev->lru_lock);
> + ttm_resource_manager_for_each_res(man, &cursor, res) {
> + struct ttm_buffer_object *bo = res->bo;
> + bool bo_needs_unlock = false;
> + bool bo_locked = false;
> + int mem_type;
> +
> + if (!bo || bo->resource != res)
> + continue;
> +
> + if (ttm_lru_walk_trylock(walk, bo, &bo_needs_unlock))
> + bo_locked = true;
> + else if ((!walk->ticket) || walk->ctx->no_wait_gpu ||
Nit - (!walk->ticket) could just be !walk->ticket.
> + walk->trylock_only)
> + continue;
> +
> + if (!ttm_bo_get_unless_zero(bo)) {
> + ttm_lru_walk_unlock(bo, bo_needs_unlock);
> + continue;
> + }
> +
This kinda goofy pattern too, typically in code a get_unless_zero is
done before trying to lock the object not after. Even odder here, the
could or could not be locked depending on the outcome of
ttm_lru_walk_trylock. This is covering individualization case? Would it
make more sense to move ttm_bo_get_unless_zero before the try lock or is
that to avoid a put on try lock failure + continue?
> + mem_type = res->mem_type;
> + spin_unlock(&bdev->lru_lock);
> +
> + lret = 0;
> + if (!bo_locked && walk->ticket)
As above could you explain the ticket usage a bit more?
Also you shouldn't need to check the ticket here there is !walk->ticket
above which triggers a continue.
> + lret = ttm_lru_walk_ticketlock(walk, bo, &bo_needs_unlock);
> +
> + /*
> + * Note that in between the release of the lru lock and the
> + * ticketlock, the bo may have switched resource,
> + * and also memory type, since the resource may have been
> + * freed and allocated again with a different memory type.
> + * In that case, just skip it.
> + */
> + if (!lret && bo->resource == res && res->mem_type == mem_type)
> + lret = walk->ops->process_bo(walk, bo);
> +
> + ttm_lru_walk_unlock(bo, bo_needs_unlock);
> + ttm_bo_put(bo);
> + if (lret == -EBUSY || lret == -EALREADY)
> + lret = 0;
What is usage of these error codes?
-EALREADY means the resv is locked with the current ticket, right?
Wouldn't we want to call process_bo in this case too?
-EBUSY I need some help figuring out.
> + sofar = (lret < 0) ? lret : sofar + lret;
> + if (sofar < 0 || sofar >= target)
> + goto out;
> +
Here we have dropped the BO unlock. What prevents the BO from being
moved back to the resource we just evicted it from resulting in sofar
not being accurate?
Matt
> + cond_resched();
> + spin_lock(&bdev->lru_lock);
> + }
> + spin_unlock(&bdev->lru_lock);
> +out:
> + ttm_resource_cursor_fini(&cursor);
> + return sofar;
> +}
> diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h
> index 6ccf96c91f3a..8b032298d66e 100644
> --- a/include/drm/ttm/ttm_bo.h
> +++ b/include/drm/ttm/ttm_bo.h
> @@ -190,6 +190,38 @@ struct ttm_operation_ctx {
> uint64_t bytes_moved;
> };
>
> +struct ttm_lru_walk;
> +
> +/** struct ttm_lru_walk_ops - Operations for a LRU walk. */
> +struct ttm_lru_walk_ops {
> + /**
> + * process_bo - Process this bo.
> + * @walk: struct ttm_lru_walk describing the walk.
> + * @bo: A locked and referenced buffer object.
> + *
> + * Return: Negative error code on error, Number of processed pages on
> + * success. 0 also indicates success.
> + */
> + long (*process_bo)(struct ttm_lru_walk *walk, struct ttm_buffer_object *bo);
> +};
> +
> +/**
> + * struct ttm_lru_walk - Structure describing a LRU walk.
> + */
> +struct ttm_lru_walk {
> + /** @ops: Pointer to the ops structure. */
> + const struct ttm_lru_walk_ops *ops;
> + /** @ctx: Pointer to the struct ttm_operation_ctx. */
> + struct ttm_operation_ctx *ctx;
> + /** @ticket: The struct ww_acquire_ctx if any. */
> + struct ww_acquire_ctx *ticket;
> + /** @tryock_only: Only use trylock for locking. */
> + bool trylock_only;
> +};
> +
> +long ttm_lru_walk_for_evict(struct ttm_lru_walk *walk, struct ttm_device *bdev,
> + struct ttm_resource_manager *man, long target);
> +
> /**
> * ttm_bo_get - reference a struct ttm_buffer_object
> *
> --
> 2.44.0
>
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v5 04/12] drm/ttm, drm/amdgpu, drm/xe: Consider hitch moves within bulk sublist moves
2024-06-18 7:18 ` [PATCH v5 04/12] drm/ttm, drm/amdgpu, drm/xe: Consider hitch moves within bulk sublist moves Thomas Hellström
@ 2024-06-19 3:37 ` Matthew Brost
2024-06-19 8:24 ` Thomas Hellström
0 siblings, 1 reply; 36+ messages in thread
From: Matthew Brost @ 2024-06-19 3:37 UTC (permalink / raw)
To: Thomas Hellström
Cc: intel-xe, Christian König, Somalapuram Amaranath, dri-devel
On Tue, Jun 18, 2024 at 09:18:12AM +0200, Thomas Hellström wrote:
Ugh, replying to correct version again...
> To address the problem with hitches moving when bulk move
> sublists are lru-bumped, register the list cursors with the
> ttm_lru_bulk_move structure when traversing its list, and
> when lru-bumping the list, move the cursor hitch to the tail.
- So the hitch moves to the tail (last) which points to the next item in
the LRU list
- Then bulk is moved which is from first -> last to the end of the LRU
list
- Now the hitch remains in the correct position in the list (i.e. it
didn't move with the bulk)
Did I get that right?
> This also means it's mandatory for drivers to call
> ttm_lru_bulk_move_init() and ttm_lru_bulk_move_fini() when
> initializing and finalizing the bulk move structure, so add
> those calls to the amdgpu- and xe driver.
>
> Compared to v1 this is slightly more code but less fragile
> and hopefully easier to understand.
>
> Changes in previous series:
> - Completely rework the functionality
> - Avoid a NULL pointer dereference assigning manager->mem_type
> - Remove some leftover code causing build problems
> v2:
> - For hitch bulk tail moves, store the mem_type in the cursor
> instead of with the manager.
> v3:
> - Remove leftover mem_type member from change in v2.
>
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> Cc: <dri-devel@lists.freedesktop.org>
> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++
> drivers/gpu/drm/ttm/ttm_resource.c | 89 ++++++++++++++++++++++++++
> drivers/gpu/drm/xe/xe_vm.c | 4 ++
> include/drm/ttm/ttm_resource.h | 56 ++++++++++------
> 4 files changed, 132 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 3abfa66d72a2..97743993d711 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -2420,6 +2420,8 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm,
> if (r)
> return r;
>
> + ttm_lru_bulk_move_init(&vm->lru_bulk_move);
> +
> vm->is_compute_context = false;
>
> vm->use_cpu_for_update = !!(adev->vm_manager.vm_update_mode &
> @@ -2484,6 +2486,7 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm,
> error_free_delayed:
> dma_fence_put(vm->last_tlb_flush);
> dma_fence_put(vm->last_unlocked);
> + ttm_lru_bulk_move_fini(&adev->mman.bdev, &vm->lru_bulk_move);
> amdgpu_vm_fini_entities(vm);
>
> return r;
> @@ -2640,6 +2643,7 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm)
> }
> }
>
> + ttm_lru_bulk_move_fini(&adev->mman.bdev, &vm->lru_bulk_move);
> }
>
> /**
> diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c
> index 9c8b6499edfb..a03090683e79 100644
> --- a/drivers/gpu/drm/ttm/ttm_resource.c
> +++ b/drivers/gpu/drm/ttm/ttm_resource.c
> @@ -33,6 +33,49 @@
>
> #include <drm/drm_util.h>
>
> +/* Detach the cursor from the bulk move list*/
> +static void
> +ttm_resource_cursor_clear_bulk(struct ttm_resource_cursor *cursor)
> +{
A lockdep annotation wouldn't hurt here.
> + cursor->bulk = NULL;
> + list_del_init(&cursor->bulk_link);
> +}
> +
> +/* Move the cursor to the end of the bulk move list it's in */
> +static void ttm_resource_cursor_move_bulk_tail(struct ttm_lru_bulk_move *bulk,
> + struct ttm_resource_cursor *cursor)
> +{
> + struct ttm_lru_bulk_move_pos *pos;
> +
A lockdep annotation wouldn't hurt here too.
> + if (WARN_ON_ONCE(bulk != cursor->bulk)) {
> + list_del_init(&cursor->bulk_link);
> + return;
> + }
> +
> + pos = &bulk->pos[cursor->mem_type][cursor->priority];
> + if (pos)
'if (pos->last)'?
As 'if (pos)' is going to always be true given you are using the address
of operator (&) on an instantiated struct ttm_lru_bulk_move_pos.
> + list_move(&cursor->hitch.link, &pos->last->lru.link);
This should be list_move_tail, right? So last->next == hitch.
As the code is last->prev == hitch which means the hitch would be
included in the bulk move, right?
> + ttm_resource_cursor_clear_bulk(cursor);
> +}
> +
> +/* Move all cursors attached to a bulk move to its end */
> +static void ttm_bulk_move_adjust_cursors(struct ttm_lru_bulk_move *bulk)
> +{
> + struct ttm_resource_cursor *cursor, *next;
> +
> + list_for_each_entry_safe(cursor, next, &bulk->cursor_list, bulk_link)
> + ttm_resource_cursor_move_bulk_tail(bulk, cursor);
> +}
> +
> +/* Remove a cursor from an empty bulk move list */
> +static void ttm_bulk_move_drop_cursors(struct ttm_lru_bulk_move *bulk)
> +{
> + struct ttm_resource_cursor *cursor, *next;
> +
> + list_for_each_entry_safe(cursor, next, &bulk->cursor_list, bulk_link)
> + ttm_resource_cursor_clear_bulk(cursor);
> +}
> +
> /**
> * ttm_resource_cursor_fini_locked() - Finalize the LRU list cursor usage
> * @cursor: The struct ttm_resource_cursor to finalize.
> @@ -45,6 +88,7 @@ void ttm_resource_cursor_fini_locked(struct ttm_resource_cursor *cursor)
> {
> lockdep_assert_held(&cursor->man->bdev->lru_lock);
> list_del_init(&cursor->hitch.link);
> + ttm_resource_cursor_clear_bulk(cursor);
> }
>
> /**
> @@ -73,9 +117,27 @@ void ttm_resource_cursor_fini(struct ttm_resource_cursor *cursor)
> void ttm_lru_bulk_move_init(struct ttm_lru_bulk_move *bulk)
> {
> memset(bulk, 0, sizeof(*bulk));
> + INIT_LIST_HEAD(&bulk->cursor_list);
> }
> EXPORT_SYMBOL(ttm_lru_bulk_move_init);
>
> +/**
> + * ttm_lru_bulk_move_fini - finalize a bulk move structure
> + * @bdev: The struct ttm_device
> + * @bulk: the structure to finalize
> + *
> + * Sanity checks that bulk moves don't have any
> + * resources left and hence no cursors attached.
> + */
> +void ttm_lru_bulk_move_fini(struct ttm_device *bdev,
> + struct ttm_lru_bulk_move *bulk)
> +{
> + spin_lock(&bdev->lru_lock);
> + ttm_bulk_move_drop_cursors(bulk);
> + spin_unlock(&bdev->lru_lock);
> +}
> +EXPORT_SYMBOL(ttm_lru_bulk_move_fini);
> +
> /**
> * ttm_lru_bulk_move_tail - bulk move range of resources to the LRU tail.
> *
> @@ -88,6 +150,7 @@ void ttm_lru_bulk_move_tail(struct ttm_lru_bulk_move *bulk)
> {
> unsigned i, j;
>
> + ttm_bulk_move_adjust_cursors(bulk);
> for (i = 0; i < TTM_NUM_MEM_TYPES; ++i) {
> for (j = 0; j < TTM_MAX_BO_PRIORITY; ++j) {
> struct ttm_lru_bulk_move_pos *pos = &bulk->pos[i][j];
> @@ -515,6 +578,29 @@ void ttm_resource_manager_debug(struct ttm_resource_manager *man,
> }
> EXPORT_SYMBOL(ttm_resource_manager_debug);
>
> +static void
> +ttm_resource_cursor_check_bulk(struct ttm_resource_cursor *cursor,
> + struct ttm_lru_item *next_lru)
> +{
> + struct ttm_resource *next = ttm_lru_item_to_res(next_lru);
> + struct ttm_lru_bulk_move *bulk = NULL;
> + struct ttm_buffer_object *bo = next->bo;
> +
> + lockdep_assert_held(&cursor->man->bdev->lru_lock);
> + if (bo && bo->resource == next)
> + bulk = bo->bulk_move;
Can you explain what the above if statement is doing, struggling a bit
here. Is this a weird case where the LRU item (struct ttm_resource) is
fully (1st condition) or partially (2nd condition) detached from a BO?
> +
> + if (cursor->bulk != bulk) {
> + if (bulk) {
> + list_move_tail(&cursor->bulk_link, &bulk->cursor_list);
> + cursor->mem_type = next->mem_type;
> + } else {
> + list_del_init(&cursor->bulk_link);
> + }
> + cursor->bulk = bulk;
> + }
> +}
> +
> /**
> * ttm_resource_manager_first() - Start iterating over the resources
> * of a resource manager
> @@ -535,6 +621,7 @@ ttm_resource_manager_first(struct ttm_resource_manager *man,
> cursor->priority = 0;
> cursor->man = man;
> ttm_lru_item_init(&cursor->hitch, TTM_LRU_HITCH);
> + INIT_LIST_HEAD(&cursor->bulk_link);
> list_add(&cursor->hitch.link, &man->lru[cursor->priority]);
>
> return ttm_resource_manager_next(cursor);
> @@ -559,6 +646,7 @@ ttm_resource_manager_next(struct ttm_resource_cursor *cursor)
> lru = &cursor->hitch;
> list_for_each_entry_continue(lru, &man->lru[cursor->priority], link) {
> if (ttm_lru_item_is_res(lru)) {
> + ttm_resource_cursor_check_bulk(cursor, lru);
> list_move(&cursor->hitch.link, &lru->link);
Sorry noticing this here from a different patch. Shouldn't this be
list_move_tail so if the LRU can't be evicted we don't pick it again?
Matt
> return ttm_lru_item_to_res(lru);
> }
> @@ -568,6 +656,7 @@ ttm_resource_manager_next(struct ttm_resource_cursor *cursor)
> break;
>
> list_move(&cursor->hitch.link, &man->lru[cursor->priority]);
> + ttm_resource_cursor_clear_bulk(cursor);
> }
>
> ttm_resource_cursor_fini_locked(cursor);
> diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
> index 61d4d95a5377..226da3c74f9c 100644
> --- a/drivers/gpu/drm/xe/xe_vm.c
> +++ b/drivers/gpu/drm/xe/xe_vm.c
> @@ -1339,6 +1339,8 @@ struct xe_vm *xe_vm_create(struct xe_device *xe, u32 flags)
>
> INIT_WORK(&vm->destroy_work, vm_destroy_work_func);
>
> + ttm_lru_bulk_move_init(&vm->lru_bulk_move);
> +
> INIT_LIST_HEAD(&vm->preempt.exec_queues);
> vm->preempt.min_run_period_ms = 10; /* FIXME: Wire up to uAPI */
>
> @@ -1462,6 +1464,7 @@ struct xe_vm *xe_vm_create(struct xe_device *xe, u32 flags)
> mutex_destroy(&vm->snap_mutex);
> for_each_tile(tile, xe, id)
> xe_range_fence_tree_fini(&vm->rftree[id]);
> + ttm_lru_bulk_move_fini(&xe->ttm, &vm->lru_bulk_move);
> kfree(vm);
> if (flags & XE_VM_FLAG_LR_MODE)
> xe_pm_runtime_put(xe);
> @@ -1605,6 +1608,7 @@ static void vm_destroy_work_func(struct work_struct *w)
> XE_WARN_ON(vm->pt_root[id]);
>
> trace_xe_vm_free(vm);
> + ttm_lru_bulk_move_fini(&xe->ttm, &vm->lru_bulk_move);
> kfree(vm);
> }
>
> diff --git a/include/drm/ttm/ttm_resource.h b/include/drm/ttm/ttm_resource.h
> index 8fac781f641e..571abb4861a6 100644
> --- a/include/drm/ttm/ttm_resource.h
> +++ b/include/drm/ttm/ttm_resource.h
> @@ -269,26 +269,6 @@ ttm_lru_item_to_res(struct ttm_lru_item *item)
> return container_of(item, struct ttm_resource, lru);
> }
>
> -/**
> - * struct ttm_resource_cursor
> - *
> - * @man: The resource manager currently being iterated over.
> - * @hitch: A hitch list node inserted before the next resource
> - * to iterate over.
> - * @priority: the current priority
> - *
> - * Cursor to iterate over the resources in a manager.
> - */
> -struct ttm_resource_cursor {
> - struct ttm_resource_manager *man;
> - struct ttm_lru_item hitch;
> - unsigned int priority;
> -};
> -
> -void ttm_resource_cursor_fini_locked(struct ttm_resource_cursor *cursor);
> -
> -void ttm_resource_cursor_fini(struct ttm_resource_cursor *cursor);
> -
> /**
> * struct ttm_lru_bulk_move_pos
> *
> @@ -304,8 +284,9 @@ struct ttm_lru_bulk_move_pos {
>
> /**
> * struct ttm_lru_bulk_move
> - *
> * @pos: first/last lru entry for resources in the each domain/priority
> + * @cursor_list: The list of cursors currently traversing any of
> + * the sublists of @pos. Protected by the ttm device's lru_lock.
> *
> * Container for the current bulk move state. Should be used with
> * ttm_lru_bulk_move_init() and ttm_bo_set_bulk_move().
> @@ -315,8 +296,39 @@ struct ttm_lru_bulk_move_pos {
> */
> struct ttm_lru_bulk_move {
> struct ttm_lru_bulk_move_pos pos[TTM_NUM_MEM_TYPES][TTM_MAX_BO_PRIORITY];
> + struct list_head cursor_list;
> };
>
> +/**
> + * struct ttm_resource_cursor
> + * @man: The resource manager currently being iterated over
> + * @hitch: A hitch list node inserted before the next resource
> + * to iterate over.
> + * @bulk_link: A list link for the list of cursors traversing the
> + * bulk sublist of @bulk. Protected by the ttm device's lru_lock.
> + * @bulk: Pointer to struct ttm_lru_bulk_move whose subrange @hitch is
> + * inserted to. NULL if none. Never dereference this pointer since
> + * the struct ttm_lru_bulk_move object pointed to might have been
> + * freed. The pointer is only for comparison.
> + * @mem_type: The memory type of the LRU list being traversed.
> + * This field is valid iff @bulk != NULL.
> + * @priority: the current priority
> + *
> + * Cursor to iterate over the resources in a manager.
> + */
> +struct ttm_resource_cursor {
> + struct ttm_resource_manager *man;
> + struct ttm_lru_item hitch;
> + struct list_head bulk_link;
> + struct ttm_lru_bulk_move *bulk;
> + unsigned int mem_type;
> + unsigned int priority;
> +};
> +
> +void ttm_resource_cursor_fini_locked(struct ttm_resource_cursor *cursor);
> +
> +void ttm_resource_cursor_fini(struct ttm_resource_cursor *cursor);
> +
> /**
> * struct ttm_kmap_iter_iomap - Specialization for a struct io_mapping +
> * struct sg_table backed struct ttm_resource.
> @@ -405,6 +417,8 @@ ttm_resource_manager_cleanup(struct ttm_resource_manager *man)
>
> void ttm_lru_bulk_move_init(struct ttm_lru_bulk_move *bulk);
> void ttm_lru_bulk_move_tail(struct ttm_lru_bulk_move *bulk);
> +void ttm_lru_bulk_move_fini(struct ttm_device *bdev,
> + struct ttm_lru_bulk_move *bulk);
>
> void ttm_resource_add_bulk_move(struct ttm_resource *res,
> struct ttm_buffer_object *bo);
> --
> 2.44.0
>
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v5 06/12] drm/ttm: Use the LRU walker helper for swapping
2024-06-18 7:18 ` [PATCH v5 06/12] drm/ttm: Use the LRU walker helper for swapping Thomas Hellström
@ 2024-06-19 4:23 ` Matthew Brost
2024-06-19 8:36 ` Thomas Hellström
0 siblings, 1 reply; 36+ messages in thread
From: Matthew Brost @ 2024-06-19 4:23 UTC (permalink / raw)
To: Thomas Hellström
Cc: intel-xe, Christian König, Somalapuram Amaranath, dri-devel
On Tue, Jun 18, 2024 at 09:18:14AM +0200, Thomas Hellström wrote:
> Rework the TTM swapping to use the LRU walker helper.
> This helps fixing up the ttm_bo_swapout() interface
> to be consistent about not requiring any locking.
>
> For now mimic the current behaviour of using trylock
> only. We could be using ticket-locks here but defer
> that until it's deemed necessary. The TTM swapout
> functionality is a bit weird anyway since it
> alternates between memory types without exhausting
> TTM_PL_SYSTEM first.
>
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> Cc: <dri-devel@lists.freedesktop.org>
> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> ---
> drivers/gpu/drm/ttm/ttm_bo.c | 112 +++++++++++++++++++++----------
> drivers/gpu/drm/ttm/ttm_device.c | 30 ++-------
> include/drm/ttm/ttm_bo.h | 5 +-
> 3 files changed, 83 insertions(+), 64 deletions(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
> index 43eda720657f..63a91b77f7da 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> @@ -1118,11 +1118,23 @@ int ttm_bo_wait_ctx(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx)
> }
> EXPORT_SYMBOL(ttm_bo_wait_ctx);
>
> -int ttm_bo_swapout(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx,
> - gfp_t gfp_flags)
> +/**
> + * struct ttm_bo_swapout_walk - Parameters for the swapout walk
> + */
> +struct ttm_bo_swapout_walk {
> + /** @walk: The walk base parameters. */
> + struct ttm_lru_walk walk;
> + /** @gfp_flags: The gfp flags to use for ttm_tt_swapout() */
> + gfp_t gfp_flags;
> +};
> +
> +static long
> +ttm_bo_swapout_cb(struct ttm_lru_walk *walk, struct ttm_buffer_object *bo)
> {
> - struct ttm_place place;
> - bool locked;
> + struct ttm_place place = {.mem_type = bo->resource->mem_type};
> + struct ttm_bo_swapout_walk *swapout_walk =
> + container_of(walk, typeof(*swapout_walk), walk);
> + struct ttm_operation_ctx *ctx = walk->ctx;
> long ret;
>
> /*
> @@ -1131,28 +1143,29 @@ int ttm_bo_swapout(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx,
> * The driver may use the fact that we're moving from SYSTEM
> * as an indication that we're about to swap out.
> */
> - memset(&place, 0, sizeof(place));
> - place.mem_type = bo->resource->mem_type;
> - if (!ttm_bo_evict_swapout_allowable(bo, ctx, &place, &locked, NULL))
> - return -EBUSY;
> + if (!bo->bdev->funcs->eviction_valuable(bo, &place)) {
> + ret = -EBUSY;
> + goto out;
> + }
>
> if (!bo->ttm || !ttm_tt_is_populated(bo->ttm) ||
> bo->ttm->page_flags & TTM_TT_FLAG_EXTERNAL ||
> - bo->ttm->page_flags & TTM_TT_FLAG_SWAPPED ||
> - !ttm_bo_get_unless_zero(bo)) {
> - if (locked)
> - dma_resv_unlock(bo->base.resv);
> - return -EBUSY;
> + bo->ttm->page_flags & TTM_TT_FLAG_SWAPPED) {
> + ret = -EBUSY;
I think answers my -EBUSY question from here [1]. In these cases we
continue LRU walk as eviction of the BO is not valuable.
[1] https://patchwork.freedesktop.org/patch/599606/?series=131815&rev=5#comment_1091419
> + goto out;
> }
>
> if (bo->deleted) {
> - ret = ttm_bo_cleanup_refs(bo, false, false, locked);
> - ttm_bo_put(bo);
> - return ret == -EBUSY ? -ENOSPC : ret;
> - }
> + pgoff_t num_pages = bo->ttm->num_pages;
>
> - /* TODO: Cleanup the locking */
> - spin_unlock(&bo->bdev->lru_lock);
> + ret = ttm_bo_wait_ctx(bo, ctx);
> + if (ret)
> + goto out;
> +
> + ttm_bo_cleanup_memtype_use(bo);
> + ret = num_pages;
> + goto out;
> + }
>
> /*
> * Move to system cached
> @@ -1164,12 +1177,13 @@ int ttm_bo_swapout(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx,
> memset(&hop, 0, sizeof(hop));
> place.mem_type = TTM_PL_SYSTEM;
> ret = ttm_resource_alloc(bo, &place, &evict_mem);
> - if (unlikely(ret))
> + if (ret)
> goto out;
>
> ret = ttm_bo_handle_move_mem(bo, evict_mem, true, ctx, &hop);
> - if (unlikely(ret != 0)) {
> - WARN(ret == -EMULTIHOP, "Unexpected multihop in swaput - likely driver bug.\n");
> + if (ret) {
> + WARN(ret == -EMULTIHOP,
> + "Unexpected multihop in swapout - likely driver bug.\n");
> ttm_resource_free(bo, &evict_mem);
> goto out;
> }
> @@ -1179,30 +1193,54 @@ int ttm_bo_swapout(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx,
> * Make sure BO is idle.
> */
> ret = ttm_bo_wait_ctx(bo, ctx);
> - if (unlikely(ret != 0))
> + if (ret)
> goto out;
>
> ttm_bo_unmap_virtual(bo);
> -
> - /*
> - * Swap out. Buffer will be swapped in again as soon as
> - * anyone tries to access a ttm page.
> - */
> if (bo->bdev->funcs->swap_notify)
> bo->bdev->funcs->swap_notify(bo);
>
> if (ttm_tt_is_populated(bo->ttm))
> - ret = ttm_tt_swapout(bo->bdev, bo->ttm, gfp_flags);
> + ret = ttm_tt_swapout(bo->bdev, bo->ttm, swapout_walk->gfp_flags);
> out:
> + /* Consider some error codes fatal. Others may continue the walk. */
> + if (ret == -ENOMEM || ret == -EINTR || ret == -ERESTARTSYS ||
> + ret == -EAGAIN || ret > 0)
> + return ret;
Would it be more robust / clear to do the inverse of this? i.e. Return 0
on non-fatal error codes?
>
> - /*
> - * Unreserve without putting on LRU to avoid swapping out an
> - * already swapped buffer.
> - */
> - if (locked)
> - dma_resv_unlock(bo->base.resv);
> - ttm_bo_put(bo);
> - return ret == -EBUSY ? -ENOSPC : ret;
> + return 0;
> +}
> +
> +const struct ttm_lru_walk_ops ttm_swap_ops = {
> + .process_bo = ttm_bo_swapout_cb,
> +};
> +
> +/**
> + * ttm_bo_swapout() - Swap out buffer objects on the LRU list to shmem.
> + * @bdev: The ttm device.
> + * @ctx: The ttm_operation_ctx governing the swapout operation.
> + * @man: The resource manager whose resources / buffer objects are
> + * goint to be swapped out.
> + * @gfp_flags: The gfp flags used for shmem page allocations.
> + * @target: The desired number of pages to swap out.
> + *
> + * Return: The number of pages actually swapped out, or negative error code
> + * on error.
> + */
> +long ttm_bo_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx,
> + struct ttm_resource_manager *man, gfp_t gfp_flags,
> + pgoff_t target)
> +{
> + struct ttm_bo_swapout_walk swapout_walk = {
> + .walk = {
> + .ops = &ttm_swap_ops,
> + .ctx = ctx,
> + .trylock_only = true,
> + },
> + .gfp_flags = gfp_flags,
> + };
> +
> + return ttm_lru_walk_for_evict(&swapout_walk.walk, bdev, man, target);
> }
>
> void ttm_bo_tt_destroy(struct ttm_buffer_object *bo)
> diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c
> index f9e9b1ec8c8a..ee575d8a54c0 100644
> --- a/drivers/gpu/drm/ttm/ttm_device.c
> +++ b/drivers/gpu/drm/ttm/ttm_device.c
> @@ -148,40 +148,20 @@ int ttm_global_swapout(struct ttm_operation_ctx *ctx, gfp_t gfp_flags)
> int ttm_device_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx,
> gfp_t gfp_flags)
> {
> - struct ttm_resource_cursor cursor;
> struct ttm_resource_manager *man;
> - struct ttm_resource *res;
> unsigned i;
> - int ret;
> + long lret;
>
> - spin_lock(&bdev->lru_lock);
> for (i = TTM_PL_SYSTEM; i < TTM_NUM_MEM_TYPES; ++i) {
> man = ttm_manager_type(bdev, i);
> if (!man || !man->use_tt)
> continue;
>
> - ttm_resource_manager_for_each_res(man, &cursor, res) {
> - struct ttm_buffer_object *bo = res->bo;
> - uint32_t num_pages;
> -
> - if (!bo || bo->resource != res)
> - continue;
> -
> - num_pages = PFN_UP(bo->base.size);
> - ret = ttm_bo_swapout(bo, ctx, gfp_flags);
> - /* ttm_bo_swapout has dropped the lru_lock */
> - if (!ret) {
> - ttm_resource_cursor_fini(&cursor);
> - return num_pages;
> - }
> - if (ret != -EBUSY) {
> - ttm_resource_cursor_fini(&cursor);
> - return ret;
> - }
> - }
> + lret = ttm_bo_swapout(bdev, ctx, man, gfp_flags, 1);
With a target of 1 this will evict exactly 1 various sized BO which
seems to match the current behavior.
Just curious what is the usage of this function which evicts 1 BO from
the device?
Matt
> + /* Can be both positive (num_pages) and negative (error) */
> + if (lret)
> + return lret;
> }
> - ttm_resource_cursor_fini_locked(&cursor);
> - spin_unlock(&bdev->lru_lock);
> return 0;
> }
> EXPORT_SYMBOL(ttm_device_swapout);
> diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h
> index 8b032298d66e..472a55b69afb 100644
> --- a/include/drm/ttm/ttm_bo.h
> +++ b/include/drm/ttm/ttm_bo.h
> @@ -410,8 +410,9 @@ void ttm_bo_kunmap(struct ttm_bo_kmap_obj *map);
> int ttm_bo_vmap(struct ttm_buffer_object *bo, struct iosys_map *map);
> void ttm_bo_vunmap(struct ttm_buffer_object *bo, struct iosys_map *map);
> int ttm_bo_mmap_obj(struct vm_area_struct *vma, struct ttm_buffer_object *bo);
> -int ttm_bo_swapout(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx,
> - gfp_t gfp_flags);
> +long ttm_bo_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx,
> + struct ttm_resource_manager *man, gfp_t gfp_flags,
> + pgoff_t target);
> void ttm_bo_pin(struct ttm_buffer_object *bo);
> void ttm_bo_unpin(struct ttm_buffer_object *bo);
> int ttm_mem_evict_first(struct ttm_device *bdev,
> --
> 2.44.0
>
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v5 05/12] drm/ttm: Provide a generic LRU walker helper
2024-06-18 22:11 ` Matthew Brost
@ 2024-06-19 7:31 ` Thomas Hellström
2024-06-19 15:09 ` Matthew Brost
0 siblings, 1 reply; 36+ messages in thread
From: Thomas Hellström @ 2024-06-19 7:31 UTC (permalink / raw)
To: Matthew Brost
Cc: intel-xe, Christian König, Somalapuram Amaranath, dri-devel
Hi, Matthew.
Thanks for reviewing.
On Tue, 2024-06-18 at 22:11 +0000, Matthew Brost wrote:
> On Tue, Jun 18, 2024 at 09:18:13AM +0200, Thomas Hellström wrote:
>
> Replying to correct version...
>
> > Provide a generic LRU walker in TTM, in the spirit of
> > drm_gem_lru_scan()
> > but building on the restartable TTM LRU functionality.
> >
> > The LRU walker optionally supports locking objects as part of
> > a ww mutex locking transaction, to mimic to some extent the
> > current functionality in ttm. However any -EDEADLK return
> > is converted to -ENOMEM, so that the driver will need to back
> > off and possibly retry without being able to keep the
> > ticket.
> >
>
> Wouldn't the backoff be unlock everything but keep the ticket?
We can't do that (yet) since we don't have the drm_exec or similar
functionality. The missing part is that if keep the ticket, it's in
contended state which means we need to slow-lock the contending lock as
the first lock. And the caller doesn't know which lock is the
contending one....
That is all addressed in the RFC part of the series that I left out for
now. This is only trying to mimic current functionality.
>
> > v3:
> > - Move the helper to core ttm.
> > - Remove the drm_exec usage from it for now, it will be
> > reintroduced later in the series.
> > v4:
> > - Handle the -EALREADY case if ticketlocking.
> >
> > Cc: Christian König <christian.koenig@amd.com>
> > Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
> > Cc: Matthew Brost <matthew.brost@intel.com>
> > Cc: <dri-devel@lists.freedesktop.org>
> > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> > ---
> > drivers/gpu/drm/ttm/ttm_bo_util.c | 145
> > ++++++++++++++++++++++++++++++
> > include/drm/ttm/ttm_bo.h | 32 +++++++
> > 2 files changed, 177 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c
> > b/drivers/gpu/drm/ttm/ttm_bo_util.c
> > index 0b3f4267130c..45fcaf6f8644 100644
> > --- a/drivers/gpu/drm/ttm/ttm_bo_util.c
> > +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
> > @@ -768,3 +768,148 @@ int ttm_bo_pipeline_gutting(struct
> > ttm_buffer_object *bo)
> > ttm_tt_destroy(bo->bdev, ttm);
> > return ret;
> > }
> > +
> > +static bool ttm_lru_walk_trylock(struct ttm_lru_walk *walk,
> > + struct ttm_buffer_object *bo,
> > + bool *needs_unlock)
> > +{
> > + struct ttm_operation_ctx *ctx = walk->ctx;
> > +
> > + *needs_unlock = false;
> > +
> > + if (dma_resv_trylock(bo->base.resv)) {
> > + *needs_unlock = true;
> > + return true;
> > + }
> > +
> > + if (bo->base.resv == ctx->resv && ctx->allow_res_evict) {
> > + dma_resv_assert_held(bo->base.resv);
> > + return true;
> > + }
> > +i
>
> Any reason this is done after the try lock? Just kinda goofy as if
> this
> statement is true the dma_resv_trylock will always fail.
It should work either way. I guess I had viewed it as "trylock first,
if that fails, attempt any exception". I guess if we want to optimize
performance for shared lock implementations, moving it first might
avoid the atomic trylock operation, but I wouldn't expect a noticeable
difference.
>
> > + return false;
> > +}
> > +
> > +static int ttm_lru_walk_ticketlock(struct ttm_lru_walk *walk,
> > + struct ttm_buffer_object *bo,
> > + bool *needs_unlock)
> > +{
> > + struct dma_resv *resv = bo->base.resv;
> > + int ret;
> > +
>
> I suppose we don't have asserts here like in Xe but if we did,
> assert(walk->ticket)?
I agree. I think we'd really want a TTM assert or warning that could be
compiled away. In any case, I only expect a single caller of this
function.
>
> > + if (walk->ctx->interruptible)
> > + ret = dma_resv_lock_interruptible(resv, walk-
> > >ticket);
> > + else
> > + ret = dma_resv_lock(resv, walk->ticket);
> > +
> > + if (!ret) {
> > + *needs_unlock = true;
> > + /* Only a single ticketlock per loop. */
> > + walk->ticket = NULL;
>
> Can you explain this a bit more? I see that once the walk->ticket is
> set
> to NULL this function will not be called again (i.e. only try locking
> will be used). I want to understand the reasoning for this.
>
> It might be helpful for a more lengthly explaination in the comments
> of
> the code too.
I can add a more thorough explanation, Again, this is trying to mimic
the current code, that does a walk of trylocking, then a single ticket
lock more as a sort of "wait a while to be able to make progress" and
then resorts to trylock again.
The real reason to avoid multiple ticketlocks here is that each have a
chance of failing with -EDEADLK, (in particular with the -EDEADLK
injection enabled) which would translate to an -ENOMEM in the caller.
>
> > + } else if (ret == -EDEADLK) {
> > + /* Caller needs to exit the ww transaction. */
> > + ret = -ENOSPC;
>
> The commit message says -ENOMEM.
The -ENOSPC is converted to -ENOMEM for the driver in
ttm_bo_validate(). I could explain a bit more in the commit message.
>
> > + }
> > +
> > + return ret;
> > +}
> > +
> > +static void ttm_lru_walk_unlock(struct ttm_buffer_object *bo, bool
> > locked)
> > +{
> > + if (locked)
> > + dma_resv_unlock(bo->base.resv);
> > +}
> > +
> > +/**
> > + * ttm_lru_walk_for_evict() - Perform a LRU list walk, with
> > actions taken on
> > + * valid items.
> > + * @walk: describe the walks and actions taken
> > + * @bdev: The TTM device.
> > + * @man: The struct ttm_resource manager whose LRU lists we're
> > walking.
> > + * @target: The end condition for the walk.
> > + *
> > + * The LRU lists of @man are walk, and for each struct
> > ttm_resource encountered,
> > + * the corresponding ttm_buffer_object is locked and taken a
> > reference on, and
> > + * the LRU lock is dropped. the LRU lock may be dropped before
> > locking and, in
> > + * that case, it's verified that the item actually remains on the
> > LRU list after
> > + * the lock, and that the buffer object didn't switch resource in
> > between.
> > + *
> > + * With a locked object, the actions indicated by @walk-
> > >process_bo are
> > + * performed, and after that, the bo is unlocked, the refcount
> > dropped and the
> > + * next struct ttm_resource is processed. Here, the walker relies
> > on
> > + * TTM's restartable LRU list implementation.
> > + *
> > + * Typically @walk->process_bo() would return the number of pages
> > evicted,
> > + * swapped or shrunken, so that when the total exceeds @target, or
> > when the
> > + * LRU list has been walked in full, iteration is terminated. It's
> > also terminated
> > + * on error. Note that the definition of @target is done by the
> > caller, it
> > + * could have a different meaning than the number of pages.
> > + *
> > + * Note that the way dma_resv individualization is done, locking
> > needs to be done
> > + * either with the LRU lock held (trylocking only) or with a
> > reference on the
> > + * object.
> > + *
> > + * Return: The progress made towards target or negative error code
> > on error.
> > + */
> > +long ttm_lru_walk_for_evict(struct ttm_lru_walk *walk, struct
> > ttm_device *bdev,
> > + struct ttm_resource_manager *man, long
> > target)
> > +{
> > + struct ttm_resource_cursor cursor;
> > + struct ttm_resource *res;
> > + long sofar = 0;
>
> s/sofar/evicted?
That's not always the case. When used for eviction it is actually 0 if
the new allocation failed, 1 on success. It should be interpreted as
"progress towards target", so perhaps progress?
>
> > + long lret;
> > +
> > + spin_lock(&bdev->lru_lock);
> > + ttm_resource_manager_for_each_res(man, &cursor, res) {
> > + struct ttm_buffer_object *bo = res->bo;
> > + bool bo_needs_unlock = false;
> > + bool bo_locked = false;
> > + int mem_type;
> > +
> > + if (!bo || bo->resource != res)
> > + continue;
> > +
> > + if (ttm_lru_walk_trylock(walk, bo,
> > &bo_needs_unlock))
> > + bo_locked = true;
> > + else if ((!walk->ticket) || walk->ctx->no_wait_gpu
> > ||
>
> Nit - (!walk->ticket) could just be !walk->ticket.
Will fix.
>
> > + walk->trylock_only)
> > + continue;
> > +
> > + if (!ttm_bo_get_unless_zero(bo)) {
> > + ttm_lru_walk_unlock(bo, bo_needs_unlock);
> > + continue;
> > + }
> > +
>
> This kinda goofy pattern too, typically in code a get_unless_zero is
> done before trying to lock the object not after. Even odder here, the
> could or could not be locked depending on the outcome of
> ttm_lru_walk_trylock. This is covering individualization case? Would
> it
> make more sense to move ttm_bo_get_unless_zero before the try lock or
> is
> that to avoid a put on try lock failure + continue?
I guess this is still a remnant from the old code: ttm_bos can't be put
in atomic context, so we'd had to unlock the lru_lock to put ( which we
still do). However, without the restartable lists that we have with
this series, list traversal would have to be reset.
If we were to change the order of trylock and get_unless_zero now, we
could do that, but that would mean unnecessary refcounting and dropping
the lru_lock in the case of trylock failure.
>
> > + mem_type = res->mem_type;
> > + spin_unlock(&bdev->lru_lock);
> > +
> > + lret = 0;
> > + if (!bo_locked && walk->ticket)
>
> As above could you explain the ticket usage a bit more?
>
> Also you shouldn't need to check the ticket here there is !walk-
> >ticket
> above which triggers a continue.
I hope I explained sufficiently above. Please get back otherwise, I'll
remove the walk->ticket check.
>
> > + lret = ttm_lru_walk_ticketlock(walk, bo,
> > &bo_needs_unlock);
> > +
> > + /*
> > + * Note that in between the release of the lru
> > lock and the
> > + * ticketlock, the bo may have switched resource,
> > + * and also memory type, since the resource may
> > have been
> > + * freed and allocated again with a different
> > memory type.
> > + * In that case, just skip it.
> > + */
> > + if (!lret && bo->resource == res && res->mem_type
> > == mem_type)
> > + lret = walk->ops->process_bo(walk, bo);
> > +
> > + ttm_lru_walk_unlock(bo, bo_needs_unlock);
> > + ttm_bo_put(bo);
> > + if (lret == -EBUSY || lret == -EALREADY)
> > + lret = 0;
>
> What is usage of these error codes?
>
> -EALREADY means the resv is locked with the current ticket, right?
> Wouldn't we want to call process_bo in this case too?
No, then we might evict our own working set. Processing of shared bos
is handled as before with ctx->allow_res_evict.
>
> -EBUSY I need some help figuring out.
-EBUSY is the return of ttm_bo_wait_ctx() in case we're in no-wait-gpu
context. Like direct reclaim. If the bo is then busy, we simply skip to
the next bo. If process_bo() waits for gpu idle using the above
function, this is to catch that error code.
Should probably add that to the process_bo() docs.
>
> > + sofar = (lret < 0) ? lret : sofar + lret;
> > + if (sofar < 0 || sofar >= target)
> > + goto out;
> > +
>
> Here we have dropped the BO unlock. What prevents the BO from being
> moved back to the resource we just evicted it from resulting in sofar
> not being accurate?
For eviction, the byte-count is not used, but rather the success of
allocating the new resource.
For shrinking, any process could allocate what we just shrunk, and even
so shrinking does not always mean that the memory is immediately
available so the byte-count will always be a rough estimate.
A related question is "what prevents anyone else from stealing memory
that we just evicted", and the answer to that is "Nothing... yet". The
exhaustive eviction part handles that with drm_exec keeping the bo
locks of evicted objects until we make progress. Eventually we'd hold
enough locks to block all other competitors.
Unrelated to this patch, me and Christian had a discussion on whether
to unlock those when we made progress in the sense of
a) A validation succeeded,
b) An exec submission succeeded.
/Thomas
>
> Matt
>
> > + cond_resched();
> > + spin_lock(&bdev->lru_lock);
> > + }
> > + spin_unlock(&bdev->lru_lock);
> > +out:
> > + ttm_resource_cursor_fini(&cursor);
> > + return sofar;
> > +}
> > diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h
> > index 6ccf96c91f3a..8b032298d66e 100644
> > --- a/include/drm/ttm/ttm_bo.h
> > +++ b/include/drm/ttm/ttm_bo.h
> > @@ -190,6 +190,38 @@ struct ttm_operation_ctx {
> > uint64_t bytes_moved;
> > };
> >
> > +struct ttm_lru_walk;
> > +
> > +/** struct ttm_lru_walk_ops - Operations for a LRU walk. */
> > +struct ttm_lru_walk_ops {
> > + /**
> > + * process_bo - Process this bo.
> > + * @walk: struct ttm_lru_walk describing the walk.
> > + * @bo: A locked and referenced buffer object.
> > + *
> > + * Return: Negative error code on error, Number of
> > processed pages on
> > + * success. 0 also indicates success.
> > + */
> > + long (*process_bo)(struct ttm_lru_walk *walk, struct
> > ttm_buffer_object *bo);
> > +};
> > +
> > +/**
> > + * struct ttm_lru_walk - Structure describing a LRU walk.
> > + */
> > +struct ttm_lru_walk {
> > + /** @ops: Pointer to the ops structure. */
> > + const struct ttm_lru_walk_ops *ops;
> > + /** @ctx: Pointer to the struct ttm_operation_ctx. */
> > + struct ttm_operation_ctx *ctx;
> > + /** @ticket: The struct ww_acquire_ctx if any. */
> > + struct ww_acquire_ctx *ticket;
> > + /** @tryock_only: Only use trylock for locking. */
> > + bool trylock_only;
> > +};
> > +
> > +long ttm_lru_walk_for_evict(struct ttm_lru_walk *walk, struct
> > ttm_device *bdev,
> > + struct ttm_resource_manager *man, long
> > target);
> > +
> > /**
> > * ttm_bo_get - reference a struct ttm_buffer_object
> > *
> > --
> > 2.44.0
> >
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v5 04/12] drm/ttm, drm/amdgpu, drm/xe: Consider hitch moves within bulk sublist moves
2024-06-19 3:37 ` Matthew Brost
@ 2024-06-19 8:24 ` Thomas Hellström
2024-06-19 14:44 ` Matthew Brost
0 siblings, 1 reply; 36+ messages in thread
From: Thomas Hellström @ 2024-06-19 8:24 UTC (permalink / raw)
To: Matthew Brost
Cc: intel-xe, Christian König, Somalapuram Amaranath, dri-devel
On Wed, 2024-06-19 at 03:37 +0000, Matthew Brost wrote:
> On Tue, Jun 18, 2024 at 09:18:12AM +0200, Thomas Hellström wrote:
>
> Ugh, replying to correct version again...
>
> > To address the problem with hitches moving when bulk move
> > sublists are lru-bumped, register the list cursors with the
> > ttm_lru_bulk_move structure when traversing its list, and
> > when lru-bumping the list, move the cursor hitch to the tail.
>
> - So the hitch moves to the tail (last) which points to the next item
> in
> the LRU list
> - Then bulk is moved which is from first -> last to the end of the
> LRU
> list
> - Now the hitch remains in the correct position in the list (i.e. it
> didn't move with the bulk)
>
> Did I get that right?
Yes, correct.
>
> > This also means it's mandatory for drivers to call
> > ttm_lru_bulk_move_init() and ttm_lru_bulk_move_fini() when
> > initializing and finalizing the bulk move structure, so add
> > those calls to the amdgpu- and xe driver.
> >
> > Compared to v1 this is slightly more code but less fragile
> > and hopefully easier to understand.
> >
> > Changes in previous series:
> > - Completely rework the functionality
> > - Avoid a NULL pointer dereference assigning manager->mem_type
> > - Remove some leftover code causing build problems
> > v2:
> > - For hitch bulk tail moves, store the mem_type in the cursor
> > instead of with the manager.
> > v3:
> > - Remove leftover mem_type member from change in v2.
> >
> > Cc: Christian König <christian.koenig@amd.com>
> > Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
> > Cc: Matthew Brost <matthew.brost@intel.com>
> > Cc: <dri-devel@lists.freedesktop.org>
> > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> > ---
> > drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++
> > drivers/gpu/drm/ttm/ttm_resource.c | 89
> > ++++++++++++++++++++++++++
> > drivers/gpu/drm/xe/xe_vm.c | 4 ++
> > include/drm/ttm/ttm_resource.h | 56 ++++++++++------
> > 4 files changed, 132 insertions(+), 21 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> > index 3abfa66d72a2..97743993d711 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> > @@ -2420,6 +2420,8 @@ int amdgpu_vm_init(struct amdgpu_device
> > *adev, struct amdgpu_vm *vm,
> > if (r)
> > return r;
> >
> > + ttm_lru_bulk_move_init(&vm->lru_bulk_move);
> > +
> > vm->is_compute_context = false;
> >
> > vm->use_cpu_for_update = !!(adev-
> > >vm_manager.vm_update_mode &
> > @@ -2484,6 +2486,7 @@ int amdgpu_vm_init(struct amdgpu_device
> > *adev, struct amdgpu_vm *vm,
> > error_free_delayed:
> > dma_fence_put(vm->last_tlb_flush);
> > dma_fence_put(vm->last_unlocked);
> > + ttm_lru_bulk_move_fini(&adev->mman.bdev, &vm-
> > >lru_bulk_move);
> > amdgpu_vm_fini_entities(vm);
> >
> > return r;
> > @@ -2640,6 +2643,7 @@ void amdgpu_vm_fini(struct amdgpu_device
> > *adev, struct amdgpu_vm *vm)
> > }
> > }
> >
> > + ttm_lru_bulk_move_fini(&adev->mman.bdev, &vm-
> > >lru_bulk_move);
> > }
> >
> > /**
> > diff --git a/drivers/gpu/drm/ttm/ttm_resource.c
> > b/drivers/gpu/drm/ttm/ttm_resource.c
> > index 9c8b6499edfb..a03090683e79 100644
> > --- a/drivers/gpu/drm/ttm/ttm_resource.c
> > +++ b/drivers/gpu/drm/ttm/ttm_resource.c
> > @@ -33,6 +33,49 @@
> >
> > #include <drm/drm_util.h>
> >
> > +/* Detach the cursor from the bulk move list*/
> > +static void
> > +ttm_resource_cursor_clear_bulk(struct ttm_resource_cursor *cursor)
> > +{
>
> A lockdep annotation wouldn't hurt here.
Will add.
>
> > + cursor->bulk = NULL;
> > + list_del_init(&cursor->bulk_link);
> > +}
> > +
> > +/* Move the cursor to the end of the bulk move list it's in */
> > +static void ttm_resource_cursor_move_bulk_tail(struct
> > ttm_lru_bulk_move *bulk,
> > + struct
> > ttm_resource_cursor *cursor)
> > +{
> > + struct ttm_lru_bulk_move_pos *pos;
> > +
>
> A lockdep annotation wouldn't hurt here too.
+1!
>
> > + if (WARN_ON_ONCE(bulk != cursor->bulk)) {
> > + list_del_init(&cursor->bulk_link);
> > + return;
> > + }
> > +
> > + pos = &bulk->pos[cursor->mem_type][cursor->priority];
> > + if (pos)
>
> 'if (pos->last)'?
>
> As 'if (pos)' is going to always be true given you are using the
> address
> of operator (&) on an instantiated struct ttm_lru_bulk_move_pos.
Good catch! I'll fix that up.
>
> > + list_move(&cursor->hitch.link, &pos->last-
> > >lru.link);
>
> This should be list_move_tail, right? So last->next == hitch.
>
> As the code is last->prev == hitch which means the hitch would be
> included in the bulk move, right?
It's the other way around right? list_move(a, b) will insert a as b-
>next, which is what we want.
>
> > + ttm_resource_cursor_clear_bulk(cursor);
> > +}
> > +
> > +/* Move all cursors attached to a bulk move to its end */
> > +static void ttm_bulk_move_adjust_cursors(struct ttm_lru_bulk_move
> > *bulk)
> > +{
> > + struct ttm_resource_cursor *cursor, *next;
> > +
> > + list_for_each_entry_safe(cursor, next, &bulk->cursor_list,
> > bulk_link)
> > + ttm_resource_cursor_move_bulk_tail(bulk, cursor);
> > +}
> > +
> > +/* Remove a cursor from an empty bulk move list */
> > +static void ttm_bulk_move_drop_cursors(struct ttm_lru_bulk_move
> > *bulk)
> > +{
> > + struct ttm_resource_cursor *cursor, *next;
> > +
> > + list_for_each_entry_safe(cursor, next, &bulk->cursor_list,
> > bulk_link)
> > + ttm_resource_cursor_clear_bulk(cursor);
> > +}
> > +
> > /**
> > * ttm_resource_cursor_fini_locked() - Finalize the LRU list
> > cursor usage
> > * @cursor: The struct ttm_resource_cursor to finalize.
> > @@ -45,6 +88,7 @@ void ttm_resource_cursor_fini_locked(struct
> > ttm_resource_cursor *cursor)
> > {
> > lockdep_assert_held(&cursor->man->bdev->lru_lock);
> > list_del_init(&cursor->hitch.link);
> > + ttm_resource_cursor_clear_bulk(cursor);
> > }
> >
> > /**
> > @@ -73,9 +117,27 @@ void ttm_resource_cursor_fini(struct
> > ttm_resource_cursor *cursor)
> > void ttm_lru_bulk_move_init(struct ttm_lru_bulk_move *bulk)
> > {
> > memset(bulk, 0, sizeof(*bulk));
> > + INIT_LIST_HEAD(&bulk->cursor_list);
> > }
> > EXPORT_SYMBOL(ttm_lru_bulk_move_init);
> >
> > +/**
> > + * ttm_lru_bulk_move_fini - finalize a bulk move structure
> > + * @bdev: The struct ttm_device
> > + * @bulk: the structure to finalize
> > + *
> > + * Sanity checks that bulk moves don't have any
> > + * resources left and hence no cursors attached.
> > + */
> > +void ttm_lru_bulk_move_fini(struct ttm_device *bdev,
> > + struct ttm_lru_bulk_move *bulk)
> > +{
> > + spin_lock(&bdev->lru_lock);
> > + ttm_bulk_move_drop_cursors(bulk);
> > + spin_unlock(&bdev->lru_lock);
> > +}
> > +EXPORT_SYMBOL(ttm_lru_bulk_move_fini);
> > +
> > /**
> > * ttm_lru_bulk_move_tail - bulk move range of resources to the
> > LRU tail.
> > *
> > @@ -88,6 +150,7 @@ void ttm_lru_bulk_move_tail(struct
> > ttm_lru_bulk_move *bulk)
> > {
> > unsigned i, j;
> >
> > + ttm_bulk_move_adjust_cursors(bulk);
> > for (i = 0; i < TTM_NUM_MEM_TYPES; ++i) {
> > for (j = 0; j < TTM_MAX_BO_PRIORITY; ++j) {
> > struct ttm_lru_bulk_move_pos *pos = &bulk-
> > >pos[i][j];
> > @@ -515,6 +578,29 @@ void ttm_resource_manager_debug(struct
> > ttm_resource_manager *man,
> > }
> > EXPORT_SYMBOL(ttm_resource_manager_debug);
> >
> > +static void
> > +ttm_resource_cursor_check_bulk(struct ttm_resource_cursor *cursor,
> > + struct ttm_lru_item *next_lru)
> > +{
> > + struct ttm_resource *next = ttm_lru_item_to_res(next_lru);
> > + struct ttm_lru_bulk_move *bulk = NULL;
> > + struct ttm_buffer_object *bo = next->bo;
> > +
> > + lockdep_assert_held(&cursor->man->bdev->lru_lock);
> > + if (bo && bo->resource == next)
> > + bulk = bo->bulk_move;
>
>
> Can you explain what the above if statement is doing, struggling a
> bit
> here. Is this a weird case where the LRU item (struct ttm_resource)
> is
> fully (1st condition) or partially (2nd condition) detached from a
> BO?
Yeah, this is a weird corner case where the resource is handed over to
a ghost object, and the lock protection is not clearly specified. From
my reading of the code, at least bo->resource is not protected by the
LRU lock when clearing, but bo->bulk_move is, so given that, perhaps
the test is indeed unnecessary.
>
> > +
> > + if (cursor->bulk != bulk) {
> > + if (bulk) {
> > + list_move_tail(&cursor->bulk_link, &bulk-
> > >cursor_list);
> > + cursor->mem_type = next->mem_type;
> > + } else {
> > + list_del_init(&cursor->bulk_link);
> > + }
> > + cursor->bulk = bulk;
> > + }
> > +}
> > +
> > /**
> > * ttm_resource_manager_first() - Start iterating over the
> > resources
> > * of a resource manager
> > @@ -535,6 +621,7 @@ ttm_resource_manager_first(struct
> > ttm_resource_manager *man,
> > cursor->priority = 0;
> > cursor->man = man;
> > ttm_lru_item_init(&cursor->hitch, TTM_LRU_HITCH);
> > + INIT_LIST_HEAD(&cursor->bulk_link);
> > list_add(&cursor->hitch.link, &man->lru[cursor-
> > >priority]);
> >
> > return ttm_resource_manager_next(cursor);
> > @@ -559,6 +646,7 @@ ttm_resource_manager_next(struct
> > ttm_resource_cursor *cursor)
> > lru = &cursor->hitch;
> > list_for_each_entry_continue(lru, &man-
> > >lru[cursor->priority], link) {
> > if (ttm_lru_item_is_res(lru)) {
> > + ttm_resource_cursor_check_bulk(cur
> > sor, lru);
> > list_move(&cursor->hitch.link,
> > &lru->link);
>
> Sorry noticing this here from a different patch. Shouldn't this be
> list_move_tail so if the LRU can't be evicted we don't pick it again?
Same as above.
>
> Matt
>
> > return ttm_lru_item_to_res(lru);
> > }
> > @@ -568,6 +656,7 @@ ttm_resource_manager_next(struct
> > ttm_resource_cursor *cursor)
> > break;
> >
> > list_move(&cursor->hitch.link, &man->lru[cursor-
> > >priority]);
> > + ttm_resource_cursor_clear_bulk(cursor);
> > }
> >
> > ttm_resource_cursor_fini_locked(cursor);
> > diff --git a/drivers/gpu/drm/xe/xe_vm.c
> > b/drivers/gpu/drm/xe/xe_vm.c
> > index 61d4d95a5377..226da3c74f9c 100644
> > --- a/drivers/gpu/drm/xe/xe_vm.c
> > +++ b/drivers/gpu/drm/xe/xe_vm.c
> > @@ -1339,6 +1339,8 @@ struct xe_vm *xe_vm_create(struct xe_device
> > *xe, u32 flags)
> >
> > INIT_WORK(&vm->destroy_work, vm_destroy_work_func);
> >
> > + ttm_lru_bulk_move_init(&vm->lru_bulk_move);
> > +
> > INIT_LIST_HEAD(&vm->preempt.exec_queues);
> > vm->preempt.min_run_period_ms = 10; /* FIXME: Wire up
> > to uAPI */
> >
> > @@ -1462,6 +1464,7 @@ struct xe_vm *xe_vm_create(struct xe_device
> > *xe, u32 flags)
> > mutex_destroy(&vm->snap_mutex);
> > for_each_tile(tile, xe, id)
> > xe_range_fence_tree_fini(&vm->rftree[id]);
> > + ttm_lru_bulk_move_fini(&xe->ttm, &vm->lru_bulk_move);
> > kfree(vm);
> > if (flags & XE_VM_FLAG_LR_MODE)
> > xe_pm_runtime_put(xe);
> > @@ -1605,6 +1608,7 @@ static void vm_destroy_work_func(struct
> > work_struct *w)
> > XE_WARN_ON(vm->pt_root[id]);
> >
> > trace_xe_vm_free(vm);
> > + ttm_lru_bulk_move_fini(&xe->ttm, &vm->lru_bulk_move);
> > kfree(vm);
> > }
> >
> > diff --git a/include/drm/ttm/ttm_resource.h
> > b/include/drm/ttm/ttm_resource.h
> > index 8fac781f641e..571abb4861a6 100644
> > --- a/include/drm/ttm/ttm_resource.h
> > +++ b/include/drm/ttm/ttm_resource.h
> > @@ -269,26 +269,6 @@ ttm_lru_item_to_res(struct ttm_lru_item *item)
> > return container_of(item, struct ttm_resource, lru);
> > }
> >
> > -/**
> > - * struct ttm_resource_cursor
> > - *
> > - * @man: The resource manager currently being iterated over.
> > - * @hitch: A hitch list node inserted before the next resource
> > - * to iterate over.
> > - * @priority: the current priority
> > - *
> > - * Cursor to iterate over the resources in a manager.
> > - */
> > -struct ttm_resource_cursor {
> > - struct ttm_resource_manager *man;
> > - struct ttm_lru_item hitch;
> > - unsigned int priority;
> > -};
> > -
> > -void ttm_resource_cursor_fini_locked(struct ttm_resource_cursor
> > *cursor);
> > -
> > -void ttm_resource_cursor_fini(struct ttm_resource_cursor *cursor);
> > -
> > /**
> > * struct ttm_lru_bulk_move_pos
> > *
> > @@ -304,8 +284,9 @@ struct ttm_lru_bulk_move_pos {
> >
> > /**
> > * struct ttm_lru_bulk_move
> > - *
> > * @pos: first/last lru entry for resources in the each
> > domain/priority
> > + * @cursor_list: The list of cursors currently traversing any of
> > + * the sublists of @pos. Protected by the ttm device's lru_lock.
> > *
> > * Container for the current bulk move state. Should be used with
> > * ttm_lru_bulk_move_init() and ttm_bo_set_bulk_move().
> > @@ -315,8 +296,39 @@ struct ttm_lru_bulk_move_pos {
> > */
> > struct ttm_lru_bulk_move {
> > struct ttm_lru_bulk_move_pos
> > pos[TTM_NUM_MEM_TYPES][TTM_MAX_BO_PRIORITY];
> > + struct list_head cursor_list;
> > };
> >
> > +/**
> > + * struct ttm_resource_cursor
> > + * @man: The resource manager currently being iterated over
> > + * @hitch: A hitch list node inserted before the next resource
> > + * to iterate over.
> > + * @bulk_link: A list link for the list of cursors traversing the
> > + * bulk sublist of @bulk. Protected by the ttm device's lru_lock.
> > + * @bulk: Pointer to struct ttm_lru_bulk_move whose subrange
> > @hitch is
> > + * inserted to. NULL if none. Never dereference this pointer since
> > + * the struct ttm_lru_bulk_move object pointed to might have been
> > + * freed. The pointer is only for comparison.
> > + * @mem_type: The memory type of the LRU list being traversed.
> > + * This field is valid iff @bulk != NULL.
> > + * @priority: the current priority
> > + *
> > + * Cursor to iterate over the resources in a manager.
> > + */
> > +struct ttm_resource_cursor {
> > + struct ttm_resource_manager *man;
> > + struct ttm_lru_item hitch;
> > + struct list_head bulk_link;
> > + struct ttm_lru_bulk_move *bulk;
> > + unsigned int mem_type;
> > + unsigned int priority;
> > +};
> > +
> > +void ttm_resource_cursor_fini_locked(struct ttm_resource_cursor
> > *cursor);
> > +
> > +void ttm_resource_cursor_fini(struct ttm_resource_cursor *cursor);
> > +
> > /**
> > * struct ttm_kmap_iter_iomap - Specialization for a struct
> > io_mapping +
> > * struct sg_table backed struct ttm_resource.
> > @@ -405,6 +417,8 @@ ttm_resource_manager_cleanup(struct
> > ttm_resource_manager *man)
> >
> > void ttm_lru_bulk_move_init(struct ttm_lru_bulk_move *bulk);
> > void ttm_lru_bulk_move_tail(struct ttm_lru_bulk_move *bulk);
> > +void ttm_lru_bulk_move_fini(struct ttm_device *bdev,
> > + struct ttm_lru_bulk_move *bulk);
> >
> > void ttm_resource_add_bulk_move(struct ttm_resource *res,
> > struct ttm_buffer_object *bo);
> > --
> > 2.44.0
> >
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v5 06/12] drm/ttm: Use the LRU walker helper for swapping
2024-06-19 4:23 ` Matthew Brost
@ 2024-06-19 8:36 ` Thomas Hellström
0 siblings, 0 replies; 36+ messages in thread
From: Thomas Hellström @ 2024-06-19 8:36 UTC (permalink / raw)
To: Matthew Brost
Cc: intel-xe, Christian König, Somalapuram Amaranath, dri-devel
On Wed, 2024-06-19 at 04:23 +0000, Matthew Brost wrote:
> On Tue, Jun 18, 2024 at 09:18:14AM +0200, Thomas Hellström wrote:
> > Rework the TTM swapping to use the LRU walker helper.
> > This helps fixing up the ttm_bo_swapout() interface
> > to be consistent about not requiring any locking.
> >
> > For now mimic the current behaviour of using trylock
> > only. We could be using ticket-locks here but defer
> > that until it's deemed necessary. The TTM swapout
> > functionality is a bit weird anyway since it
> > alternates between memory types without exhausting
> > TTM_PL_SYSTEM first.
> >
> > Cc: Christian König <christian.koenig@amd.com>
> > Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
> > Cc: Matthew Brost <matthew.brost@intel.com>
> > Cc: <dri-devel@lists.freedesktop.org>
> > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> > ---
> > drivers/gpu/drm/ttm/ttm_bo.c | 112 +++++++++++++++++++++------
> > ----
> > drivers/gpu/drm/ttm/ttm_device.c | 30 ++-------
> > include/drm/ttm/ttm_bo.h | 5 +-
> > 3 files changed, 83 insertions(+), 64 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/ttm/ttm_bo.c
> > b/drivers/gpu/drm/ttm/ttm_bo.c
> > index 43eda720657f..63a91b77f7da 100644
> > --- a/drivers/gpu/drm/ttm/ttm_bo.c
> > +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> > @@ -1118,11 +1118,23 @@ int ttm_bo_wait_ctx(struct
> > ttm_buffer_object *bo, struct ttm_operation_ctx *ctx)
> > }
> > EXPORT_SYMBOL(ttm_bo_wait_ctx);
> >
> > -int ttm_bo_swapout(struct ttm_buffer_object *bo, struct
> > ttm_operation_ctx *ctx,
> > - gfp_t gfp_flags)
> > +/**
> > + * struct ttm_bo_swapout_walk - Parameters for the swapout walk
> > + */
> > +struct ttm_bo_swapout_walk {
> > + /** @walk: The walk base parameters. */
> > + struct ttm_lru_walk walk;
> > + /** @gfp_flags: The gfp flags to use for ttm_tt_swapout()
> > */
> > + gfp_t gfp_flags;
> > +};
> > +
> > +static long
> > +ttm_bo_swapout_cb(struct ttm_lru_walk *walk, struct
> > ttm_buffer_object *bo)
> > {
> > - struct ttm_place place;
> > - bool locked;
> > + struct ttm_place place = {.mem_type = bo->resource-
> > >mem_type};
> > + struct ttm_bo_swapout_walk *swapout_walk =
> > + container_of(walk, typeof(*swapout_walk), walk);
> > + struct ttm_operation_ctx *ctx = walk->ctx;
> > long ret;
> >
> > /*
> > @@ -1131,28 +1143,29 @@ int ttm_bo_swapout(struct ttm_buffer_object
> > *bo, struct ttm_operation_ctx *ctx,
> > * The driver may use the fact that we're moving from
> > SYSTEM
> > * as an indication that we're about to swap out.
> > */
> > - memset(&place, 0, sizeof(place));
> > - place.mem_type = bo->resource->mem_type;
> > - if (!ttm_bo_evict_swapout_allowable(bo, ctx, &place,
> > &locked, NULL))
> > - return -EBUSY;
> > + if (!bo->bdev->funcs->eviction_valuable(bo, &place)) {
> > + ret = -EBUSY;
> > + goto out;
> > + }
> >
> > if (!bo->ttm || !ttm_tt_is_populated(bo->ttm) ||
> > bo->ttm->page_flags & TTM_TT_FLAG_EXTERNAL ||
> > - bo->ttm->page_flags & TTM_TT_FLAG_SWAPPED ||
> > - !ttm_bo_get_unless_zero(bo)) {
> > - if (locked)
> > - dma_resv_unlock(bo->base.resv);
> > - return -EBUSY;
> > + bo->ttm->page_flags & TTM_TT_FLAG_SWAPPED) {
> > + ret = -EBUSY;
>
> I think answers my -EBUSY question from here [1]. In these cases we
> continue LRU walk as eviction of the BO is not valuable.
>
> [1]
> https://patchwork.freedesktop.org/patch/599606/?series=131815&rev=5#comment_1091419
>
> > + goto out;
> > }
> >
> > if (bo->deleted) {
> > - ret = ttm_bo_cleanup_refs(bo, false, false,
> > locked);
> > - ttm_bo_put(bo);
> > - return ret == -EBUSY ? -ENOSPC : ret;
> > - }
> > + pgoff_t num_pages = bo->ttm->num_pages;
> >
> > - /* TODO: Cleanup the locking */
> > - spin_unlock(&bo->bdev->lru_lock);
> > + ret = ttm_bo_wait_ctx(bo, ctx);
> > + if (ret)
> > + goto out;
> > +
> > + ttm_bo_cleanup_memtype_use(bo);
> > + ret = num_pages;
> > + goto out;
> > + }
> >
> > /*
> > * Move to system cached
> > @@ -1164,12 +1177,13 @@ int ttm_bo_swapout(struct ttm_buffer_object
> > *bo, struct ttm_operation_ctx *ctx,
> > memset(&hop, 0, sizeof(hop));
> > place.mem_type = TTM_PL_SYSTEM;
> > ret = ttm_resource_alloc(bo, &place, &evict_mem);
> > - if (unlikely(ret))
> > + if (ret)
> > goto out;
> >
> > ret = ttm_bo_handle_move_mem(bo, evict_mem, true,
> > ctx, &hop);
> > - if (unlikely(ret != 0)) {
> > - WARN(ret == -EMULTIHOP, "Unexpected
> > multihop in swaput - likely driver bug.\n");
> > + if (ret) {
> > + WARN(ret == -EMULTIHOP,
> > + "Unexpected multihop in swapout -
> > likely driver bug.\n");
> > ttm_resource_free(bo, &evict_mem);
> > goto out;
> > }
> > @@ -1179,30 +1193,54 @@ int ttm_bo_swapout(struct ttm_buffer_object
> > *bo, struct ttm_operation_ctx *ctx,
> > * Make sure BO is idle.
> > */
> > ret = ttm_bo_wait_ctx(bo, ctx);
> > - if (unlikely(ret != 0))
> > + if (ret)
> > goto out;
> >
> > ttm_bo_unmap_virtual(bo);
> > -
> > - /*
> > - * Swap out. Buffer will be swapped in again as soon as
> > - * anyone tries to access a ttm page.
> > - */
> > if (bo->bdev->funcs->swap_notify)
> > bo->bdev->funcs->swap_notify(bo);
> >
> > if (ttm_tt_is_populated(bo->ttm))
> > - ret = ttm_tt_swapout(bo->bdev, bo->ttm,
> > gfp_flags);
> > + ret = ttm_tt_swapout(bo->bdev, bo->ttm,
> > swapout_walk->gfp_flags);
> > out:
> > + /* Consider some error codes fatal. Others may continue
> > the walk. */
> > + if (ret == -ENOMEM || ret == -EINTR || ret == -ERESTARTSYS
> > ||
> > + ret == -EAGAIN || ret > 0)
> > + return ret;
>
> Would it be more robust / clear to do the inverse of this? i.e.
> Return 0
> on non-fatal error codes?
Hm. I'll check how that will turn out.
>
> >
> > - /*
> > - * Unreserve without putting on LRU to avoid swapping out
> > an
> > - * already swapped buffer.
> > - */
> > - if (locked)
> > - dma_resv_unlock(bo->base.resv);
> > - ttm_bo_put(bo);
> > - return ret == -EBUSY ? -ENOSPC : ret;
> > + return 0;
> > +}
> > +
> > +const struct ttm_lru_walk_ops ttm_swap_ops = {
> > + .process_bo = ttm_bo_swapout_cb,
> > +};
> > +
> > +/**
> > + * ttm_bo_swapout() - Swap out buffer objects on the LRU list to
> > shmem.
> > + * @bdev: The ttm device.
> > + * @ctx: The ttm_operation_ctx governing the swapout operation.
> > + * @man: The resource manager whose resources / buffer objects are
> > + * goint to be swapped out.
> > + * @gfp_flags: The gfp flags used for shmem page allocations.
> > + * @target: The desired number of pages to swap out.
> > + *
> > + * Return: The number of pages actually swapped out, or negative
> > error code
> > + * on error.
> > + */
> > +long ttm_bo_swapout(struct ttm_device *bdev, struct
> > ttm_operation_ctx *ctx,
> > + struct ttm_resource_manager *man, gfp_t
> > gfp_flags,
> > + pgoff_t target)
> > +{
> > + struct ttm_bo_swapout_walk swapout_walk = {
> > + .walk = {
> > + .ops = &ttm_swap_ops,
> > + .ctx = ctx,
> > + .trylock_only = true,
> > + },
> > + .gfp_flags = gfp_flags,
> > + };
> > +
> > + return ttm_lru_walk_for_evict(&swapout_walk.walk, bdev,
> > man, target);
> > }
> >
> > void ttm_bo_tt_destroy(struct ttm_buffer_object *bo)
> > diff --git a/drivers/gpu/drm/ttm/ttm_device.c
> > b/drivers/gpu/drm/ttm/ttm_device.c
> > index f9e9b1ec8c8a..ee575d8a54c0 100644
> > --- a/drivers/gpu/drm/ttm/ttm_device.c
> > +++ b/drivers/gpu/drm/ttm/ttm_device.c
> > @@ -148,40 +148,20 @@ int ttm_global_swapout(struct
> > ttm_operation_ctx *ctx, gfp_t gfp_flags)
> > int ttm_device_swapout(struct ttm_device *bdev, struct
> > ttm_operation_ctx *ctx,
> > gfp_t gfp_flags)
> > {
> > - struct ttm_resource_cursor cursor;
> > struct ttm_resource_manager *man;
> > - struct ttm_resource *res;
> > unsigned i;
> > - int ret;
> > + long lret;
> >
> > - spin_lock(&bdev->lru_lock);
> > for (i = TTM_PL_SYSTEM; i < TTM_NUM_MEM_TYPES; ++i) {
> > man = ttm_manager_type(bdev, i);
> > if (!man || !man->use_tt)
> > continue;
> >
> > - ttm_resource_manager_for_each_res(man, &cursor,
> > res) {
> > - struct ttm_buffer_object *bo = res->bo;
> > - uint32_t num_pages;
> > -
> > - if (!bo || bo->resource != res)
> > - continue;
> > -
> > - num_pages = PFN_UP(bo->base.size);
> > - ret = ttm_bo_swapout(bo, ctx, gfp_flags);
> > - /* ttm_bo_swapout has dropped the lru_lock
> > */
> > - if (!ret) {
> > - ttm_resource_cursor_fini(&cursor);
> > - return num_pages;
> > - }
> > - if (ret != -EBUSY) {
> > - ttm_resource_cursor_fini(&cursor);
> > - return ret;
> > - }
> > - }
> > + lret = ttm_bo_swapout(bdev, ctx, man, gfp_flags,
> > 1);
>
> With a target of 1 this will evict exactly 1 various sized BO which
> seems to match the current behavior.
>
> Just curious what is the usage of this function which evicts 1 BO
> from
> the device?
I think it evicts one bo at a time until the 50% system target is met,
alternating between TTM devices and, unfortunately, memory regions.
That could probably be improved upon, but beyond the scope of this
series since with the shrinker, we can't really exercise that on xe.
/Thomas
>
> Matt
>
> > + /* Can be both positive (num_pages) and negative
> > (error) */
> > + if (lret)
> > + return lret;
> > }
> > - ttm_resource_cursor_fini_locked(&cursor);
> > - spin_unlock(&bdev->lru_lock);
> > return 0;
> > }
> > EXPORT_SYMBOL(ttm_device_swapout);
> > diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h
> > index 8b032298d66e..472a55b69afb 100644
> > --- a/include/drm/ttm/ttm_bo.h
> > +++ b/include/drm/ttm/ttm_bo.h
> > @@ -410,8 +410,9 @@ void ttm_bo_kunmap(struct ttm_bo_kmap_obj
> > *map);
> > int ttm_bo_vmap(struct ttm_buffer_object *bo, struct iosys_map
> > *map);
> > void ttm_bo_vunmap(struct ttm_buffer_object *bo, struct iosys_map
> > *map);
> > int ttm_bo_mmap_obj(struct vm_area_struct *vma, struct
> > ttm_buffer_object *bo);
> > -int ttm_bo_swapout(struct ttm_buffer_object *bo, struct
> > ttm_operation_ctx *ctx,
> > - gfp_t gfp_flags);
> > +long ttm_bo_swapout(struct ttm_device *bdev, struct
> > ttm_operation_ctx *ctx,
> > + struct ttm_resource_manager *man, gfp_t
> > gfp_flags,
> > + pgoff_t target);
> > void ttm_bo_pin(struct ttm_buffer_object *bo);
> > void ttm_bo_unpin(struct ttm_buffer_object *bo);
> > int ttm_mem_evict_first(struct ttm_device *bdev,
> > --
> > 2.44.0
> >
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v5 04/12] drm/ttm, drm/amdgpu, drm/xe: Consider hitch moves within bulk sublist moves
2024-06-19 8:24 ` Thomas Hellström
@ 2024-06-19 14:44 ` Matthew Brost
0 siblings, 0 replies; 36+ messages in thread
From: Matthew Brost @ 2024-06-19 14:44 UTC (permalink / raw)
To: Thomas Hellström
Cc: intel-xe, Christian König, Somalapuram Amaranath, dri-devel
On Wed, Jun 19, 2024 at 10:24:25AM +0200, Thomas Hellström wrote:
> On Wed, 2024-06-19 at 03:37 +0000, Matthew Brost wrote:
> > On Tue, Jun 18, 2024 at 09:18:12AM +0200, Thomas Hellström wrote:
> >
> > Ugh, replying to correct version again...
> >
> > > To address the problem with hitches moving when bulk move
> > > sublists are lru-bumped, register the list cursors with the
> > > ttm_lru_bulk_move structure when traversing its list, and
> > > when lru-bumping the list, move the cursor hitch to the tail.
> >
> > - So the hitch moves to the tail (last) which points to the next item
> > in
> > the LRU list
> > - Then bulk is moved which is from first -> last to the end of the
> > LRU
> > list
> > - Now the hitch remains in the correct position in the list (i.e. it
> > didn't move with the bulk)
> >
> > Did I get that right?
>
> Yes, correct.
>
> >
> > > This also means it's mandatory for drivers to call
> > > ttm_lru_bulk_move_init() and ttm_lru_bulk_move_fini() when
> > > initializing and finalizing the bulk move structure, so add
> > > those calls to the amdgpu- and xe driver.
> > >
> > > Compared to v1 this is slightly more code but less fragile
> > > and hopefully easier to understand.
> > >
> > > Changes in previous series:
> > > - Completely rework the functionality
> > > - Avoid a NULL pointer dereference assigning manager->mem_type
> > > - Remove some leftover code causing build problems
> > > v2:
> > > - For hitch bulk tail moves, store the mem_type in the cursor
> > > instead of with the manager.
> > > v3:
> > > - Remove leftover mem_type member from change in v2.
> > >
> > > Cc: Christian König <christian.koenig@amd.com>
> > > Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
> > > Cc: Matthew Brost <matthew.brost@intel.com>
> > > Cc: <dri-devel@lists.freedesktop.org>
> > > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> > > ---
> > > drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++
> > > drivers/gpu/drm/ttm/ttm_resource.c | 89
> > > ++++++++++++++++++++++++++
> > > drivers/gpu/drm/xe/xe_vm.c | 4 ++
> > > include/drm/ttm/ttm_resource.h | 56 ++++++++++------
> > > 4 files changed, 132 insertions(+), 21 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> > > b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> > > index 3abfa66d72a2..97743993d711 100644
> > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> > > @@ -2420,6 +2420,8 @@ int amdgpu_vm_init(struct amdgpu_device
> > > *adev, struct amdgpu_vm *vm,
> > > if (r)
> > > return r;
> > >
> > > + ttm_lru_bulk_move_init(&vm->lru_bulk_move);
> > > +
> > > vm->is_compute_context = false;
> > >
> > > vm->use_cpu_for_update = !!(adev-
> > > >vm_manager.vm_update_mode &
> > > @@ -2484,6 +2486,7 @@ int amdgpu_vm_init(struct amdgpu_device
> > > *adev, struct amdgpu_vm *vm,
> > > error_free_delayed:
> > > dma_fence_put(vm->last_tlb_flush);
> > > dma_fence_put(vm->last_unlocked);
> > > + ttm_lru_bulk_move_fini(&adev->mman.bdev, &vm-
> > > >lru_bulk_move);
> > > amdgpu_vm_fini_entities(vm);
> > >
> > > return r;
> > > @@ -2640,6 +2643,7 @@ void amdgpu_vm_fini(struct amdgpu_device
> > > *adev, struct amdgpu_vm *vm)
> > > }
> > > }
> > >
> > > + ttm_lru_bulk_move_fini(&adev->mman.bdev, &vm-
> > > >lru_bulk_move);
> > > }
> > >
> > > /**
> > > diff --git a/drivers/gpu/drm/ttm/ttm_resource.c
> > > b/drivers/gpu/drm/ttm/ttm_resource.c
> > > index 9c8b6499edfb..a03090683e79 100644
> > > --- a/drivers/gpu/drm/ttm/ttm_resource.c
> > > +++ b/drivers/gpu/drm/ttm/ttm_resource.c
> > > @@ -33,6 +33,49 @@
> > >
> > > #include <drm/drm_util.h>
> > >
> > > +/* Detach the cursor from the bulk move list*/
> > > +static void
> > > +ttm_resource_cursor_clear_bulk(struct ttm_resource_cursor *cursor)
> > > +{
> >
> > A lockdep annotation wouldn't hurt here.
>
> Will add.
>
> >
> > > + cursor->bulk = NULL;
> > > + list_del_init(&cursor->bulk_link);
> > > +}
> > > +
> > > +/* Move the cursor to the end of the bulk move list it's in */
> > > +static void ttm_resource_cursor_move_bulk_tail(struct
> > > ttm_lru_bulk_move *bulk,
> > > + struct
> > > ttm_resource_cursor *cursor)
> > > +{
> > > + struct ttm_lru_bulk_move_pos *pos;
> > > +
> >
> > A lockdep annotation wouldn't hurt here too.
>
> +1!
>
> >
> > > + if (WARN_ON_ONCE(bulk != cursor->bulk)) {
> > > + list_del_init(&cursor->bulk_link);
> > > + return;
> > > + }
> > > +
> > > + pos = &bulk->pos[cursor->mem_type][cursor->priority];
> > > + if (pos)
> >
> > 'if (pos->last)'?
> >
> > As 'if (pos)' is going to always be true given you are using the
> > address
> > of operator (&) on an instantiated struct ttm_lru_bulk_move_pos.
>
> Good catch! I'll fix that up.
>
> >
> > > + list_move(&cursor->hitch.link, &pos->last-
> > > >lru.link);
> >
> > This should be list_move_tail, right? So last->next == hitch.
> >
> > As the code is last->prev == hitch which means the hitch would be
> > included in the bulk move, right?
>
> It's the other way around right? list_move(a, b) will insert a as b-
> >next, which is what we want.
I realized a bit after typing this, yes this is correct as is.
>
> >
> > > + ttm_resource_cursor_clear_bulk(cursor);
> > > +}
> > > +
> > > +/* Move all cursors attached to a bulk move to its end */
> > > +static void ttm_bulk_move_adjust_cursors(struct ttm_lru_bulk_move
> > > *bulk)
> > > +{
> > > + struct ttm_resource_cursor *cursor, *next;
> > > +
> > > + list_for_each_entry_safe(cursor, next, &bulk->cursor_list,
> > > bulk_link)
> > > + ttm_resource_cursor_move_bulk_tail(bulk, cursor);
> > > +}
> > > +
> > > +/* Remove a cursor from an empty bulk move list */
> > > +static void ttm_bulk_move_drop_cursors(struct ttm_lru_bulk_move
> > > *bulk)
> > > +{
> > > + struct ttm_resource_cursor *cursor, *next;
> > > +
> > > + list_for_each_entry_safe(cursor, next, &bulk->cursor_list,
> > > bulk_link)
> > > + ttm_resource_cursor_clear_bulk(cursor);
> > > +}
> > > +
> > > /**
> > > * ttm_resource_cursor_fini_locked() - Finalize the LRU list
> > > cursor usage
> > > * @cursor: The struct ttm_resource_cursor to finalize.
> > > @@ -45,6 +88,7 @@ void ttm_resource_cursor_fini_locked(struct
> > > ttm_resource_cursor *cursor)
> > > {
> > > lockdep_assert_held(&cursor->man->bdev->lru_lock);
> > > list_del_init(&cursor->hitch.link);
> > > + ttm_resource_cursor_clear_bulk(cursor);
> > > }
> > >
> > > /**
> > > @@ -73,9 +117,27 @@ void ttm_resource_cursor_fini(struct
> > > ttm_resource_cursor *cursor)
> > > void ttm_lru_bulk_move_init(struct ttm_lru_bulk_move *bulk)
> > > {
> > > memset(bulk, 0, sizeof(*bulk));
> > > + INIT_LIST_HEAD(&bulk->cursor_list);
> > > }
> > > EXPORT_SYMBOL(ttm_lru_bulk_move_init);
> > >
> > > +/**
> > > + * ttm_lru_bulk_move_fini - finalize a bulk move structure
> > > + * @bdev: The struct ttm_device
> > > + * @bulk: the structure to finalize
> > > + *
> > > + * Sanity checks that bulk moves don't have any
> > > + * resources left and hence no cursors attached.
> > > + */
> > > +void ttm_lru_bulk_move_fini(struct ttm_device *bdev,
> > > + struct ttm_lru_bulk_move *bulk)
> > > +{
> > > + spin_lock(&bdev->lru_lock);
> > > + ttm_bulk_move_drop_cursors(bulk);
> > > + spin_unlock(&bdev->lru_lock);
> > > +}
> > > +EXPORT_SYMBOL(ttm_lru_bulk_move_fini);
> > > +
> > > /**
> > > * ttm_lru_bulk_move_tail - bulk move range of resources to the
> > > LRU tail.
> > > *
> > > @@ -88,6 +150,7 @@ void ttm_lru_bulk_move_tail(struct
> > > ttm_lru_bulk_move *bulk)
> > > {
> > > unsigned i, j;
> > >
> > > + ttm_bulk_move_adjust_cursors(bulk);
> > > for (i = 0; i < TTM_NUM_MEM_TYPES; ++i) {
> > > for (j = 0; j < TTM_MAX_BO_PRIORITY; ++j) {
> > > struct ttm_lru_bulk_move_pos *pos = &bulk-
> > > >pos[i][j];
> > > @@ -515,6 +578,29 @@ void ttm_resource_manager_debug(struct
> > > ttm_resource_manager *man,
> > > }
> > > EXPORT_SYMBOL(ttm_resource_manager_debug);
> > >
> > > +static void
> > > +ttm_resource_cursor_check_bulk(struct ttm_resource_cursor *cursor,
> > > + struct ttm_lru_item *next_lru)
> > > +{
> > > + struct ttm_resource *next = ttm_lru_item_to_res(next_lru);
> > > + struct ttm_lru_bulk_move *bulk = NULL;
> > > + struct ttm_buffer_object *bo = next->bo;
> > > +
> > > + lockdep_assert_held(&cursor->man->bdev->lru_lock);
> > > + if (bo && bo->resource == next)
> > > + bulk = bo->bulk_move;
> >
> >
> > Can you explain what the above if statement is doing, struggling a
> > bit
> > here. Is this a weird case where the LRU item (struct ttm_resource)
> > is
> > fully (1st condition) or partially (2nd condition) detached from a
> > BO?
>
> Yeah, this is a weird corner case where the resource is handed over to
> a ghost object, and the lock protection is not clearly specified. From
> my reading of the code, at least bo->resource is not protected by the
> LRU lock when clearing, but bo->bulk_move is, so given that, perhaps
> the test is indeed unnecessary.
>
Looking at that code I think the above statement is correct.
> >
> > > +
> > > + if (cursor->bulk != bulk) {
> > > + if (bulk) {
> > > + list_move_tail(&cursor->bulk_link, &bulk-
> > > >cursor_list);
> > > + cursor->mem_type = next->mem_type;
> > > + } else {
> > > + list_del_init(&cursor->bulk_link);
> > > + }
> > > + cursor->bulk = bulk;
> > > + }
> > > +}
> > > +
> > > /**
> > > * ttm_resource_manager_first() - Start iterating over the
> > > resources
> > > * of a resource manager
> > > @@ -535,6 +621,7 @@ ttm_resource_manager_first(struct
> > > ttm_resource_manager *man,
> > > cursor->priority = 0;
> > > cursor->man = man;
> > > ttm_lru_item_init(&cursor->hitch, TTM_LRU_HITCH);
> > > + INIT_LIST_HEAD(&cursor->bulk_link);
> > > list_add(&cursor->hitch.link, &man->lru[cursor-
> > > >priority]);
> > >
> > > return ttm_resource_manager_next(cursor);
> > > @@ -559,6 +646,7 @@ ttm_resource_manager_next(struct
> > > ttm_resource_cursor *cursor)
> > > lru = &cursor->hitch;
> > > list_for_each_entry_continue(lru, &man-
> > > >lru[cursor->priority], link) {
> > > if (ttm_lru_item_is_res(lru)) {
> > > + ttm_resource_cursor_check_bulk(cur
> > > sor, lru);
> > > list_move(&cursor->hitch.link,
> > > &lru->link);
> >
> > Sorry noticing this here from a different patch. Shouldn't this be
> > list_move_tail so if the LRU can't be evicted we don't pick it again?
>
> Same as above.
>
Yep, my mistake.
Matt
> >
> > Matt
> >
> > > return ttm_lru_item_to_res(lru);
> > > }
> > > @@ -568,6 +656,7 @@ ttm_resource_manager_next(struct
> > > ttm_resource_cursor *cursor)
> > > break;
> > >
> > > list_move(&cursor->hitch.link, &man->lru[cursor-
> > > >priority]);
> > > + ttm_resource_cursor_clear_bulk(cursor);
> > > }
> > >
> > > ttm_resource_cursor_fini_locked(cursor);
> > > diff --git a/drivers/gpu/drm/xe/xe_vm.c
> > > b/drivers/gpu/drm/xe/xe_vm.c
> > > index 61d4d95a5377..226da3c74f9c 100644
> > > --- a/drivers/gpu/drm/xe/xe_vm.c
> > > +++ b/drivers/gpu/drm/xe/xe_vm.c
> > > @@ -1339,6 +1339,8 @@ struct xe_vm *xe_vm_create(struct xe_device
> > > *xe, u32 flags)
> > >
> > > INIT_WORK(&vm->destroy_work, vm_destroy_work_func);
> > >
> > > + ttm_lru_bulk_move_init(&vm->lru_bulk_move);
> > > +
> > > INIT_LIST_HEAD(&vm->preempt.exec_queues);
> > > vm->preempt.min_run_period_ms = 10; /* FIXME: Wire up
> > > to uAPI */
> > >
> > > @@ -1462,6 +1464,7 @@ struct xe_vm *xe_vm_create(struct xe_device
> > > *xe, u32 flags)
> > > mutex_destroy(&vm->snap_mutex);
> > > for_each_tile(tile, xe, id)
> > > xe_range_fence_tree_fini(&vm->rftree[id]);
> > > + ttm_lru_bulk_move_fini(&xe->ttm, &vm->lru_bulk_move);
> > > kfree(vm);
> > > if (flags & XE_VM_FLAG_LR_MODE)
> > > xe_pm_runtime_put(xe);
> > > @@ -1605,6 +1608,7 @@ static void vm_destroy_work_func(struct
> > > work_struct *w)
> > > XE_WARN_ON(vm->pt_root[id]);
> > >
> > > trace_xe_vm_free(vm);
> > > + ttm_lru_bulk_move_fini(&xe->ttm, &vm->lru_bulk_move);
> > > kfree(vm);
> > > }
> > >
> > > diff --git a/include/drm/ttm/ttm_resource.h
> > > b/include/drm/ttm/ttm_resource.h
> > > index 8fac781f641e..571abb4861a6 100644
> > > --- a/include/drm/ttm/ttm_resource.h
> > > +++ b/include/drm/ttm/ttm_resource.h
> > > @@ -269,26 +269,6 @@ ttm_lru_item_to_res(struct ttm_lru_item *item)
> > > return container_of(item, struct ttm_resource, lru);
> > > }
> > >
> > > -/**
> > > - * struct ttm_resource_cursor
> > > - *
> > > - * @man: The resource manager currently being iterated over.
> > > - * @hitch: A hitch list node inserted before the next resource
> > > - * to iterate over.
> > > - * @priority: the current priority
> > > - *
> > > - * Cursor to iterate over the resources in a manager.
> > > - */
> > > -struct ttm_resource_cursor {
> > > - struct ttm_resource_manager *man;
> > > - struct ttm_lru_item hitch;
> > > - unsigned int priority;
> > > -};
> > > -
> > > -void ttm_resource_cursor_fini_locked(struct ttm_resource_cursor
> > > *cursor);
> > > -
> > > -void ttm_resource_cursor_fini(struct ttm_resource_cursor *cursor);
> > > -
> > > /**
> > > * struct ttm_lru_bulk_move_pos
> > > *
> > > @@ -304,8 +284,9 @@ struct ttm_lru_bulk_move_pos {
> > >
> > > /**
> > > * struct ttm_lru_bulk_move
> > > - *
> > > * @pos: first/last lru entry for resources in the each
> > > domain/priority
> > > + * @cursor_list: The list of cursors currently traversing any of
> > > + * the sublists of @pos. Protected by the ttm device's lru_lock.
> > > *
> > > * Container for the current bulk move state. Should be used with
> > > * ttm_lru_bulk_move_init() and ttm_bo_set_bulk_move().
> > > @@ -315,8 +296,39 @@ struct ttm_lru_bulk_move_pos {
> > > */
> > > struct ttm_lru_bulk_move {
> > > struct ttm_lru_bulk_move_pos
> > > pos[TTM_NUM_MEM_TYPES][TTM_MAX_BO_PRIORITY];
> > > + struct list_head cursor_list;
> > > };
> > >
> > > +/**
> > > + * struct ttm_resource_cursor
> > > + * @man: The resource manager currently being iterated over
> > > + * @hitch: A hitch list node inserted before the next resource
> > > + * to iterate over.
> > > + * @bulk_link: A list link for the list of cursors traversing the
> > > + * bulk sublist of @bulk. Protected by the ttm device's lru_lock.
> > > + * @bulk: Pointer to struct ttm_lru_bulk_move whose subrange
> > > @hitch is
> > > + * inserted to. NULL if none. Never dereference this pointer since
> > > + * the struct ttm_lru_bulk_move object pointed to might have been
> > > + * freed. The pointer is only for comparison.
> > > + * @mem_type: The memory type of the LRU list being traversed.
> > > + * This field is valid iff @bulk != NULL.
> > > + * @priority: the current priority
> > > + *
> > > + * Cursor to iterate over the resources in a manager.
> > > + */
> > > +struct ttm_resource_cursor {
> > > + struct ttm_resource_manager *man;
> > > + struct ttm_lru_item hitch;
> > > + struct list_head bulk_link;
> > > + struct ttm_lru_bulk_move *bulk;
> > > + unsigned int mem_type;
> > > + unsigned int priority;
> > > +};
> > > +
> > > +void ttm_resource_cursor_fini_locked(struct ttm_resource_cursor
> > > *cursor);
> > > +
> > > +void ttm_resource_cursor_fini(struct ttm_resource_cursor *cursor);
> > > +
> > > /**
> > > * struct ttm_kmap_iter_iomap - Specialization for a struct
> > > io_mapping +
> > > * struct sg_table backed struct ttm_resource.
> > > @@ -405,6 +417,8 @@ ttm_resource_manager_cleanup(struct
> > > ttm_resource_manager *man)
> > >
> > > void ttm_lru_bulk_move_init(struct ttm_lru_bulk_move *bulk);
> > > void ttm_lru_bulk_move_tail(struct ttm_lru_bulk_move *bulk);
> > > +void ttm_lru_bulk_move_fini(struct ttm_device *bdev,
> > > + struct ttm_lru_bulk_move *bulk);
> > >
> > > void ttm_resource_add_bulk_move(struct ttm_resource *res,
> > > struct ttm_buffer_object *bo);
> > > --
> > > 2.44.0
> > >
>
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v5 05/12] drm/ttm: Provide a generic LRU walker helper
2024-06-19 7:31 ` Thomas Hellström
@ 2024-06-19 15:09 ` Matthew Brost
0 siblings, 0 replies; 36+ messages in thread
From: Matthew Brost @ 2024-06-19 15:09 UTC (permalink / raw)
To: Thomas Hellström
Cc: intel-xe, Christian König, Somalapuram Amaranath, dri-devel
On Wed, Jun 19, 2024 at 09:31:33AM +0200, Thomas Hellström wrote:
> Hi, Matthew.
>
> Thanks for reviewing.
>
> On Tue, 2024-06-18 at 22:11 +0000, Matthew Brost wrote:
> > On Tue, Jun 18, 2024 at 09:18:13AM +0200, Thomas Hellström wrote:
> >
> > Replying to correct version...
> >
> > > Provide a generic LRU walker in TTM, in the spirit of
> > > drm_gem_lru_scan()
> > > but building on the restartable TTM LRU functionality.
> > >
> > > The LRU walker optionally supports locking objects as part of
> > > a ww mutex locking transaction, to mimic to some extent the
> > > current functionality in ttm. However any -EDEADLK return
> > > is converted to -ENOMEM, so that the driver will need to back
> > > off and possibly retry without being able to keep the
> > > ticket.
> > >
> >
> > Wouldn't the backoff be unlock everything but keep the ticket?
>
> We can't do that (yet) since we don't have the drm_exec or similar
> functionality. The missing part is that if keep the ticket, it's in
> contended state which means we need to slow-lock the contending lock as
> the first lock. And the caller doesn't know which lock is the
> contending one....
>
> That is all addressed in the RFC part of the series that I left out for
> now. This is only trying to mimic current functionality.
>
Got it.
> >
> > > v3:
> > > - Move the helper to core ttm.
> > > - Remove the drm_exec usage from it for now, it will be
> > > reintroduced later in the series.
> > > v4:
> > > - Handle the -EALREADY case if ticketlocking.
> > >
> > > Cc: Christian König <christian.koenig@amd.com>
> > > Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
> > > Cc: Matthew Brost <matthew.brost@intel.com>
> > > Cc: <dri-devel@lists.freedesktop.org>
> > > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> > > ---
> > > drivers/gpu/drm/ttm/ttm_bo_util.c | 145
> > > ++++++++++++++++++++++++++++++
> > > include/drm/ttm/ttm_bo.h | 32 +++++++
> > > 2 files changed, 177 insertions(+)
> > >
> > > diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c
> > > b/drivers/gpu/drm/ttm/ttm_bo_util.c
> > > index 0b3f4267130c..45fcaf6f8644 100644
> > > --- a/drivers/gpu/drm/ttm/ttm_bo_util.c
> > > +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
> > > @@ -768,3 +768,148 @@ int ttm_bo_pipeline_gutting(struct
> > > ttm_buffer_object *bo)
> > > ttm_tt_destroy(bo->bdev, ttm);
> > > return ret;
> > > }
> > > +
> > > +static bool ttm_lru_walk_trylock(struct ttm_lru_walk *walk,
> > > + struct ttm_buffer_object *bo,
> > > + bool *needs_unlock)
> > > +{
> > > + struct ttm_operation_ctx *ctx = walk->ctx;
> > > +
> > > + *needs_unlock = false;
> > > +
> > > + if (dma_resv_trylock(bo->base.resv)) {
> > > + *needs_unlock = true;
> > > + return true;
> > > + }
> > > +
> > > + if (bo->base.resv == ctx->resv && ctx->allow_res_evict) {
> > > + dma_resv_assert_held(bo->base.resv);
> > > + return true;
> > > + }
> > > +i
> >
> > Any reason this is done after the try lock? Just kinda goofy as if
> > this
> > statement is true the dma_resv_trylock will always fail.
>
> It should work either way. I guess I had viewed it as "trylock first,
> if that fails, attempt any exception". I guess if we want to optimize
> performance for shared lock implementations, moving it first might
> avoid the atomic trylock operation, but I wouldn't expect a noticeable
> difference.
>
Agree it works either way.
> >
> > > + return false;
> > > +}
> > > +
> > > +static int ttm_lru_walk_ticketlock(struct ttm_lru_walk *walk,
> > > + struct ttm_buffer_object *bo,
> > > + bool *needs_unlock)
> > > +{
> > > + struct dma_resv *resv = bo->base.resv;
> > > + int ret;
> > > +
> >
> > I suppose we don't have asserts here like in Xe but if we did,
> > assert(walk->ticket)?
>
> I agree. I think we'd really want a TTM assert or warning that could be
> compiled away. In any case, I only expect a single caller of this
> function.
>
> >
> > > + if (walk->ctx->interruptible)
> > > + ret = dma_resv_lock_interruptible(resv, walk-
> > > >ticket);
> > > + else
> > > + ret = dma_resv_lock(resv, walk->ticket);
> > > +
> > > + if (!ret) {
> > > + *needs_unlock = true;
> > > + /* Only a single ticketlock per loop. */
> > > + walk->ticket = NULL;
> >
> > Can you explain this a bit more? I see that once the walk->ticket is
> > set
> > to NULL this function will not be called again (i.e. only try locking
> > will be used). I want to understand the reasoning for this.
> >
> > It might be helpful for a more lengthly explaination in the comments
> > of
> > the code too.
>
> I can add a more thorough explanation, Again, this is trying to mimic
> the current code, that does a walk of trylocking, then a single ticket
> lock more as a sort of "wait a while to be able to make progress" and
> then resorts to trylock again.
>
> The real reason to avoid multiple ticketlocks here is that each have a
> chance of failing with -EDEADLK, (in particular with the -EDEADLK
> injection enabled) which would translate to an -ENOMEM in the caller.
>
Makes sense.
> >
> > > + } else if (ret == -EDEADLK) {
> > > + /* Caller needs to exit the ww transaction. */
> > > + ret = -ENOSPC;
> >
> > The commit message says -ENOMEM.
>
> The -ENOSPC is converted to -ENOMEM for the driver in
> ttm_bo_validate(). I could explain a bit more in the commit message.
>
Forgot about that.
> >
> > > + }
> > > +
> > > + return ret;
> > > +}
> > > +
> > > +static void ttm_lru_walk_unlock(struct ttm_buffer_object *bo, bool
> > > locked)
> > > +{
> > > + if (locked)
> > > + dma_resv_unlock(bo->base.resv);
> > > +}
> > > +
> > > +/**
> > > + * ttm_lru_walk_for_evict() - Perform a LRU list walk, with
> > > actions taken on
> > > + * valid items.
> > > + * @walk: describe the walks and actions taken
> > > + * @bdev: The TTM device.
> > > + * @man: The struct ttm_resource manager whose LRU lists we're
> > > walking.
> > > + * @target: The end condition for the walk.
> > > + *
> > > + * The LRU lists of @man are walk, and for each struct
> > > ttm_resource encountered,
> > > + * the corresponding ttm_buffer_object is locked and taken a
> > > reference on, and
> > > + * the LRU lock is dropped. the LRU lock may be dropped before
> > > locking and, in
> > > + * that case, it's verified that the item actually remains on the
> > > LRU list after
> > > + * the lock, and that the buffer object didn't switch resource in
> > > between.
> > > + *
> > > + * With a locked object, the actions indicated by @walk-
> > > >process_bo are
> > > + * performed, and after that, the bo is unlocked, the refcount
> > > dropped and the
> > > + * next struct ttm_resource is processed. Here, the walker relies
> > > on
> > > + * TTM's restartable LRU list implementation.
> > > + *
> > > + * Typically @walk->process_bo() would return the number of pages
> > > evicted,
> > > + * swapped or shrunken, so that when the total exceeds @target, or
> > > when the
> > > + * LRU list has been walked in full, iteration is terminated. It's
> > > also terminated
> > > + * on error. Note that the definition of @target is done by the
> > > caller, it
> > > + * could have a different meaning than the number of pages.
> > > + *
> > > + * Note that the way dma_resv individualization is done, locking
> > > needs to be done
> > > + * either with the LRU lock held (trylocking only) or with a
> > > reference on the
> > > + * object.
> > > + *
> > > + * Return: The progress made towards target or negative error code
> > > on error.
> > > + */
> > > +long ttm_lru_walk_for_evict(struct ttm_lru_walk *walk, struct
> > > ttm_device *bdev,
> > > + struct ttm_resource_manager *man, long
> > > target)
> > > +{
> > > + struct ttm_resource_cursor cursor;
> > > + struct ttm_resource *res;
> > > + long sofar = 0;
> >
> > s/sofar/evicted?
>
> That's not always the case. When used for eviction it is actually 0 if
> the new allocation failed, 1 on success. It should be interpreted as
> "progress towards target", so perhaps progress?
>
progress sounds good.
> >
> > > + long lret;
> > > +
> > > + spin_lock(&bdev->lru_lock);
> > > + ttm_resource_manager_for_each_res(man, &cursor, res) {
> > > + struct ttm_buffer_object *bo = res->bo;
> > > + bool bo_needs_unlock = false;
> > > + bool bo_locked = false;
> > > + int mem_type;
> > > +
> > > + if (!bo || bo->resource != res)
> > > + continue;
> > > +
> > > + if (ttm_lru_walk_trylock(walk, bo,
> > > &bo_needs_unlock))
> > > + bo_locked = true;
> > > + else if ((!walk->ticket) || walk->ctx->no_wait_gpu
> > > ||
> >
> > Nit - (!walk->ticket) could just be !walk->ticket.
>
> Will fix.
>
> >
> > > + walk->trylock_only)
> > > + continue;
> > > +
> > > + if (!ttm_bo_get_unless_zero(bo)) {
> > > + ttm_lru_walk_unlock(bo, bo_needs_unlock);
> > > + continue;
> > > + }
> > > +
> >
> > This kinda goofy pattern too, typically in code a get_unless_zero is
> > done before trying to lock the object not after. Even odder here, the
> > could or could not be locked depending on the outcome of
> > ttm_lru_walk_trylock. This is covering individualization case? Would
> > it
> > make more sense to move ttm_bo_get_unless_zero before the try lock or
> > is
> > that to avoid a put on try lock failure + continue?
>
> I guess this is still a remnant from the old code: ttm_bos can't be put
> in atomic context, so we'd had to unlock the lru_lock to put ( which we
> still do). However, without the restartable lists that we have with
> this series, list traversal would have to be reset.
>
> If we were to change the order of trylock and get_unless_zero now, we
> could do that, but that would mean unnecessary refcounting and dropping
> the lru_lock in the case of trylock failure.
>
Missed the putting in atomic context not allowed. Seems fine as is.
>
> >
> > > + mem_type = res->mem_type;
> > > + spin_unlock(&bdev->lru_lock);
> > > +
> > > + lret = 0;
> > > + if (!bo_locked && walk->ticket)
> >
> > As above could you explain the ticket usage a bit more?
> >
> > Also you shouldn't need to check the ticket here there is !walk-
> > >ticket
> > above which triggers a continue.
>
> I hope I explained sufficiently above. Please get back otherwise, I'll
> remove the walk->ticket check.
>
You did explain sufficiently.
> >
> > > + lret = ttm_lru_walk_ticketlock(walk, bo,
> > > &bo_needs_unlock);
> > > +
> > > + /*
> > > + * Note that in between the release of the lru
> > > lock and the
> > > + * ticketlock, the bo may have switched resource,
> > > + * and also memory type, since the resource may
> > > have been
> > > + * freed and allocated again with a different
> > > memory type.
> > > + * In that case, just skip it.
> > > + */
> > > + if (!lret && bo->resource == res && res->mem_type
> > > == mem_type)
> > > + lret = walk->ops->process_bo(walk, bo);
> > > +
> > > + ttm_lru_walk_unlock(bo, bo_needs_unlock);
> > > + ttm_bo_put(bo);
> > > + if (lret == -EBUSY || lret == -EALREADY)
> > > + lret = 0;
> >
> > What is usage of these error codes?
> >
> > -EALREADY means the resv is locked with the current ticket, right?
> > Wouldn't we want to call process_bo in this case too?
>
> No, then we might evict our own working set. Processing of shared bos
> is handled as before with ctx->allow_res_evict.
>
Ah, yes. Makes sense.
> >
> > -EBUSY I need some help figuring out.
>
> -EBUSY is the return of ttm_bo_wait_ctx() in case we're in no-wait-gpu
> context. Like direct reclaim. If the bo is then busy, we simply skip to
> the next bo. If process_bo() waits for gpu idle using the above
> function, this is to catch that error code.
> Should probably add that to the process_bo() docs.
>
> >
> > > + sofar = (lret < 0) ? lret : sofar + lret;
> > > + if (sofar < 0 || sofar >= target)
> > > + goto out;
> > > +
> >
> > Here we have dropped the BO unlock. What prevents the BO from being
> > moved back to the resource we just evicted it from resulting in sofar
> > not being accurate?
>
> For eviction, the byte-count is not used, but rather the success of
> allocating the new resource.
>
> For shrinking, any process could allocate what we just shrunk, and even
> so shrinking does not always mean that the memory is immediately
> available so the byte-count will always be a rough estimate.
>
> A related question is "what prevents anyone else from stealing memory
> that we just evicted", and the answer to that is "Nothing... yet". The
> exhaustive eviction part handles that with drm_exec keeping the bo
> locks of evicted objects until we make progress. Eventually we'd hold
> enough locks to block all other competitors.
>
> Unrelated to this patch, me and Christian had a discussion on whether
> to unlock those when we made progress in the sense of
>
> a) A validation succeeded,
> b) An exec submission succeeded.
>
Thanks all of the explainations, makes more sense.
Patch LGTM aside from a couple of nits, with that:
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
> /Thomas
>
> >
> > Matt
> >
> > > + cond_resched();
> > > + spin_lock(&bdev->lru_lock);
> > > + }
> > > + spin_unlock(&bdev->lru_lock);
> > > +out:
> > > + ttm_resource_cursor_fini(&cursor);
> > > + return sofar;
> > > +}
> > > diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h
> > > index 6ccf96c91f3a..8b032298d66e 100644
> > > --- a/include/drm/ttm/ttm_bo.h
> > > +++ b/include/drm/ttm/ttm_bo.h
> > > @@ -190,6 +190,38 @@ struct ttm_operation_ctx {
> > > uint64_t bytes_moved;
> > > };
> > >
> > > +struct ttm_lru_walk;
> > > +
> > > +/** struct ttm_lru_walk_ops - Operations for a LRU walk. */
> > > +struct ttm_lru_walk_ops {
> > > + /**
> > > + * process_bo - Process this bo.
> > > + * @walk: struct ttm_lru_walk describing the walk.
> > > + * @bo: A locked and referenced buffer object.
> > > + *
> > > + * Return: Negative error code on error, Number of
> > > processed pages on
> > > + * success. 0 also indicates success.
> > > + */
> > > + long (*process_bo)(struct ttm_lru_walk *walk, struct
> > > ttm_buffer_object *bo);
> > > +};
> > > +
> > > +/**
> > > + * struct ttm_lru_walk - Structure describing a LRU walk.
> > > + */
> > > +struct ttm_lru_walk {
> > > + /** @ops: Pointer to the ops structure. */
> > > + const struct ttm_lru_walk_ops *ops;
> > > + /** @ctx: Pointer to the struct ttm_operation_ctx. */
> > > + struct ttm_operation_ctx *ctx;
> > > + /** @ticket: The struct ww_acquire_ctx if any. */
> > > + struct ww_acquire_ctx *ticket;
> > > + /** @tryock_only: Only use trylock for locking. */
> > > + bool trylock_only;
> > > +};
> > > +
> > > +long ttm_lru_walk_for_evict(struct ttm_lru_walk *walk, struct
> > > ttm_device *bdev,
> > > + struct ttm_resource_manager *man, long
> > > target);
> > > +
> > > /**
> > > * ttm_bo_get - reference a struct ttm_buffer_object
> > > *
> > > --
> > > 2.44.0
> > >
>
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v5 07/12] drm/ttm: Use the LRU walker for eviction
2024-06-18 7:18 ` [PATCH v5 07/12] drm/ttm: Use the LRU walker for eviction Thomas Hellström
@ 2024-06-19 22:52 ` Matthew Brost
2024-06-24 9:06 ` Thomas Hellström
2024-06-19 23:33 ` Matthew Brost
1 sibling, 1 reply; 36+ messages in thread
From: Matthew Brost @ 2024-06-19 22:52 UTC (permalink / raw)
To: Thomas Hellström
Cc: intel-xe, Christian König, Somalapuram Amaranath, dri-devel
On Tue, Jun 18, 2024 at 09:18:15AM +0200, Thomas Hellström wrote:
> Use the LRU walker for eviction. This helps
> removing a lot of code with weird locking
> semantics.
>
> The functionality is slightly changed so that
> when trylocked buffer objects are exhausted, we
> continue to interleave walks with ticket-locks while
> there is still progress made. The list walks are
> not restarted in-between evictions.
>
> Also provide a separate ttm_bo_evict_first()
> function for its single user. The context of that
> user allows sleeping dma_resv locks.
>
I'm inclined to RB this as I think I've made sense of it all but just
have a few questions / nits first + one small bug.
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> Cc: <dri-devel@lists.freedesktop.org>
> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> ---
> drivers/gpu/drm/ttm/ttm_bo.c | 350 ++++++++++++-----------------
> drivers/gpu/drm/ttm/ttm_resource.c | 20 +-
> include/drm/ttm/ttm_bo.h | 8 +-
> 3 files changed, 145 insertions(+), 233 deletions(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
> index 63a91b77f7da..316afe19a325 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> @@ -224,80 +224,6 @@ static void ttm_bo_flush_all_fences(struct ttm_buffer_object *bo)
> dma_resv_iter_end(&cursor);
> }
>
> -/**
> - * ttm_bo_cleanup_refs
> - * If bo idle, remove from lru lists, and unref.
> - * If not idle, block if possible.
> - *
> - * Must be called with lru_lock and reservation held, this function
> - * will drop the lru lock and optionally the reservation lock before returning.
> - *
> - * @bo: The buffer object to clean-up
> - * @interruptible: Any sleeps should occur interruptibly.
> - * @no_wait_gpu: Never wait for gpu. Return -EBUSY instead.
> - * @unlock_resv: Unlock the reservation lock as well.
> - */
> -
> -static int ttm_bo_cleanup_refs(struct ttm_buffer_object *bo,
> - bool interruptible, bool no_wait_gpu,
> - bool unlock_resv)
> -{
> - struct dma_resv *resv = &bo->base._resv;
> - int ret;
> -
> - if (dma_resv_test_signaled(resv, DMA_RESV_USAGE_BOOKKEEP))
> - ret = 0;
> - else
> - ret = -EBUSY;
> -
> - if (ret && !no_wait_gpu) {
> - long lret;
> -
> - if (unlock_resv)
> - dma_resv_unlock(bo->base.resv);
> - spin_unlock(&bo->bdev->lru_lock);
> -
> - lret = dma_resv_wait_timeout(resv, DMA_RESV_USAGE_BOOKKEEP,
> - interruptible,
> - 30 * HZ);
> -
> - if (lret < 0)
> - return lret;
> - else if (lret == 0)
> - return -EBUSY;
> -
> - spin_lock(&bo->bdev->lru_lock);
> - if (unlock_resv && !dma_resv_trylock(bo->base.resv)) {
> - /*
> - * We raced, and lost, someone else holds the reservation now,
> - * and is probably busy in ttm_bo_cleanup_memtype_use.
> - *
> - * Even if it's not the case, because we finished waiting any
> - * delayed destruction would succeed, so just return success
> - * here.
> - */
> - spin_unlock(&bo->bdev->lru_lock);
> - return 0;
> - }
> - ret = 0;
> - }
> -
> - if (ret) {
> - if (unlock_resv)
> - dma_resv_unlock(bo->base.resv);
> - spin_unlock(&bo->bdev->lru_lock);
> - return ret;
> - }
> -
> - spin_unlock(&bo->bdev->lru_lock);
> - ttm_bo_cleanup_memtype_use(bo);
> -
> - if (unlock_resv)
> - dma_resv_unlock(bo->base.resv);
> -
> - return 0;
> -}
> -
> /*
> * Block for the dma_resv object to become idle, lock the buffer and clean up
> * the resource and tt object.
> @@ -505,151 +431,154 @@ bool ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
> }
> EXPORT_SYMBOL(ttm_bo_eviction_valuable);
>
> -/*
> - * Check the target bo is allowable to be evicted or swapout, including cases:
> - *
> - * a. if share same reservation object with ctx->resv, have assumption
> - * reservation objects should already be locked, so not lock again and
> - * return true directly when either the opreation allow_reserved_eviction
> - * or the target bo already is in delayed free list;
> +/**
> + * ttm_bo_evict_first() - Evict the first bo on the manager's LRU list.
> + * @bdev: The ttm device.
> + * @man: The manager whose bo to evict.
> + * @ctx: The TTM operation ctx governing the eviction.
> *
> - * b. Otherwise, trylock it.
> + * Return: 0 if successful or the resource disappeared. Negative error code on error.
> */
> -static bool ttm_bo_evict_swapout_allowable(struct ttm_buffer_object *bo,
> - struct ttm_operation_ctx *ctx,
> - const struct ttm_place *place,
> - bool *locked, bool *busy)
> +int ttm_bo_evict_first(struct ttm_device *bdev, struct ttm_resource_manager *man,
> + struct ttm_operation_ctx *ctx)
> {
> - bool ret = false;
> + struct ttm_resource_cursor cursor;
> + struct ttm_buffer_object *bo;
> + struct ttm_resource *res;
> + unsigned int mem_type;
> + int ret = 0;
>
> - if (bo->pin_count) {
> - *locked = false;
> - if (busy)
> - *busy = false;
> - return false;
> + spin_lock(&bdev->lru_lock);
> + res = ttm_resource_manager_first(man, &cursor);
> + if (!res) {
> + ret = -ENOENT;
Nit, this assignment is not needed a out_no_ref just returns -ENOENT.
> + goto out_no_ref;
> }
> + bo = res->bo;
> + if (!ttm_bo_get_unless_zero(bo))
> + goto out_no_ref;
> + mem_type = res->mem_type;
> + spin_unlock(&bdev->lru_lock);
> + ret = ttm_bo_reserve(bo, ctx->interruptible, ctx->no_wait_gpu, NULL);
> + if (ret)
> + goto out_no_lock;
> + if (bo->resource != res || res->mem_type != mem_type)
So 'bo->resource != res' is checking between dropping of the LRU lock
and grabbing the dma-resv lock in ttm_bo_reserve, the BO's backing
resource has changed (i.e. someone else could've evicted to BO). Is
that correct? Also in this case 'res' could be stale memory and not safe
to dereference, right?
I'm confused about 'res->mem_type != mem_type' though. Looking through
the code is res->mem_type not immutable? I think I only see
res->mem_type assigned in ttm_resource_init.
> + goto out_bad_res;
s/out_bad_res/out_bo_moved
Would that be more accurate?
>
> - if (bo->base.resv == ctx->resv) {
> - dma_resv_assert_held(bo->base.resv);
> - if (ctx->allow_res_evict)
> - ret = true;
> - *locked = false;
> - if (busy)
> - *busy = false;
> + if (bo->deleted) {
> + ret = ttm_bo_wait_ctx(bo, ctx);
> + if (ret)
This should be 'if (!ret)', right? We should cleanup once the BO is
idle.
> + ttm_bo_cleanup_memtype_use(bo);
> } else {
> - ret = dma_resv_trylock(bo->base.resv);
> - *locked = ret;
> - if (busy)
> - *busy = !ret;
> - }
> -
> - if (ret && place && (bo->resource->mem_type != place->mem_type ||
> - !bo->bdev->funcs->eviction_valuable(bo, place))) {
> - ret = false;
> - if (*locked) {
> - dma_resv_unlock(bo->base.resv);
> - *locked = false;
> - }
> + ret = ttm_bo_evict(bo, ctx);
> }
> -
> +out_bad_res:
> + dma_resv_unlock(bo->base.resv);
> +out_no_lock:
> + ttm_bo_put(bo);
> + ttm_resource_cursor_fini(&cursor);
> return ret;
> +
> +out_no_ref:
> + ttm_resource_cursor_fini_locked(&cursor);
> + spin_unlock(&bdev->lru_lock);
> + return -ENOENT;
> }
>
> /**
> - * ttm_mem_evict_wait_busy - wait for a busy BO to become available
> - *
> - * @busy_bo: BO which couldn't be locked with trylock
> - * @ctx: operation context
> - * @ticket: acquire ticket
> - *
> - * Try to lock a busy buffer object to avoid failing eviction.
> + * struct ttm_bo_evict_walk - Parameters for the evict walk.
> */
> -static int ttm_mem_evict_wait_busy(struct ttm_buffer_object *busy_bo,
> - struct ttm_operation_ctx *ctx,
> - struct ww_acquire_ctx *ticket)
> -{
> - int r;
> -
> - if (!busy_bo || !ticket)
> - return -EBUSY;
> -
> - if (ctx->interruptible)
> - r = dma_resv_lock_interruptible(busy_bo->base.resv,
> - ticket);
> - else
> - r = dma_resv_lock(busy_bo->base.resv, ticket);
> -
> - /*
> - * TODO: It would be better to keep the BO locked until allocation is at
> - * least tried one more time, but that would mean a much larger rework
> - * of TTM.
> - */
> - if (!r)
> - dma_resv_unlock(busy_bo->base.resv);
> -
> - return r == -EDEADLK ? -EBUSY : r;
> -}
> +struct ttm_bo_evict_walk {
> + /** @walk: The walk base parameters. */
> + struct ttm_lru_walk walk;
> + /** @place: The place passed to the resource allocation. */
> + const struct ttm_place *place;
> + /** @evictor: The buffer object we're trying to make room for. */
> + struct ttm_buffer_object *evictor;
> + /** @res: The allocated resource if any. */
> + struct ttm_resource **res;
> + /** @evicted: The number of evicted pages. */
s/pages/BOs or resources
Another option would be 'forward_progess' or something like that given
the usage in this patch.
> + unsigned long evicted;
> +};
>
> -int ttm_mem_evict_first(struct ttm_device *bdev,
> - struct ttm_resource_manager *man,
> - const struct ttm_place *place,
> - struct ttm_operation_ctx *ctx,
> - struct ww_acquire_ctx *ticket)
> +static long ttm_bo_evict_cb(struct ttm_lru_walk *walk, struct ttm_buffer_object *bo)
> {
> - struct ttm_buffer_object *bo = NULL, *busy_bo = NULL;
> - struct ttm_resource_cursor cursor;
> - struct ttm_resource *res;
> - bool locked = false;
> - int ret;
> + struct ttm_bo_evict_walk *evict_walk =
> + container_of(walk, typeof(*evict_walk), walk);
> + long lret;
>
> - spin_lock(&bdev->lru_lock);
> - ttm_resource_manager_for_each_res(man, &cursor, res) {
> - bool busy;
> -
> - if (!ttm_bo_evict_swapout_allowable(res->bo, ctx, place,
> - &locked, &busy)) {
> - if (busy && !busy_bo && ticket !=
> - dma_resv_locking_ctx(res->bo->base.resv))
> - busy_bo = res->bo;
> - continue;
> - }
> + if (!bo->bdev->funcs->eviction_valuable(bo, evict_walk->place))
> + return 0;
>
> - if (ttm_bo_get_unless_zero(res->bo)) {
> - bo = res->bo;
> - break;
> - }
> - if (locked)
> - dma_resv_unlock(res->bo->base.resv);
> + if (bo->deleted) {
> + lret = ttm_bo_wait_ctx(bo, walk->ctx);
> + if (!lret)
> + ttm_bo_cleanup_memtype_use(bo);
> + } else {
> + lret = ttm_bo_evict(bo, walk->ctx);
> }
> - ttm_resource_cursor_fini_locked(&cursor);
>
> - if (!bo) {
> - if (busy_bo && !ttm_bo_get_unless_zero(busy_bo))
> - busy_bo = NULL;
> - spin_unlock(&bdev->lru_lock);
> - ret = ttm_mem_evict_wait_busy(busy_bo, ctx, ticket);
> - if (busy_bo)
> - ttm_bo_put(busy_bo);
> - return ret;
> - }
> + if (lret)
> + goto out;
>
> - if (bo->deleted) {
> - ret = ttm_bo_cleanup_refs(bo, ctx->interruptible,
> - ctx->no_wait_gpu, locked);
> - ttm_bo_put(bo);
> - return ret;
> - }
> + evict_walk->evicted++;
> + if (evict_walk->res)
> + lret = ttm_resource_alloc(evict_walk->evictor, evict_walk->place,
> + evict_walk->res);
> + if (lret == 0)
> + return 1;
> +out:
> + /* Errors that should terminate the walk. */
> + if (lret == -ENOMEM || lret == -EINTR || lret == -ERESTARTSYS ||
> + lret == -EAGAIN)
> + return lret;
Same comment as the previous patch, the inverse of this might be more
clear. Also if the condition is the same, a helper may make sense.
>
> - spin_unlock(&bdev->lru_lock);
> + return 0;
> +}
>
> - ret = ttm_bo_evict(bo, ctx);
> - if (locked)
> - ttm_bo_unreserve(bo);
> - else
> - ttm_bo_move_to_lru_tail_unlocked(bo);
> +static const struct ttm_lru_walk_ops ttm_evict_walk_ops = {
> + .process_bo = ttm_bo_evict_cb,
> +};
>
> - ttm_bo_put(bo);
> - return ret;
> +static int ttm_bo_evict_alloc(struct ttm_device *bdev,
> + struct ttm_resource_manager *man,
> + const struct ttm_place *place,
> + struct ttm_buffer_object *evictor,
> + struct ttm_operation_ctx *ctx,
> + struct ww_acquire_ctx *ticket,
> + struct ttm_resource **res)
> +{
> + struct ttm_bo_evict_walk evict_walk = {
> + .walk = {
> + .ops = &ttm_evict_walk_ops,
> + .ctx = ctx,
> + .ticket = ticket,
> + },
> + .place = place,
> + .evictor = evictor,
> + .res = res,
> + };
> + long lret;
> +
> + evict_walk.walk.trylock_only = true;
> + lret = ttm_lru_walk_for_evict(&evict_walk.walk, bdev, man, 1);
> + if (lret || !ticket)
> + goto out;
> +
> + /* If ticket-locking, repeat while making progress. */
> + evict_walk.walk.trylock_only = false;
> + do {
> + /* The walk may clear the evict_walk.walk.ticket field */
> + evict_walk.walk.ticket = ticket;
> + evict_walk.evicted = 0;
> + lret = ttm_lru_walk_for_evict(&evict_walk.walk, bdev, man, 1);
> + } while (!lret && evict_walk.evicted);
> +out:
> + if (lret < 0)
> + return lret;
> + if (lret == 0)
> + return -EBUSY;
> + return 0;
> }
>
> /**
> @@ -760,6 +689,7 @@ static int ttm_bo_alloc_resource(struct ttm_buffer_object *bo,
> for (i = 0; i < placement->num_placement; ++i) {
> const struct ttm_place *place = &placement->placement[i];
> struct ttm_resource_manager *man;
> + bool may_evict;
>
> man = ttm_manager_type(bdev, place->mem_type);
> if (!man || !ttm_resource_manager_used(man))
> @@ -769,22 +699,21 @@ static int ttm_bo_alloc_resource(struct ttm_buffer_object *bo,
> TTM_PL_FLAG_FALLBACK))
> continue;
>
> - do {
> - ret = ttm_resource_alloc(bo, place, res);
> - if (unlikely(ret && ret != -ENOSPC))
> + may_evict = (force_space && place->mem_type != TTM_PL_SYSTEM);
> + ret = ttm_resource_alloc(bo, place, res);
> + if (ret) {
> + if (ret != -ENOSPC)
> return ret;
> - if (likely(!ret) || !force_space)
> - break;
> -
> - ret = ttm_mem_evict_first(bdev, man, place, ctx,
> - ticket);
> - if (unlikely(ret == -EBUSY))
> - break;
> - if (unlikely(ret))
> + if (!may_evict)
> + continue;
> +
> + ret = ttm_bo_evict_alloc(bdev, man, place, bo, ctx,
> + ticket, res);
> + if (ret == -EBUSY)
> + continue;
> + if (ret)
> return ret;
> - } while (1);
> - if (ret)
> - continue;
> + }
>
> ret = ttm_bo_add_move_fence(bo, man, ctx->no_wait_gpu);
> if (unlikely(ret)) {
> @@ -796,7 +725,6 @@ static int ttm_bo_alloc_resource(struct ttm_buffer_object *bo,
> }
> return 0;
> }
> -
Nit, seems unrelated.
Matt
> return -ENOSPC;
> }
>
> diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c
> index a03090683e79..6d0c66fc36e3 100644
> --- a/drivers/gpu/drm/ttm/ttm_resource.c
> +++ b/drivers/gpu/drm/ttm/ttm_resource.c
> @@ -508,24 +508,10 @@ int ttm_resource_manager_evict_all(struct ttm_device *bdev,
> };
> struct dma_fence *fence;
> int ret;
> - unsigned i;
> -
> - /*
> - * Can't use standard list traversal since we're unlocking.
> - */
>
> - spin_lock(&bdev->lru_lock);
> - for (i = 0; i < TTM_MAX_BO_PRIORITY; ++i) {
> - while (!list_empty(&man->lru[i])) {
> - spin_unlock(&bdev->lru_lock);
> - ret = ttm_mem_evict_first(bdev, man, NULL, &ctx,
> - NULL);
> - if (ret)
> - return ret;
> - spin_lock(&bdev->lru_lock);
> - }
> - }
> - spin_unlock(&bdev->lru_lock);
> + do {
> + ret = ttm_bo_evict_first(bdev, man, &ctx);
> + } while (!ret);
>
> spin_lock(&man->move_lock);
> fence = dma_fence_get(man->move);
> diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h
> index 472a55b69afb..148f49f625e4 100644
> --- a/include/drm/ttm/ttm_bo.h
> +++ b/include/drm/ttm/ttm_bo.h
> @@ -415,11 +415,9 @@ long ttm_bo_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx,
> pgoff_t target);
> void ttm_bo_pin(struct ttm_buffer_object *bo);
> void ttm_bo_unpin(struct ttm_buffer_object *bo);
> -int ttm_mem_evict_firevictedst(struct ttm_device *bdev,
> - struct ttm_resource_manager *man,
> - const struct ttm_place *place,
> - struct ttm_operation_ctx *ctx,
> - struct ww_acquire_ctx *ticket);
> +int ttm_bo_evict_first(struct ttm_device *bdev,
> + struct ttm_resource_manager *man,
> + struct ttm_operation_ctx *ctx);
> vm_fault_t ttm_bo_vm_reserve(struct ttm_buffer_object *bo,
> struct vm_fault *vmf);
> vm_fault_t ttm_bo_vm_fault_reserved(struct vm_fault *vmf,
> --
> 2.44.0
>
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v5 07/12] drm/ttm: Use the LRU walker for eviction
2024-06-18 7:18 ` [PATCH v5 07/12] drm/ttm: Use the LRU walker for eviction Thomas Hellström
2024-06-19 22:52 ` Matthew Brost
@ 2024-06-19 23:33 ` Matthew Brost
2024-06-24 9:16 ` Thomas Hellström
1 sibling, 1 reply; 36+ messages in thread
From: Matthew Brost @ 2024-06-19 23:33 UTC (permalink / raw)
To: Thomas Hellström
Cc: intel-xe, Christian König, Somalapuram Amaranath, dri-devel
On Tue, Jun 18, 2024 at 09:18:15AM +0200, Thomas Hellström wrote:
> Use the LRU walker for eviction. This helps
> removing a lot of code with weird locking
> semantics.
>
> The functionality is slightly changed so that
> when trylocked buffer objects are exhausted, we
> continue to interleave walks with ticket-locks while
> there is still progress made. The list walks are
> not restarted in-between evictions.
>
> Also provide a separate ttm_bo_evict_first()
> function for its single user. The context of that
> user allows sleeping dma_resv locks.
>
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> Cc: <dri-devel@lists.freedesktop.org>
> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> ---
> drivers/gpu/drm/ttm/ttm_bo.c | 350 ++++++++++++-----------------
> drivers/gpu/drm/ttm/ttm_resource.c | 20 +-
> include/drm/ttm/ttm_bo.h | 8 +-
> 3 files changed, 145 insertions(+), 233 deletions(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
> index 63a91b77f7da..316afe19a325 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> @@ -224,80 +224,6 @@ static void ttm_bo_flush_all_fences(struct ttm_buffer_object *bo)
> dma_resv_iter_end(&cursor);
> }
>
> -/**
> - * ttm_bo_cleanup_refs
> - * If bo idle, remove from lru lists, and unref.
> - * If not idle, block if possible.
> - *
> - * Must be called with lru_lock and reservation held, this function
> - * will drop the lru lock and optionally the reservation lock before returning.
> - *
> - * @bo: The buffer object to clean-up
> - * @interruptible: Any sleeps should occur interruptibly.
> - * @no_wait_gpu: Never wait for gpu. Return -EBUSY instead.
> - * @unlock_resv: Unlock the reservation lock as well.
> - */
> -
> -static int ttm_bo_cleanup_refs(struct ttm_buffer_object *bo,
> - bool interruptible, bool no_wait_gpu,
> - bool unlock_resv)
> -{
> - struct dma_resv *resv = &bo->base._resv;
> - int ret;
> -
> - if (dma_resv_test_signaled(resv, DMA_RESV_USAGE_BOOKKEEP))
> - ret = 0;
> - else
> - ret = -EBUSY;
> -
> - if (ret && !no_wait_gpu) {
> - long lret;
> -
> - if (unlock_resv)
> - dma_resv_unlock(bo->base.resv);
> - spin_unlock(&bo->bdev->lru_lock);
> -
> - lret = dma_resv_wait_timeout(resv, DMA_RESV_USAGE_BOOKKEEP,
> - interruptible,
> - 30 * HZ);
> -
> - if (lret < 0)
> - return lret;
> - else if (lret == 0)
> - return -EBUSY;
> -
> - spin_lock(&bo->bdev->lru_lock);
> - if (unlock_resv && !dma_resv_trylock(bo->base.resv)) {
> - /*
> - * We raced, and lost, someone else holds the reservation now,
> - * and is probably busy in ttm_bo_cleanup_memtype_use.
> - *
> - * Even if it's not the case, because we finished waiting any
> - * delayed destruction would succeed, so just return success
> - * here.
> - */
> - spin_unlock(&bo->bdev->lru_lock);
> - return 0;
> - }
> - ret = 0;
> - }
> -
> - if (ret) {
> - if (unlock_resv)
> - dma_resv_unlock(bo->base.resv);
> - spin_unlock(&bo->bdev->lru_lock);
> - return ret;
> - }
> -
> - spin_unlock(&bo->bdev->lru_lock);
> - ttm_bo_cleanup_memtype_use(bo);
> -
> - if (unlock_resv)
> - dma_resv_unlock(bo->base.resv);
> -
> - return 0;
> -}
> -
> /*
> * Block for the dma_resv object to become idle, lock the buffer and clean up
> * the resource and tt object.
> @@ -505,151 +431,154 @@ bool ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
> }
> EXPORT_SYMBOL(ttm_bo_eviction_valuable);
>
> -/*
> - * Check the target bo is allowable to be evicted or swapout, including cases:
> - *
> - * a. if share same reservation object with ctx->resv, have assumption
> - * reservation objects should already be locked, so not lock again and
> - * return true directly when either the opreation allow_reserved_eviction
> - * or the target bo already is in delayed free list;
> +/**
> + * ttm_bo_evict_first() - Evict the first bo on the manager's LRU list.
> + * @bdev: The ttm device.
> + * @man: The manager whose bo to evict.
> + * @ctx: The TTM operation ctx governing the eviction.
> *
> - * b. Otherwise, trylock it.
> + * Return: 0 if successful or the resource disappeared. Negative error code on error.
> */
> -static bool ttm_bo_evict_swapout_allowable(struct ttm_buffer_object *bo,
> - struct ttm_operation_ctx *ctx,
> - const struct ttm_place *place,
> - bool *locked, bool *busy)
> +int ttm_bo_evict_first(struct ttm_device *bdev, struct ttm_resource_manager *man,
> + struct ttm_operation_ctx *ctx)
> {
> - bool ret = false;
> + struct ttm_resource_cursor cursor;
> + struct ttm_buffer_object *bo;
> + struct ttm_resource *res;
> + unsigned int mem_type;
> + int ret = 0;
>
> - if (bo->pin_count) {
> - *locked = false;
> - if (busy)
> - *busy = false;
> - return false;
> + spin_lock(&bdev->lru_lock);
> + res = ttm_resource_manager_first(man, &cursor);
> + if (!res) {
> + ret = -ENOENT;
> + goto out_no_ref;
> }
> + bo = res->bo;
> + if (!ttm_bo_get_unless_zero(bo))
> + goto out_no_ref;
> + mem_type = res->mem_type;
> + spin_unlock(&bdev->lru_lock);
> + ret = ttm_bo_reserve(bo, ctx->interruptible, ctx->no_wait_gpu, NULL);
> + if (ret)
> + goto out_no_lock;
> + if (bo->resource != res || res->mem_type != mem_type)
> + goto out_bad_res;
>
> - if (bo->base.resv == ctx->resv) {
> - dma_resv_assert_held(bo->base.resv);
> - if (ctx->allow_res_evict)
> - ret = true;
> - *locked = false;
> - if (busy)
> - *busy = false;
> + if (bo->deleted) {
> + ret = ttm_bo_wait_ctx(bo, ctx);
> + if (ret)
> + ttm_bo_cleanup_memtype_use(bo);
> } else {
> - ret = dma_resv_trylock(bo->base.resv);
> - *locked = ret;
> - if (busy)
> - *busy = !ret;
> - }
> -
> - if (ret && place && (bo->resource->mem_type != place->mem_type ||
> - !bo->bdev->funcs->eviction_valuable(bo, place))) {
> - ret = false;
> - if (*locked) {
> - dma_resv_unlock(bo->base.resv);
> - *locked = false;
> - }
> + ret = ttm_bo_evict(bo, ctx);
> }
> -
> +out_bad_res:
> + dma_resv_unlock(bo->base.resv);
> +out_no_lock:
> + ttm_bo_put(bo);
> + ttm_resource_cursor_fini(&cursor);
> return ret;
> +
> +out_no_ref:
> + ttm_resource_cursor_fini_locked(&cursor);
> + spin_unlock(&bdev->lru_lock);
> + return -ENOENT;
> }
>
> /**
> - * ttm_mem_evict_wait_busy - wait for a busy BO to become available
> - *
> - * @busy_bo: BO which couldn't be locked with trylock
> - * @ctx: operation context
> - * @ticket: acquire ticket
> - *
> - * Try to lock a busy buffer object to avoid failing eviction.
> + * struct ttm_bo_evict_walk - Parameters for the evict walk.
> */
> -static int ttm_mem_evict_wait_busy(struct ttm_buffer_object *busy_bo,
> - struct ttm_operation_ctx *ctx,
> - struct ww_acquire_ctx *ticket)
> -{
> - int r;
> -
> - if (!busy_bo || !ticket)
> - return -EBUSY;
> -
> - if (ctx->interruptible)
> - r = dma_resv_lock_interruptible(busy_bo->base.resv,
> - ticket);
> - else
> - r = dma_resv_lock(busy_bo->base.resv, ticket);
> -
> - /*
> - * TODO: It would be better to keep the BO locked until allocation is at
> - * least tried one more time, but that would mean a much larger rework
> - * of TTM.
> - */
> - if (!r)
> - dma_resv_unlock(busy_bo->base.resv);
> -
> - return r == -EDEADLK ? -EBUSY : r;
> -}
> +struct ttm_bo_evict_walk {
> + /** @walk: The walk base parameters. */
> + struct ttm_lru_walk walk;
> + /** @place: The place passed to the resource allocation. */
> + const struct ttm_place *place;
> + /** @evictor: The buffer object we're trying to make room for. */
> + struct ttm_buffer_object *evictor;
> + /** @res: The allocated resource if any. */
> + struct ttm_resource **res;
> + /** @evicted: The number of evicted pages. */
> + unsigned long evicted;
> +};
>
> -int ttm_mem_evict_first(struct ttm_device *bdev,
> - struct ttm_resource_manager *man,
> - const struct ttm_place *place,
> - struct ttm_operation_ctx *ctx,
> - struct ww_acquire_ctx *ticket)
> +static long ttm_bo_evict_cb(struct ttm_lru_walk *walk, struct ttm_buffer_object *bo)
> {
> - struct ttm_buffer_object *bo = NULL, *busy_bo = NULL;
> - struct ttm_resource_cursor cursor;
> - struct ttm_resource *res;
> - bool locked = false;
> - int ret;
> + struct ttm_bo_evict_walk *evict_walk =
> + container_of(walk, typeof(*evict_walk), walk);
> + long lret;
>
> - spin_lock(&bdev->lru_lock);
> - ttm_resource_manager_for_each_res(man, &cursor, res) {
> - bool busy;
> -
> - if (!ttm_bo_evict_swapout_allowable(res->bo, ctx, place,
> - &locked, &busy)) {
> - if (busy && !busy_bo && ticket !=
> - dma_resv_locking_ctx(res->bo->base.resv))
> - busy_bo = res->bo;
> - continue;
> - }
> + if (!bo->bdev->funcs->eviction_valuable(bo, evict_walk->place))
> + return 0;
>
> - if (ttm_bo_get_unless_zero(res->bo)) {
> - bo = res->bo;
> - break;
> - }
> - if (locked)
> - dma_resv_unlock(res->bo->base.resv);
> + if (bo->deleted) {
> + lret = ttm_bo_wait_ctx(bo, walk->ctx);
> + if (!lret)
> + ttm_bo_cleanup_memtype_use(bo);
> + } else {
> + lret = ttm_bo_evict(bo, walk->ctx);
> }
> - ttm_resource_cursor_fini_locked(&cursor);
>
> - if (!bo) {
> - if (busy_bo && !ttm_bo_get_unless_zero(busy_bo))
> - busy_bo = NULL;
> - spin_unlock(&bdev->lru_lock);
> - ret = ttm_mem_evict_wait_busy(busy_bo, ctx, ticket);
> - if (busy_bo)
> - ttm_bo_put(busy_bo);
> - return ret;
> - }
> + if (lret)
> + goto out;
>
> - if (bo->deleted) {
> - ret = ttm_bo_cleanup_refs(bo, ctx->interruptible,
> - ctx->no_wait_gpu, locked);
> - ttm_bo_put(bo);
> - return ret;
> - }
> + evict_walk->evicted++;
> + if (evict_walk->res)
> + lret = ttm_resource_alloc(evict_walk->evictor, evict_walk->place,
> + evict_walk->res);
> + if (lret == 0)
> + return 1;
> +out:
> + /* Errors that should terminate the walk. */
> + if (lret == -ENOMEM || lret == -EINTR || lret == -ERESTARTSYS ||
> + lret == -EAGAIN)
> + return lret;
>
> - spin_unlock(&bdev->lru_lock);
> + return 0;
> +}
>
> - ret = ttm_bo_evict(bo, ctx);
> - if (locked)
> - ttm_bo_unreserve(bo);
> - else
> - ttm_bo_move_to_lru_tail_unlocked(bo);
> +static const struct ttm_lru_walk_ops ttm_evict_walk_ops = {
> + .process_bo = ttm_bo_evict_cb,
> +};
>
> - ttm_bo_put(bo);
> - return ret;
> +static int ttm_bo_evict_alloc(struct ttm_device *bdev,
> + struct ttm_resource_manager *man,
> + const struct ttm_place *place,
> + struct ttm_buffer_object *evictor,
> + struct ttm_operation_ctx *ctx,
> + struct ww_acquire_ctx *ticket,
> + struct ttm_resource **res)
> +{
> + struct ttm_bo_evict_walk evict_walk = {
> + .walk = {
> + .ops = &ttm_evict_walk_ops,
> + .ctx = ctx,
> + .ticket = ticket,
> + },
> + .place = place,
> + .evictor = evictor,
> + .res = res,
> + };
> + long lret;
> +
> + evict_walk.walk.trylock_only = true;
> + lret = ttm_lru_walk_for_evict(&evict_walk.walk, bdev, man, 1);
> + if (lret || !ticket)
> + goto out;
> +
> + /* If ticket-locking, repeat while making progress. */
> + evict_walk.walk.trylock_only = false;
> + do {
> + /* The walk may clear the evict_walk.walk.ticket field */
> + evict_walk.walk.ticket = ticket;
> + evict_walk.evicted = 0;
> + lret = ttm_lru_walk_for_evict(&evict_walk.walk, bdev, man, 1);
> + } while (!lret && evict_walk.evicted);
> +out:
> + if (lret < 0)
> + return lret;
> + if (lret == 0)
> + return -EBUSY;
> + return 0;
> }
>
> /**
> @@ -760,6 +689,7 @@ static int ttm_bo_alloc_resource(struct ttm_buffer_object *bo,
> for (i = 0; i < placement->num_placement; ++i) {
> const struct ttm_place *place = &placement->placement[i];
> struct ttm_resource_manager *man;
> + bool may_evict;
>
> man = ttm_manager_type(bdev, place->mem_type);
> if (!man || !ttm_resource_manager_used(man))
> @@ -769,22 +699,21 @@ static int ttm_bo_alloc_resource(struct ttm_buffer_object *bo,
> TTM_PL_FLAG_FALLBACK))
> continue;
>
> - do {
> - ret = ttm_resource_alloc(bo, place, res);
> - if (unlikely(ret && ret != -ENOSPC))
> + may_evict = (force_space && place->mem_type != TTM_PL_SYSTEM);
> + ret = ttm_resource_alloc(bo, place, res);
> + if (ret) {
> + if (ret != -ENOSPC)
> return ret;
> - if (likely(!ret) || !force_space)
> - break;
> -
> - ret = ttm_mem_evict_first(bdev, man, place, ctx,
> - ticket);
> - if (unlikely(ret == -EBUSY))
> - break;
> - if (unlikely(ret))
> + if (!may_evict)
> + continue;
> +
> + ret = ttm_bo_evict_alloc(bdev, man, place, bo, ctx,
> + ticket, res);
> + if (ret == -EBUSY)
> + continue;
> + if (ret)
> return ret;
> - } while (1);
> - if (ret)
> - continue;
> + }
>
> ret = ttm_bo_add_move_fence(bo, man, ctx->no_wait_gpu);
> if (unlikely(ret)) {
> @@ -796,7 +725,6 @@ static int ttm_bo_alloc_resource(struct ttm_buffer_object *bo,
> }
> return 0;
> }
> -
> return -ENOSPC;
> }
>
> diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c
> index a03090683e79..6d0c66fc36e3 100644
> --- a/drivers/gpu/drm/ttm/ttm_resource.c
> +++ b/drivers/gpu/drm/ttm/ttm_resource.c
> @@ -508,24 +508,10 @@ int ttm_resource_manager_evict_all(struct ttm_device *bdev,
> };
> struct dma_fence *fence;
> int ret;
> - unsigned i;
> -
> - /*
> - * Can't use standard list traversal since we're unlocking.
> - */
>
> - spin_lock(&bdev->lru_lock);
> - for (i = 0; i < TTM_MAX_BO_PRIORITY; ++i) {
> - while (!list_empty(&man->lru[i])) {
> - spin_unlock(&bdev->lru_lock);
> - ret = ttm_mem_evict_first(bdev, man, NULL, &ctx,
> - NULL);
> - if (ret)
> - return ret;
> - spin_lock(&bdev->lru_lock);
> - }
> - }
> - spin_unlock(&bdev->lru_lock);
> + do {
> + ret = ttm_bo_evict_first(bdev, man, &ctx);
Ooo, just noticed this after my initial review.
This function, ttm_bo_evict_first, will return -ENOENT if
ttm_bo_get_unless_zero returns false breaking this loop. I don't think
that is the correct behavior. If ttm_bo_get_unless_zero returns false on
the head of LRU, that means this is getting destroyed. I don't think in
that what we want do to here. Shouldn't continue the LRU walk evicting
all other BOs on the LRU list?
Matt
> + } while (!ret);
>
> spin_lock(&man->move_lock);
> fence = dma_fence_get(man->move);
> diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h
> index 472a55b69afb..148f49f625e4 100644
> --- a/include/drm/ttm/ttm_bo.h
> +++ b/include/drm/ttm/ttm_bo.h
> @@ -415,11 +415,9 @@ long ttm_bo_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx,
> pgoff_t target);
> void ttm_bo_pin(struct ttm_buffer_object *bo);
> void ttm_bo_unpin(struct ttm_buffer_object *bo);
> -int ttm_mem_evict_first(struct ttm_device *bdev,
> - struct ttm_resource_manager *man,
> - const struct ttm_place *place,
> - struct ttm_operation_ctx *ctx,
> - struct ww_acquire_ctx *ticket);
> +int ttm_bo_evict_first(struct ttm_device *bdev,
> + struct ttm_resource_manager *man,
> + struct ttm_operation_ctx *ctx);
> vm_fault_t ttm_bo_vm_reserve(struct ttm_buffer_object *bo,
> struct vm_fault *vmf);
> vm_fault_t ttm_bo_vm_fault_reserved(struct vm_fault *vmf,
> --
> 2.44.0
>
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v5 08/12] drm/ttm: Add a virtual base class for graphics memory backup
2024-06-18 7:18 ` [PATCH v5 08/12] drm/ttm: Add a virtual base class for graphics memory backup Thomas Hellström
@ 2024-06-20 15:17 ` Matthew Brost
2024-06-24 9:26 ` Thomas Hellström
0 siblings, 1 reply; 36+ messages in thread
From: Matthew Brost @ 2024-06-20 15:17 UTC (permalink / raw)
To: Thomas Hellström
Cc: intel-xe, Christian König, Somalapuram Amaranath, dri-devel
On Tue, Jun 18, 2024 at 09:18:16AM +0200, Thomas Hellström wrote:
> Initially intended for experimenting with different backup
> solutions (shmem vs direct swap cache insertion), abstract
> the backup destination using a virtual base class.
>
> Also provide a sample implementation for shmem.
>
> While when settling on a preferred backup solution, one could
> perhaps skip the abstraction, this functionality may actually
> come in handy for configurable dedicated graphics memory
> backup to fast nvme files or similar, whithout affecting
> swap-space. Could indeed be useful for VRAM backup on S4 and
> other cases.
>
Implementation seemly makes sense and matches other similar usages of shmem /
folio functions I could find in the kernel.
A few questions / nits below.
> v5:
> - Fix a UAF. (kernel test robot, Dan Carptenter)
>
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> Cc: <dri-devel@lists.freedesktop.org>
> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> ---
> drivers/gpu/drm/ttm/Makefile | 2 +-
> drivers/gpu/drm/ttm/ttm_backup_shmem.c | 139 +++++++++++++++++++++++++
> include/drm/ttm/ttm_backup.h | 136 ++++++++++++++++++++++++
> 3 files changed, 276 insertions(+), 1 deletion(-)
> create mode 100644 drivers/gpu/drm/ttm/ttm_backup_shmem.c
> create mode 100644 include/drm/ttm/ttm_backup.h
>
> diff --git a/drivers/gpu/drm/ttm/Makefile b/drivers/gpu/drm/ttm/Makefile
> index dad298127226..5e980dd90e41 100644
> --- a/drivers/gpu/drm/ttm/Makefile
> +++ b/drivers/gpu/drm/ttm/Makefile
> @@ -4,7 +4,7 @@
>
> ttm-y := ttm_tt.o ttm_bo.o ttm_bo_util.o ttm_bo_vm.o ttm_module.o \
> ttm_execbuf_util.o ttm_range_manager.o ttm_resource.o ttm_pool.o \
> - ttm_device.o ttm_sys_manager.o
> + ttm_device.o ttm_sys_manager.o ttm_backup_shmem.o
> ttm-$(CONFIG_AGP) += ttm_agp_backend.o
>
> obj-$(CONFIG_DRM_TTM) += ttm.o
> diff --git a/drivers/gpu/drm/ttm/ttm_backup_shmem.c b/drivers/gpu/drm/ttm/ttm_backup_shmem.c
> new file mode 100644
> index 000000000000..f5bc47734d71
> --- /dev/null
> +++ b/drivers/gpu/drm/ttm/ttm_backup_shmem.c
> @@ -0,0 +1,139 @@
> +// SPDX-License-Identifier: MIT
> +/*
> + * Copyright © 2024 Intel Corporation
> + */
> +
> +#include <drm/ttm/ttm_backup.h>
> +#include <linux/page-flags.h>
> +
> +/**
> + * struct ttm_backup_shmem - A shmem based ttm_backup subclass.
> + * @backup: The base struct ttm_backup
> + * @filp: The associated shmem object
> + */
> +struct ttm_backup_shmem {
> + struct ttm_backup backup;
> + struct file *filp;
> +};
> +
> +static struct ttm_backup_shmem *to_backup_shmem(struct ttm_backup *backup)
> +{
> + return container_of(backup, struct ttm_backup_shmem, backup);
> +}
> +
> +static void ttm_backup_shmem_drop(struct ttm_backup *backup, unsigned long handle)
> +{
> + handle -= 1;
Can you explain the -1 / +1 usage to handle in this code? Is it to test
that 'pgoff_t i' is indeed just a hint and return a different handle?
> + shmem_truncate_range(file_inode(to_backup_shmem(backup)->filp), handle,
> + handle + 1);
> +}
> +
> +static int ttm_backup_shmem_copy_page(struct ttm_backup *backup, struct page *dst,
> + unsigned long handle, bool killable)
In the vfunc definition 'killable' is named 'intr'. I'd keep the naming
consistent.
> +{
> + struct file *filp = to_backup_shmem(backup)->filp;
> + struct address_space *mapping = filp->f_mapping;
> + struct folio *from_folio;
> +
> + handle -= 1;
> + from_folio = shmem_read_folio(mapping, handle);
> + if (IS_ERR(from_folio))
> + return PTR_ERR(from_folio);
> +
> + /* Note: Use drm_memcpy_from_wc? */
> + copy_highpage(dst, folio_file_page(from_folio, handle));
> + folio_put(from_folio);
> +
> + return 0;
> +}
> +
> +static unsigned long
> +ttm_backup_shmem_backup_page(struct ttm_backup *backup, struct page *page,
> + bool writeback, pgoff_t i, gfp_t page_gfp,
> + gfp_t alloc_gfp)
> +{
> + struct file *filp = to_backup_shmem(backup)->filp;
> + struct address_space *mapping = filp->f_mapping;
> + unsigned long handle = 0;
> + struct folio *to_folio;
> + int ret;
> +
> + to_folio = shmem_read_folio_gfp(mapping, i, alloc_gfp);
> + if (IS_ERR(to_folio))
> + return handle;
> +
> + folio_mark_accessed(to_folio);
Does this not need to be after 'folio_lock'?
> + folio_lock(to_folio);
> + folio_mark_dirty(to_folio);
> + copy_highpage(folio_file_page(to_folio, i), page);
> + handle = i + 1;
> +
> + if (writeback && !folio_mapped(to_folio) && folio_clear_dirty_for_io(to_folio)) {
> + struct writeback_control wbc = {
> + .sync_mode = WB_SYNC_NONE,
> + .nr_to_write = SWAP_CLUSTER_MAX,
> + .range_start = 0,
> + .range_end = LLONG_MAX,
> + .for_reclaim = 1,
> + };
> + folio_set_reclaim(to_folio);
> + ret = mapping->a_ops->writepage(folio_page(to_folio, 0), &wbc);
> + if (!folio_test_writeback(to_folio))
> + folio_clear_reclaim(to_folio);
> + /* If writepage succeeds, it unlocks the folio */
> + if (ret)
> + folio_unlock(to_folio);
> + } else {
> + folio_unlock(to_folio);
> + }
> +
> + folio_put(to_folio);
> +
> + return handle;
> +}
> +
> +static void ttm_backup_shmem_fini(struct ttm_backup *backup)
> +{
> + struct ttm_backup_shmem *sbackup = to_backup_shmem(backup);
> +
> + fput(sbackup->filp);
> + kfree(sbackup);
> +}
> +
> +static const struct ttm_backup_ops ttm_backup_shmem_ops = {
> + .drop = ttm_backup_shmem_drop,
> + .copy_backed_up_page = ttm_backup_shmem_copy_page,
> + .backup_page = ttm_backup_shmem_backup_page,
> + .fini = ttm_backup_shmem_fini,
> +};
> +
> +/**
> + * ttm_backup_shmem_create() - Create a shmem-based struct backup.
> + * @size: The maximum size (in bytes) to back up.
> + *
> + * Create a backup utilizing shmem objects.
> + *
> + * Return: A pointer to a struct ttm_backup on success,
> + * an error pointer on error.
> + */
> +struct ttm_backup *ttm_backup_shmem_create(loff_t size)
> +{
> + struct ttm_backup_shmem *sbackup =
> + kzalloc(sizeof(*sbackup), GFP_KERNEL | __GFP_ACCOUNT);
> + struct file *filp;
> +
> + if (!sbackup)
> + return ERR_PTR(-ENOMEM);
> +
> + filp = shmem_file_setup("ttm shmem backup", size, 0);
> + if (IS_ERR(filp)) {
> + kfree(sbackup);
> + return ERR_CAST(filp);
> + }
> +
> + sbackup->filp = filp;
> + sbackup->backup.ops = &ttm_backup_shmem_ops;
> +
> + return &sbackup->backup;
> +}
> +EXPORT_SYMBOL_GPL(ttm_backup_shmem_create);
> diff --git a/include/drm/ttm/ttm_backup.h b/include/drm/ttm/ttm_backup.h
> new file mode 100644
> index 000000000000..88e8b97a6fdc
> --- /dev/null
> +++ b/include/drm/ttm/ttm_backup.h
> @@ -0,0 +1,136 @@
> +/* SPDX-License-Identifier: MIT */
> +/*
> + * Copyright © 2024 Intel Corporation
> + */
> +
> +#ifndef _TTM_BACKUP_H_
> +#define _TTM_BACKUP_H_
> +
> +#include <linux/mm_types.h>
> +#include <linux/shmem_fs.h>
> +
> +struct ttm_backup;
> +
> +/**
> + * ttm_backup_handle_to_page_ptr() - Convert handle to struct page pointer
> + * @handle: The handle to convert.
> + *
> + * Converts an opaque handle received from the
> + * struct ttm_backoup_ops::backup_page() function to an (invalid)
> + * struct page pointer suitable for a struct page array.
> + *
> + * Return: An (invalid) struct page pointer.
> + */
> +static inline struct page *
> +ttm_backup_handle_to_page_ptr(unsigned long handle)
> +{
> + return (struct page *)(handle << 1 | 1);
> +}
> +
> +/**
> + * ttm_backup_page_ptr_is_handle() - Whether a struct page pointer is a handle
> + * @page: The struct page pointer to check.
> + *
> + * Return: true if the struct page pointer is a handld returned from
> + * ttm_backup_handle_to_page_ptr(). False otherwise.
> + */
> +static inline bool ttm_backup_page_ptr_is_handle(const struct page *page)
> +{
> + return (unsigned long)page & 1;
> +}
> +
> +/**
> + * ttm_backup_page_ptr_to_handle() - Convert a struct page pointer to a handle
> + * @page: The struct page pointer to convert
> + *
> + * Return: The handle that was previously used in
> + * ttm_backup_handle_to_page_ptr() to obtain a struct page pointer, suitable
> + * for use as argument in the struct ttm_backup_ops drop() or
> + * copy_backed_up_page() functions.
> + */
> +static inline unsigned long
> +ttm_backup_page_ptr_to_handle(const struct page *page)
> +{
> + WARN_ON(!ttm_backup_page_ptr_is_handle(page));
> + return (unsigned long)page >> 1;
> +}
> +
> +/** struct ttm_backup_ops - A struct ttm_backup backend operations */
> +struct ttm_backup_ops {
> + /**
> + * drop - release memory associated with a handle
> + * @backup: The struct backup pointer used to obtain the handle
> + * @handle: The handle obtained from the @backup_page function.
> + */
> + void (*drop)(struct ttm_backup *backup, unsigned long handle);
> +
> + /**
> + * copy_backed_up_page - Copy the contents of a previously backed
> + * up page
> + * @backup: The struct backup pointer used to back up the page.
> + * @dst: The struct page to copy into.
> + * @handle: The handle returned when the page was backed up.
The above two are arguments flipped in order compared to function
definition.
Matt
> + * @intr: Try to perform waits interruptable or at least killable.
> + *
> + * Return: 0 on success, Negative error code on failure, notably
> + * -EINTR if @intr was set to true and a signal is pending.
> + */
> + int (*copy_backed_up_page)(struct ttm_backup *backup, struct page *dst,
> + unsigned long handle, bool intr);
> +
> + /**
> + * backup_page - Backup a page
> + * @backup: The struct backup pointer to use.
> + * @page: The page to back up.
> + * @writeback: Whether to perform immediate writeback of the page.
> + * This may have performance implications.
> + * @i: A unique integer for each page and each struct backup.
> + * This is a hint allowing the backup backend to avoid managing
> + * its address space separately.
> + * @page_gfp: The gfp value used when the page was allocated.
> + * This is used for accounting purposes.
> + * @alloc_gfp: The gpf to be used when the backend needs to allocaete
> + * memory.
> + *
> + * Return: A handle on success. 0 on failure.
> + * (This is following the swp_entry_t convention).
> + *
> + * Note: This function could be extended to back up a folio and
> + * backends would then split the folio internally if needed.
> + * Drawback is that the caller would then have to keep track of
> + */
> + unsigned long (*backup_page)(struct ttm_backup *backup, struct page *page,
> + bool writeback, pgoff_t i, gfp_t page_gfp,
> + gfp_t alloc_gfp);
> + /**
> + * fini - Free the struct backup resources after last use.
> + * @backup: Pointer to the struct backup whose resources to free.
> + *
> + * After a call to @fini, it's illegal to use the @backup pointer.
> + */
> + void (*fini)(struct ttm_backup *backup);
> +};
> +
> +/**
> + * struct ttm_backup - Abstract a backup backend.
> + * @ops: The operations as described above.
> + *
> + * The struct ttm_backup is intended to be subclassed by the
> + * backend implementation.
> + */
> +struct ttm_backup {
> + const struct ttm_backup_ops *ops;
> +};
> +
> +/**
> + * ttm_backup_shmem_create() - Create a shmem-based struct backup.
> + * @size: The maximum size (in bytes) to back up.
> + *
> + * Create a backup utilizing shmem objects.
> + *
> + * Return: A pointer to a struct ttm_backup on success,
> + * an error pointer on error.
> + */
> +struct ttm_backup *ttm_backup_shmem_create(loff_t size);
> +
> +#endif
> --
> 2.44.0
>
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v5 07/12] drm/ttm: Use the LRU walker for eviction
2024-06-19 22:52 ` Matthew Brost
@ 2024-06-24 9:06 ` Thomas Hellström
0 siblings, 0 replies; 36+ messages in thread
From: Thomas Hellström @ 2024-06-24 9:06 UTC (permalink / raw)
To: Matthew Brost
Cc: intel-xe, Christian König, Somalapuram Amaranath, dri-devel
Hi, Matthew
On Wed, 2024-06-19 at 22:52 +0000, Matthew Brost wrote:
> On Tue, Jun 18, 2024 at 09:18:15AM +0200, Thomas Hellström wrote:
> > Use the LRU walker for eviction. This helps
> > removing a lot of code with weird locking
> > semantics.
> >
> > The functionality is slightly changed so that
> > when trylocked buffer objects are exhausted, we
> > continue to interleave walks with ticket-locks while
> > there is still progress made. The list walks are
> > not restarted in-between evictions.
> >
> > Also provide a separate ttm_bo_evict_first()
> > function for its single user. The context of that
> > user allows sleeping dma_resv locks.
> >
> I'm inclined to RB this as I think I've made sense of it all but just
> have a few questions / nits first + one small bug.
>
> > Cc: Christian König <christian.koenig@amd.com>
> > Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
> > Cc: Matthew Brost <matthew.brost@intel.com>
> > Cc: <dri-devel@lists.freedesktop.org>
> > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> > ---
> > drivers/gpu/drm/ttm/ttm_bo.c | 350 ++++++++++++-------------
> > ----
> > drivers/gpu/drm/ttm/ttm_resource.c | 20 +-
> > include/drm/ttm/ttm_bo.h | 8 +-
> > 3 files changed, 145 insertions(+), 233 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/ttm/ttm_bo.c
> > b/drivers/gpu/drm/ttm/ttm_bo.c
> > index 63a91b77f7da..316afe19a325 100644
> > --- a/drivers/gpu/drm/ttm/ttm_bo.c
> > +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> > @@ -224,80 +224,6 @@ static void ttm_bo_flush_all_fences(struct
> > ttm_buffer_object *bo)
> > dma_resv_iter_end(&cursor);
> > }
> >
> > -/**
> > - * ttm_bo_cleanup_refs
> > - * If bo idle, remove from lru lists, and unref.
> > - * If not idle, block if possible.
> > - *
> > - * Must be called with lru_lock and reservation held, this
> > function
> > - * will drop the lru lock and optionally the reservation lock
> > before returning.
> > - *
> > - * @bo: The buffer object to clean-up
> > - * @interruptible: Any sleeps should occur interruptibly.
> > - * @no_wait_gpu: Never wait for gpu. Return -EBUSY
> > instead.
> > - * @unlock_resv: Unlock the reservation lock as well.
> > - */
> > -
> > -static int ttm_bo_cleanup_refs(struct ttm_buffer_object *bo,
> > - bool interruptible, bool
> > no_wait_gpu,
> > - bool unlock_resv)
> > -{
> > - struct dma_resv *resv = &bo->base._resv;
> > - int ret;
> > -
> > - if (dma_resv_test_signaled(resv, DMA_RESV_USAGE_BOOKKEEP))
> > - ret = 0;
> > - else
> > - ret = -EBUSY;
> > -
> > - if (ret && !no_wait_gpu) {
> > - long lret;
> > -
> > - if (unlock_resv)
> > - dma_resv_unlock(bo->base.resv);
> > - spin_unlock(&bo->bdev->lru_lock);
> > -
> > - lret = dma_resv_wait_timeout(resv,
> > DMA_RESV_USAGE_BOOKKEEP,
> > - interruptible,
> > - 30 * HZ);
> > -
> > - if (lret < 0)
> > - return lret;
> > - else if (lret == 0)
> > - return -EBUSY;
> > -
> > - spin_lock(&bo->bdev->lru_lock);
> > - if (unlock_resv && !dma_resv_trylock(bo-
> > >base.resv)) {
> > - /*
> > - * We raced, and lost, someone else holds
> > the reservation now,
> > - * and is probably busy in
> > ttm_bo_cleanup_memtype_use.
> > - *
> > - * Even if it's not the case, because we
> > finished waiting any
> > - * delayed destruction would succeed, so
> > just return success
> > - * here.
> > - */
> > - spin_unlock(&bo->bdev->lru_lock);
> > - return 0;
> > - }
> > - ret = 0;
> > - }
> > -
> > - if (ret) {
> > - if (unlock_resv)
> > - dma_resv_unlock(bo->base.resv);
> > - spin_unlock(&bo->bdev->lru_lock);
> > - return ret;
> > - }
> > -
> > - spin_unlock(&bo->bdev->lru_lock);
> > - ttm_bo_cleanup_memtype_use(bo);
> > -
> > - if (unlock_resv)
> > - dma_resv_unlock(bo->base.resv);
> > -
> > - return 0;
> > -}
> > -
> > /*
> > * Block for the dma_resv object to become idle, lock the buffer
> > and clean up
> > * the resource and tt object.
> > @@ -505,151 +431,154 @@ bool ttm_bo_eviction_valuable(struct
> > ttm_buffer_object *bo,
> > }
> > EXPORT_SYMBOL(ttm_bo_eviction_valuable);
> >
> > -/*
> > - * Check the target bo is allowable to be evicted or swapout,
> > including cases:
> > - *
> > - * a. if share same reservation object with ctx->resv, have
> > assumption
> > - * reservation objects should already be locked, so not lock again
> > and
> > - * return true directly when either the opreation
> > allow_reserved_eviction
> > - * or the target bo already is in delayed free list;
> > +/**
> > + * ttm_bo_evict_first() - Evict the first bo on the manager's LRU
> > list.
> > + * @bdev: The ttm device.
> > + * @man: The manager whose bo to evict.
> > + * @ctx: The TTM operation ctx governing the eviction.
> > *
> > - * b. Otherwise, trylock it.
> > + * Return: 0 if successful or the resource disappeared. Negative
> > error code on error.
> > */
> > -static bool ttm_bo_evict_swapout_allowable(struct
> > ttm_buffer_object *bo,
> > - struct
> > ttm_operation_ctx *ctx,
> > - const struct ttm_place
> > *place,
> > - bool *locked, bool
> > *busy)
> > +int ttm_bo_evict_first(struct ttm_device *bdev, struct
> > ttm_resource_manager *man,
> > + struct ttm_operation_ctx *ctx)
> > {
> > - bool ret = false;
> > + struct ttm_resource_cursor cursor;
> > + struct ttm_buffer_object *bo;
> > + struct ttm_resource *res;
> > + unsigned int mem_type;
> > + int ret = 0;
> >
> > - if (bo->pin_count) {
> > - *locked = false;
> > - if (busy)
> > - *busy = false;
> > - return false;
> > + spin_lock(&bdev->lru_lock);
> > + res = ttm_resource_manager_first(man, &cursor);
> > + if (!res) {
> > + ret = -ENOENT;
>
> Nit, this assignment is not needed a out_no_ref just returns -ENOENT.
>
> > + goto out_no_ref;
> > }
> > + bo = res->bo;
> > + if (!ttm_bo_get_unless_zero(bo))
> > + goto out_no_ref;
> > + mem_type = res->mem_type;
> > + spin_unlock(&bdev->lru_lock);
> > + ret = ttm_bo_reserve(bo, ctx->interruptible, ctx-
> > >no_wait_gpu, NULL);
> > + if (ret)
> > + goto out_no_lock;
> > + if (bo->resource != res || res->mem_type != mem_type)
>
> So 'bo->resource != res' is checking between dropping of the LRU lock
> and grabbing the dma-resv lock in ttm_bo_reserve, the BO's backing
> resource has changed (i.e. someone else could've evicted to BO). Is
> that correct? Also in this case 'res' could be stale memory and not
> safe
> to dereference, right?
Yes, that's correct. Although if bo->resource == res, it is safe to
dereference res.
>
> I'm confused about 'res->mem_type != mem_type' though. Looking
> through
> the code is res->mem_type not immutable? I think I only see
> res->mem_type assigned in ttm_resource_init.
It's if someone freed res and then allocated a new resource that ended
up as bo->resource, but with the same virtual address as res. Not very
likely but definitely possible. Then if the new resource has the same
memory type we can go ahead and evict anyway, If not, we skip eviction.
>
> > + goto out_bad_res;
>
> s/out_bad_res/out_bo_moved
>
> Would that be more accurate?
Yes, I could change that.
>
> >
> > - if (bo->base.resv == ctx->resv) {
> > - dma_resv_assert_held(bo->base.resv);
> > - if (ctx->allow_res_evict)
> > - ret = true;
> > - *locked = false;
> > - if (busy)
> > - *busy = false;
> > + if (bo->deleted) {
> > + ret = ttm_bo_wait_ctx(bo, ctx);
> > + if (ret)
>
> This should be 'if (!ret)', right? We should cleanup once the BO is
> idle.
Right. Will fix.
>
> > + ttm_bo_cleanup_memtype_use(bo);
> > } else {
> > - ret = dma_resv_trylock(bo->base.resv);
> > - *locked = ret;
> > - if (busy)
> > - *busy = !ret;
> > - }
> > -
> > - if (ret && place && (bo->resource->mem_type != place-
> > >mem_type ||
> > - !bo->bdev->funcs->eviction_valuable(bo, place))) {
> > - ret = false;
> > - if (*locked) {
> > - dma_resv_unlock(bo->base.resv);
> > - *locked = false;
> > - }
> > + ret = ttm_bo_evict(bo, ctx);
> > }
> > -
> > +out_bad_res:
> > + dma_resv_unlock(bo->base.resv);
> > +out_no_lock:
> > + ttm_bo_put(bo);
> > + ttm_resource_cursor_fini(&cursor);
> > return ret;
> > +
> > +out_no_ref:
> > + ttm_resource_cursor_fini_locked(&cursor);
> > + spin_unlock(&bdev->lru_lock);
> > + return -ENOENT;
> > }
> >
> > /**
> > - * ttm_mem_evict_wait_busy - wait for a busy BO to become
> > available
> > - *
> > - * @busy_bo: BO which couldn't be locked with trylock
> > - * @ctx: operation context
> > - * @ticket: acquire ticket
> > - *
> > - * Try to lock a busy buffer object to avoid failing eviction.
> > + * struct ttm_bo_evict_walk - Parameters for the evict walk.
> > */
> > -static int ttm_mem_evict_wait_busy(struct ttm_buffer_object
> > *busy_bo,
> > - struct ttm_operation_ctx *ctx,
> > - struct ww_acquire_ctx *ticket)
> > -{
> > - int r;
> > -
> > - if (!busy_bo || !ticket)
> > - return -EBUSY;
> > -
> > - if (ctx->interruptible)
> > - r = dma_resv_lock_interruptible(busy_bo-
> > >base.resv,
> > - ticket);
> > - else
> > - r = dma_resv_lock(busy_bo->base.resv, ticket);
> > -
> > - /*
> > - * TODO: It would be better to keep the BO locked until
> > allocation is at
> > - * least tried one more time, but that would mean a much
> > larger rework
> > - * of TTM.
> > - */
> > - if (!r)
> > - dma_resv_unlock(busy_bo->base.resv);
> > -
> > - return r == -EDEADLK ? -EBUSY : r;
> > -}
> > +struct ttm_bo_evict_walk {
> > + /** @walk: The walk base parameters. */
> > + struct ttm_lru_walk walk;
> > + /** @place: The place passed to the resource allocation.
> > */
> > + const struct ttm_place *place;
> > + /** @evictor: The buffer object we're trying to make room
> > for. */
> > + struct ttm_buffer_object *evictor;
> > + /** @res: The allocated resource if any. */
> > + struct ttm_resource **res;
> > + /** @evicted: The number of evicted pages. */
>
> s/pages/BOs or resources
>
> Another option would be 'forward_progess' or something like that
> given
> the usage in this patch.
OK, yes, will take a look and fix.
>
> > + unsigned long evicted;
> > +};
> >
> > -int ttm_mem_evict_first(struct ttm_device *bdev,
> > - struct ttm_resource_manager *man,
> > - const struct ttm_place *place,
> > - struct ttm_operation_ctx *ctx,
> > - struct ww_acquire_ctx *ticket)
> > +static long ttm_bo_evict_cb(struct ttm_lru_walk *walk, struct
> > ttm_buffer_object *bo)
> > {
> > - struct ttm_buffer_object *bo = NULL, *busy_bo = NULL;
> > - struct ttm_resource_cursor cursor;
> > - struct ttm_resource *res;
> > - bool locked = false;
> > - int ret;
> > + struct ttm_bo_evict_walk *evict_walk =
> > + container_of(walk, typeof(*evict_walk), walk);
> > + long lret;
> >
> > - spin_lock(&bdev->lru_lock);
> > - ttm_resource_manager_for_each_res(man, &cursor, res) {
> > - bool busy;
> > -
> > - if (!ttm_bo_evict_swapout_allowable(res->bo, ctx,
> > place,
> > - &locked,
> > &busy)) {
> > - if (busy && !busy_bo && ticket !=
> > - dma_resv_locking_ctx(res->bo-
> > >base.resv))
> > - busy_bo = res->bo;
> > - continue;
> > - }
> > + if (!bo->bdev->funcs->eviction_valuable(bo, evict_walk-
> > >place))
> > + return 0;
> >
> > - if (ttm_bo_get_unless_zero(res->bo)) {
> > - bo = res->bo;
> > - break;
> > - }
> > - if (locked)
> > - dma_resv_unlock(res->bo->base.resv);
> > + if (bo->deleted) {
> > + lret = ttm_bo_wait_ctx(bo, walk->ctx);
> > + if (!lret)
> > + ttm_bo_cleanup_memtype_use(bo);
> > + } else {
> > + lret = ttm_bo_evict(bo, walk->ctx);
> > }
> > - ttm_resource_cursor_fini_locked(&cursor);
> >
> > - if (!bo) {
> > - if (busy_bo && !ttm_bo_get_unless_zero(busy_bo))
> > - busy_bo = NULL;
> > - spin_unlock(&bdev->lru_lock);
> > - ret = ttm_mem_evict_wait_busy(busy_bo, ctx,
> > ticket);
> > - if (busy_bo)
> > - ttm_bo_put(busy_bo);
> > - return ret;
> > - }
> > + if (lret)
> > + goto out;
> >
> > - if (bo->deleted) {
> > - ret = ttm_bo_cleanup_refs(bo, ctx->interruptible,
> > - ctx->no_wait_gpu,
> > locked);
> > - ttm_bo_put(bo);
> > - return ret;
> > - }
> > + evict_walk->evicted++;
> > + if (evict_walk->res)
> > + lret = ttm_resource_alloc(evict_walk->evictor,
> > evict_walk->place,
> > + evict_walk->res);
> > + if (lret == 0)
> > + return 1;
> > +out:
> > + /* Errors that should terminate the walk. */
> > + if (lret == -ENOMEM || lret == -EINTR || lret == -
> > ERESTARTSYS ||
> > + lret == -EAGAIN)
> > + return lret;
>
> Same comment as the previous patch, the inverse of this might be more
> clear. Also if the condition is the same, a helper may make sense.
Will fix.
>
> >
> > - spin_unlock(&bdev->lru_lock);
> > + return 0;
> > +}
> >
> > - ret = ttm_bo_evict(bo, ctx);
> > - if (locked)
> > - ttm_bo_unreserve(bo);
> > - else
> > - ttm_bo_move_to_lru_tail_unlocked(bo);
> > +static const struct ttm_lru_walk_ops ttm_evict_walk_ops = {
> > + .process_bo = ttm_bo_evict_cb,
> > +};
> >
> > - ttm_bo_put(bo);
> > - return ret;
> > +static int ttm_bo_evict_alloc(struct ttm_device *bdev,
> > + struct ttm_resource_manager *man,
> > + const struct ttm_place *place,
> > + struct ttm_buffer_object *evictor,
> > + struct ttm_operation_ctx *ctx,
> > + struct ww_acquire_ctx *ticket,
> > + struct ttm_resource **res)
> > +{
> > + struct ttm_bo_evict_walk evict_walk = {
> > + .walk = {
> > + .ops = &ttm_evict_walk_ops,
> > + .ctx = ctx,
> > + .ticket = ticket,
> > + },
> > + .place = place,
> > + .evictor = evictor,
> > + .res = res,
> > + };
> > + long lret;
> > +
> > + evict_walk.walk.trylock_only = true;
> > + lret = ttm_lru_walk_for_evict(&evict_walk.walk, bdev, man,
> > 1);
> > + if (lret || !ticket)
> > + goto out;
> > +
> > + /* If ticket-locking, repeat while making progress. */
> > + evict_walk.walk.trylock_only = false;
> > + do {
> > + /* The walk may clear the evict_walk.walk.ticket
> > field */
> > + evict_walk.walk.ticket = ticket;
> > + evict_walk.evicted = 0;
> > + lret = ttm_lru_walk_for_evict(&evict_walk.walk,
> > bdev, man, 1);
> > + } while (!lret && evict_walk.evicted);
> > +out:
> > + if (lret < 0)
> > + return lret;
> > + if (lret == 0)
> > + return -EBUSY;
> > + return 0;
> > }
> >
> > /**
> > @@ -760,6 +689,7 @@ static int ttm_bo_alloc_resource(struct
> > ttm_buffer_object *bo,
> > for (i = 0; i < placement->num_placement; ++i) {
> > const struct ttm_place *place = &placement-
> > >placement[i];
> > struct ttm_resource_manager *man;
> > + bool may_evict;
> >
> > man = ttm_manager_type(bdev, place->mem_type);
> > if (!man || !ttm_resource_manager_used(man))
> > @@ -769,22 +699,21 @@ static int ttm_bo_alloc_resource(struct
> > ttm_buffer_object *bo,
> > TTM_PL_FLAG_FALLBACK))
> > continue;
> >
> > - do {
> > - ret = ttm_resource_alloc(bo, place, res);
> > - if (unlikely(ret && ret != -ENOSPC))
> > + may_evict = (force_space && place->mem_type !=
> > TTM_PL_SYSTEM);
> > + ret = ttm_resource_alloc(bo, place, res);
> > + if (ret) {
> > + if (ret != -ENOSPC)
> > return ret;
> > - if (likely(!ret) || !force_space)
> > - break;
> > -
> > - ret = ttm_mem_evict_first(bdev, man,
> > place, ctx,
> > - ticket);
> > - if (unlikely(ret == -EBUSY))
> > - break;
> > - if (unlikely(ret))
> > + if (!may_evict)
> > + continue;
> > +
> > + ret = ttm_bo_evict_alloc(bdev, man, place,
> > bo, ctx,
> > + ticket, res);
> > + if (ret == -EBUSY)
> > + continue;
> > + if (ret)
> > return ret;
> > - } while (1);
> > - if (ret)
> > - continue;
> > + }
> >
> > ret = ttm_bo_add_move_fence(bo, man, ctx-
> > >no_wait_gpu);
> > if (unlikely(ret)) {
> > @@ -796,7 +725,6 @@ static int ttm_bo_alloc_resource(struct
> > ttm_buffer_object *bo,
> > }
> > return 0;
> > }
> > -
>
> Nit, seems unrelated.
Yup. Will fix.
>
> Matt
>
> > return -ENOSPC;
> > }
> >
> > diff --git a/drivers/gpu/drm/ttm/ttm_resource.c
> > b/drivers/gpu/drm/ttm/ttm_resource.c
> > index a03090683e79..6d0c66fc36e3 100644
> > --- a/drivers/gpu/drm/ttm/ttm_resource.c
> > +++ b/drivers/gpu/drm/ttm/ttm_resource.c
> > @@ -508,24 +508,10 @@ int ttm_resource_manager_evict_all(struct
> > ttm_device *bdev,
> > };
> > struct dma_fence *fence;
> > int ret;
> > - unsigned i;
> > -
> > - /*
> > - * Can't use standard list traversal since we're
> > unlocking.
> > - */
> >
> > - spin_lock(&bdev->lru_lock);
> > - for (i = 0; i < TTM_MAX_BO_PRIORITY; ++i) {
> > - while (!list_empty(&man->lru[i])) {
> > - spin_unlock(&bdev->lru_lock);
> > - ret = ttm_mem_evict_first(bdev, man, NULL,
> > &ctx,
> > - NULL);
> > - if (ret)
> > - return ret;
> > - spin_lock(&bdev->lru_lock);
> > - }
> > - }
> > - spin_unlock(&bdev->lru_lock);
> > + do {
> > + ret = ttm_bo_evict_first(bdev, man, &ctx);
> > + } while (!ret);
> >
> > spin_lock(&man->move_lock);
> > fence = dma_fence_get(man->move);
> > diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h
> > index 472a55b69afb..148f49f625e4 100644
> > --- a/include/drm/ttm/ttm_bo.h
> > +++ b/include/drm/ttm/ttm_bo.h
> > @@ -415,11 +415,9 @@ long ttm_bo_swapout(struct ttm_device *bdev,
> > struct ttm_operation_ctx *ctx,
> > pgoff_t target);
> > void ttm_bo_pin(struct ttm_buffer_object *bo);
> > void ttm_bo_unpin(struct ttm_buffer_object *bo);
> > -int ttm_mem_evict_firevictedst(struct ttm_device *bdev,
> > - struct ttm_resource_manager *man,
> > - const struct ttm_place *place,
> > - struct ttm_operation_ctx *ctx,
> > - struct ww_acquire_ctx *ticket);
> > +int ttm_bo_evict_first(struct ttm_device *bdev,
> > + struct ttm_resource_manager *man,
> > + struct ttm_operation_ctx *ctx);
> > vm_fault_t ttm_bo_vm_reserve(struct ttm_buffer_object *bo,
> > struct vm_fault *vmf);
> > vm_fault_t ttm_bo_vm_fault_reserved(struct vm_fault *vmf,
> > --
> > 2.44.0
> >
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v5 07/12] drm/ttm: Use the LRU walker for eviction
2024-06-19 23:33 ` Matthew Brost
@ 2024-06-24 9:16 ` Thomas Hellström
0 siblings, 0 replies; 36+ messages in thread
From: Thomas Hellström @ 2024-06-24 9:16 UTC (permalink / raw)
To: Matthew Brost
Cc: intel-xe, Christian König, Somalapuram Amaranath, dri-devel
On Wed, 2024-06-19 at 23:33 +0000, Matthew Brost wrote:
> On Tue, Jun 18, 2024 at 09:18:15AM +0200, Thomas Hellström wrote:
> > Use the LRU walker for eviction. This helps
> > removing a lot of code with weird locking
> > semantics.
> >
> > The functionality is slightly changed so that
> > when trylocked buffer objects are exhausted, we
> > continue to interleave walks with ticket-locks while
> > there is still progress made. The list walks are
> > not restarted in-between evictions.
> >
> > Also provide a separate ttm_bo_evict_first()
> > function for its single user. The context of that
> > user allows sleeping dma_resv locks.
> >
> > Cc: Christian König <christian.koenig@amd.com>
> > Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
> > Cc: Matthew Brost <matthew.brost@intel.com>
> > Cc: <dri-devel@lists.freedesktop.org>
> > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> > ---
> > drivers/gpu/drm/ttm/ttm_bo.c | 350 ++++++++++++-------------
> > ----
> > drivers/gpu/drm/ttm/ttm_resource.c | 20 +-
> > include/drm/ttm/ttm_bo.h | 8 +-
> > 3 files changed, 145 insertions(+), 233 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/ttm/ttm_bo.c
> > b/drivers/gpu/drm/ttm/ttm_bo.c
> > index 63a91b77f7da..316afe19a325 100644
> > --- a/drivers/gpu/drm/ttm/ttm_bo.c
> > +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> > @@ -224,80 +224,6 @@ static void ttm_bo_flush_all_fences(struct
> > ttm_buffer_object *bo)
> > dma_resv_iter_end(&cursor);
> > }
> >
> > -/**
> > - * ttm_bo_cleanup_refs
> > - * If bo idle, remove from lru lists, and unref.
> > - * If not idle, block if possible.
> > - *
> > - * Must be called with lru_lock and reservation held, this
> > function
> > - * will drop the lru lock and optionally the reservation lock
> > before returning.
> > - *
> > - * @bo: The buffer object to clean-up
> > - * @interruptible: Any sleeps should occur interruptibly.
> > - * @no_wait_gpu: Never wait for gpu. Return -EBUSY
> > instead.
> > - * @unlock_resv: Unlock the reservation lock as well.
> > - */
> > -
> > -static int ttm_bo_cleanup_refs(struct ttm_buffer_object *bo,
> > - bool interruptible, bool
> > no_wait_gpu,
> > - bool unlock_resv)
> > -{
> > - struct dma_resv *resv = &bo->base._resv;
> > - int ret;
> > -
> > - if (dma_resv_test_signaled(resv, DMA_RESV_USAGE_BOOKKEEP))
> > - ret = 0;
> > - else
> > - ret = -EBUSY;
> > -
> > - if (ret && !no_wait_gpu) {
> > - long lret;
> > -
> > - if (unlock_resv)
> > - dma_resv_unlock(bo->base.resv);
> > - spin_unlock(&bo->bdev->lru_lock);
> > -
> > - lret = dma_resv_wait_timeout(resv,
> > DMA_RESV_USAGE_BOOKKEEP,
> > - interruptible,
> > - 30 * HZ);
> > -
> > - if (lret < 0)
> > - return lret;
> > - else if (lret == 0)
> > - return -EBUSY;
> > -
> > - spin_lock(&bo->bdev->lru_lock);
> > - if (unlock_resv && !dma_resv_trylock(bo-
> > >base.resv)) {
> > - /*
> > - * We raced, and lost, someone else holds
> > the reservation now,
> > - * and is probably busy in
> > ttm_bo_cleanup_memtype_use.
> > - *
> > - * Even if it's not the case, because we
> > finished waiting any
> > - * delayed destruction would succeed, so
> > just return success
> > - * here.
> > - */
> > - spin_unlock(&bo->bdev->lru_lock);
> > - return 0;
> > - }
> > - ret = 0;
> > - }
> > -
> > - if (ret) {
> > - if (unlock_resv)
> > - dma_resv_unlock(bo->base.resv);
> > - spin_unlock(&bo->bdev->lru_lock);
> > - return ret;
> > - }
> > -
> > - spin_unlock(&bo->bdev->lru_lock);
> > - ttm_bo_cleanup_memtype_use(bo);
> > -
> > - if (unlock_resv)
> > - dma_resv_unlock(bo->base.resv);
> > -
> > - return 0;
> > -}
> > -
> > /*
> > * Block for the dma_resv object to become idle, lock the buffer
> > and clean up
> > * the resource and tt object.
> > @@ -505,151 +431,154 @@ bool ttm_bo_eviction_valuable(struct
> > ttm_buffer_object *bo,
> > }
> > EXPORT_SYMBOL(ttm_bo_eviction_valuable);
> >
> > -/*
> > - * Check the target bo is allowable to be evicted or swapout,
> > including cases:
> > - *
> > - * a. if share same reservation object with ctx->resv, have
> > assumption
> > - * reservation objects should already be locked, so not lock again
> > and
> > - * return true directly when either the opreation
> > allow_reserved_eviction
> > - * or the target bo already is in delayed free list;
> > +/**
> > + * ttm_bo_evict_first() - Evict the first bo on the manager's LRU
> > list.
> > + * @bdev: The ttm device.
> > + * @man: The manager whose bo to evict.
> > + * @ctx: The TTM operation ctx governing the eviction.
> > *
> > - * b. Otherwise, trylock it.
> > + * Return: 0 if successful or the resource disappeared. Negative
> > error code on error.
> > */
> > -static bool ttm_bo_evict_swapout_allowable(struct
> > ttm_buffer_object *bo,
> > - struct
> > ttm_operation_ctx *ctx,
> > - const struct ttm_place
> > *place,
> > - bool *locked, bool
> > *busy)
> > +int ttm_bo_evict_first(struct ttm_device *bdev, struct
> > ttm_resource_manager *man,
> > + struct ttm_operation_ctx *ctx)
> > {
> > - bool ret = false;
> > + struct ttm_resource_cursor cursor;
> > + struct ttm_buffer_object *bo;
> > + struct ttm_resource *res;
> > + unsigned int mem_type;
> > + int ret = 0;
> >
> > - if (bo->pin_count) {
> > - *locked = false;
> > - if (busy)
> > - *busy = false;
> > - return false;
> > + spin_lock(&bdev->lru_lock);
> > + res = ttm_resource_manager_first(man, &cursor);
> > + if (!res) {
> > + ret = -ENOENT;
> > + goto out_no_ref;
> > }
> > + bo = res->bo;
> > + if (!ttm_bo_get_unless_zero(bo))
> > + goto out_no_ref;
> > + mem_type = res->mem_type;
> > + spin_unlock(&bdev->lru_lock);
> > + ret = ttm_bo_reserve(bo, ctx->interruptible, ctx-
> > >no_wait_gpu, NULL);
> > + if (ret)
> > + goto out_no_lock;
> > + if (bo->resource != res || res->mem_type != mem_type)
> > + goto out_bad_res;
> >
> > - if (bo->base.resv == ctx->resv) {
> > - dma_resv_assert_held(bo->base.resv);
> > - if (ctx->allow_res_evict)
> > - ret = true;
> > - *locked = false;
> > - if (busy)
> > - *busy = false;
> > + if (bo->deleted) {
> > + ret = ttm_bo_wait_ctx(bo, ctx);
> > + if (ret)
> > + ttm_bo_cleanup_memtype_use(bo);
> > } else {
> > - ret = dma_resv_trylock(bo->base.resv);
> > - *locked = ret;
> > - if (busy)
> > - *busy = !ret;
> > - }
> > -
> > - if (ret && place && (bo->resource->mem_type != place-
> > >mem_type ||
> > - !bo->bdev->funcs->eviction_valuable(bo, place))) {
> > - ret = false;
> > - if (*locked) {
> > - dma_resv_unlock(bo->base.resv);
> > - *locked = false;
> > - }
> > + ret = ttm_bo_evict(bo, ctx);
> > }
> > -
> > +out_bad_res:
> > + dma_resv_unlock(bo->base.resv);
> > +out_no_lock:
> > + ttm_bo_put(bo);
> > + ttm_resource_cursor_fini(&cursor);
> > return ret;
> > +
> > +out_no_ref:
> > + ttm_resource_cursor_fini_locked(&cursor);
> > + spin_unlock(&bdev->lru_lock);
> > + return -ENOENT;
> > }
> >
> > /**
> > - * ttm_mem_evict_wait_busy - wait for a busy BO to become
> > available
> > - *
> > - * @busy_bo: BO which couldn't be locked with trylock
> > - * @ctx: operation context
> > - * @ticket: acquire ticket
> > - *
> > - * Try to lock a busy buffer object to avoid failing eviction.
> > + * struct ttm_bo_evict_walk - Parameters for the evict walk.
> > */
> > -static int ttm_mem_evict_wait_busy(struct ttm_buffer_object
> > *busy_bo,
> > - struct ttm_operation_ctx *ctx,
> > - struct ww_acquire_ctx *ticket)
> > -{
> > - int r;
> > -
> > - if (!busy_bo || !ticket)
> > - return -EBUSY;
> > -
> > - if (ctx->interruptible)
> > - r = dma_resv_lock_interruptible(busy_bo-
> > >base.resv,
> > - ticket);
> > - else
> > - r = dma_resv_lock(busy_bo->base.resv, ticket);
> > -
> > - /*
> > - * TODO: It would be better to keep the BO locked until
> > allocation is at
> > - * least tried one more time, but that would mean a much
> > larger rework
> > - * of TTM.
> > - */
> > - if (!r)
> > - dma_resv_unlock(busy_bo->base.resv);
> > -
> > - return r == -EDEADLK ? -EBUSY : r;
> > -}
> > +struct ttm_bo_evict_walk {
> > + /** @walk: The walk base parameters. */
> > + struct ttm_lru_walk walk;
> > + /** @place: The place passed to the resource allocation.
> > */
> > + const struct ttm_place *place;
> > + /** @evictor: The buffer object we're trying to make room
> > for. */
> > + struct ttm_buffer_object *evictor;
> > + /** @res: The allocated resource if any. */
> > + struct ttm_resource **res;
> > + /** @evicted: The number of evicted pages. */
> > + unsigned long evicted;
> > +};
> >
> > -int ttm_mem_evict_first(struct ttm_device *bdev,
> > - struct ttm_resource_manager *man,
> > - const struct ttm_place *place,
> > - struct ttm_operation_ctx *ctx,
> > - struct ww_acquire_ctx *ticket)
> > +static long ttm_bo_evict_cb(struct ttm_lru_walk *walk, struct
> > ttm_buffer_object *bo)
> > {
> > - struct ttm_buffer_object *bo = NULL, *busy_bo = NULL;
> > - struct ttm_resource_cursor cursor;
> > - struct ttm_resource *res;
> > - bool locked = false;
> > - int ret;
> > + struct ttm_bo_evict_walk *evict_walk =
> > + container_of(walk, typeof(*evict_walk), walk);
> > + long lret;
> >
> > - spin_lock(&bdev->lru_lock);
> > - ttm_resource_manager_for_each_res(man, &cursor, res) {
> > - bool busy;
> > -
> > - if (!ttm_bo_evict_swapout_allowable(res->bo, ctx,
> > place,
> > - &locked,
> > &busy)) {
> > - if (busy && !busy_bo && ticket !=
> > - dma_resv_locking_ctx(res->bo-
> > >base.resv))
> > - busy_bo = res->bo;
> > - continue;
> > - }
> > + if (!bo->bdev->funcs->eviction_valuable(bo, evict_walk-
> > >place))
> > + return 0;
> >
> > - if (ttm_bo_get_unless_zero(res->bo)) {
> > - bo = res->bo;
> > - break;
> > - }
> > - if (locked)
> > - dma_resv_unlock(res->bo->base.resv);
> > + if (bo->deleted) {
> > + lret = ttm_bo_wait_ctx(bo, walk->ctx);
> > + if (!lret)
> > + ttm_bo_cleanup_memtype_use(bo);
> > + } else {
> > + lret = ttm_bo_evict(bo, walk->ctx);
> > }
> > - ttm_resource_cursor_fini_locked(&cursor);
> >
> > - if (!bo) {
> > - if (busy_bo && !ttm_bo_get_unless_zero(busy_bo))
> > - busy_bo = NULL;
> > - spin_unlock(&bdev->lru_lock);
> > - ret = ttm_mem_evict_wait_busy(busy_bo, ctx,
> > ticket);
> > - if (busy_bo)
> > - ttm_bo_put(busy_bo);
> > - return ret;
> > - }
> > + if (lret)
> > + goto out;
> >
> > - if (bo->deleted) {
> > - ret = ttm_bo_cleanup_refs(bo, ctx->interruptible,
> > - ctx->no_wait_gpu,
> > locked);
> > - ttm_bo_put(bo);
> > - return ret;
> > - }
> > + evict_walk->evicted++;
> > + if (evict_walk->res)
> > + lret = ttm_resource_alloc(evict_walk->evictor,
> > evict_walk->place,
> > + evict_walk->res);
> > + if (lret == 0)
> > + return 1;
> > +out:
> > + /* Errors that should terminate the walk. */
> > + if (lret == -ENOMEM || lret == -EINTR || lret == -
> > ERESTARTSYS ||
> > + lret == -EAGAIN)
> > + return lret;
> >
> > - spin_unlock(&bdev->lru_lock);
> > + return 0;
> > +}
> >
> > - ret = ttm_bo_evict(bo, ctx);
> > - if (locked)
> > - ttm_bo_unreserve(bo);
> > - else
> > - ttm_bo_move_to_lru_tail_unlocked(bo);
> > +static const struct ttm_lru_walk_ops ttm_evict_walk_ops = {
> > + .process_bo = ttm_bo_evict_cb,
> > +};
> >
> > - ttm_bo_put(bo);
> > - return ret;
> > +static int ttm_bo_evict_alloc(struct ttm_device *bdev,
> > + struct ttm_resource_manager *man,
> > + const struct ttm_place *place,
> > + struct ttm_buffer_object *evictor,
> > + struct ttm_operation_ctx *ctx,
> > + struct ww_acquire_ctx *ticket,
> > + struct ttm_resource **res)
> > +{
> > + struct ttm_bo_evict_walk evict_walk = {
> > + .walk = {
> > + .ops = &ttm_evict_walk_ops,
> > + .ctx = ctx,
> > + .ticket = ticket,
> > + },
> > + .place = place,
> > + .evictor = evictor,
> > + .res = res,
> > + };
> > + long lret;
> > +
> > + evict_walk.walk.trylock_only = true;
> > + lret = ttm_lru_walk_for_evict(&evict_walk.walk, bdev, man,
> > 1);
> > + if (lret || !ticket)
> > + goto out;
> > +
> > + /* If ticket-locking, repeat while making progress. */
> > + evict_walk.walk.trylock_only = false;
> > + do {
> > + /* The walk may clear the evict_walk.walk.ticket
> > field */
> > + evict_walk.walk.ticket = ticket;
> > + evict_walk.evicted = 0;
> > + lret = ttm_lru_walk_for_evict(&evict_walk.walk,
> > bdev, man, 1);
> > + } while (!lret && evict_walk.evicted);
> > +out:
> > + if (lret < 0)
> > + return lret;
> > + if (lret == 0)
> > + return -EBUSY;
> > + return 0;
> > }
> >
> > /**
> > @@ -760,6 +689,7 @@ static int ttm_bo_alloc_resource(struct
> > ttm_buffer_object *bo,
> > for (i = 0; i < placement->num_placement; ++i) {
> > const struct ttm_place *place = &placement-
> > >placement[i];
> > struct ttm_resource_manager *man;
> > + bool may_evict;
> >
> > man = ttm_manager_type(bdev, place->mem_type);
> > if (!man || !ttm_resource_manager_used(man))
> > @@ -769,22 +699,21 @@ static int ttm_bo_alloc_resource(struct
> > ttm_buffer_object *bo,
> > TTM_PL_FLAG_FALLBACK))
> > continue;
> >
> > - do {
> > - ret = ttm_resource_alloc(bo, place, res);
> > - if (unlikely(ret && ret != -ENOSPC))
> > + may_evict = (force_space && place->mem_type !=
> > TTM_PL_SYSTEM);
> > + ret = ttm_resource_alloc(bo, place, res);
> > + if (ret) {
> > + if (ret != -ENOSPC)
> > return ret;
> > - if (likely(!ret) || !force_space)
> > - break;
> > -
> > - ret = ttm_mem_evict_first(bdev, man,
> > place, ctx,
> > - ticket);
> > - if (unlikely(ret == -EBUSY))
> > - break;
> > - if (unlikely(ret))
> > + if (!may_evict)
> > + continue;
> > +
> > + ret = ttm_bo_evict_alloc(bdev, man, place,
> > bo, ctx,
> > + ticket, res);
> > + if (ret == -EBUSY)
> > + continue;
> > + if (ret)
> > return ret;
> > - } while (1);
> > - if (ret)
> > - continue;
> > + }
> >
> > ret = ttm_bo_add_move_fence(bo, man, ctx-
> > >no_wait_gpu);
> > if (unlikely(ret)) {
> > @@ -796,7 +725,6 @@ static int ttm_bo_alloc_resource(struct
> > ttm_buffer_object *bo,
> > }
> > return 0;
> > }
> > -
> > return -ENOSPC;
> > }
> >
> > diff --git a/drivers/gpu/drm/ttm/ttm_resource.c
> > b/drivers/gpu/drm/ttm/ttm_resource.c
> > index a03090683e79..6d0c66fc36e3 100644
> > --- a/drivers/gpu/drm/ttm/ttm_resource.c
> > +++ b/drivers/gpu/drm/ttm/ttm_resource.c
> > @@ -508,24 +508,10 @@ int ttm_resource_manager_evict_all(struct
> > ttm_device *bdev,
> > };
> > struct dma_fence *fence;
> > int ret;
> > - unsigned i;
> > -
> > - /*
> > - * Can't use standard list traversal since we're
> > unlocking.
> > - */
> >
> > - spin_lock(&bdev->lru_lock);
> > - for (i = 0; i < TTM_MAX_BO_PRIORITY; ++i) {
> > - while (!list_empty(&man->lru[i])) {
> > - spin_unlock(&bdev->lru_lock);
> > - ret = ttm_mem_evict_first(bdev, man, NULL,
> > &ctx,
> > - NULL);
> > - if (ret)
> > - return ret;
> > - spin_lock(&bdev->lru_lock);
> > - }
> > - }
> > - spin_unlock(&bdev->lru_lock);
> > + do {
> > + ret = ttm_bo_evict_first(bdev, man, &ctx);
>
> Ooo, just noticed this after my initial review.
>
> This function, ttm_bo_evict_first, will return -ENOENT if
> ttm_bo_get_unless_zero returns false breaking this loop. I don't
> think
> that is the correct behavior. If ttm_bo_get_unless_zero returns false
> on
> the head of LRU, that means this is getting destroyed. I don't think
> in
> that what we want do to here. Shouldn't continue the LRU walk
> evicting
> all other BOs on the LRU list?
OK, yes, I'll take a look to see if it's possible to make that more
robust.
/Thomas
>
> Matt
>
> > + } while (!ret);
> >
> > spin_lock(&man->move_lock);
> > fence = dma_fence_get(man->move);
> > diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h
> > index 472a55b69afb..148f49f625e4 100644
> > --- a/include/drm/ttm/ttm_bo.h
> > +++ b/include/drm/ttm/ttm_bo.h
> > @@ -415,11 +415,9 @@ long ttm_bo_swapout(struct ttm_device *bdev,
> > struct ttm_operation_ctx *ctx,
> > pgoff_t target);
> > void ttm_bo_pin(struct ttm_buffer_object *bo);
> > void ttm_bo_unpin(struct ttm_buffer_object *bo);
> > -int ttm_mem_evict_first(struct ttm_device *bdev,
> > - struct ttm_resource_manager *man,
> > - const struct ttm_place *place,
> > - struct ttm_operation_ctx *ctx,
> > - struct ww_acquire_ctx *ticket);
> > +int ttm_bo_evict_first(struct ttm_device *bdev,
> > + struct ttm_resource_manager *man,
> > + struct ttm_operation_ctx *ctx);
> > vm_fault_t ttm_bo_vm_reserve(struct ttm_buffer_object *bo,
> > struct vm_fault *vmf);
> > vm_fault_t ttm_bo_vm_fault_reserved(struct vm_fault *vmf,
> > --
> > 2.44.0
> >
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v5 08/12] drm/ttm: Add a virtual base class for graphics memory backup
2024-06-20 15:17 ` Matthew Brost
@ 2024-06-24 9:26 ` Thomas Hellström
2024-06-24 15:47 ` Thomas Hellström
0 siblings, 1 reply; 36+ messages in thread
From: Thomas Hellström @ 2024-06-24 9:26 UTC (permalink / raw)
To: Matthew Brost
Cc: intel-xe, Christian König, Somalapuram Amaranath, dri-devel
On Thu, 2024-06-20 at 15:17 +0000, Matthew Brost wrote:
> On Tue, Jun 18, 2024 at 09:18:16AM +0200, Thomas Hellström wrote:
> > Initially intended for experimenting with different backup
> > solutions (shmem vs direct swap cache insertion), abstract
> > the backup destination using a virtual base class.
> >
> > Also provide a sample implementation for shmem.
> >
> > While when settling on a preferred backup solution, one could
> > perhaps skip the abstraction, this functionality may actually
> > come in handy for configurable dedicated graphics memory
> > backup to fast nvme files or similar, whithout affecting
> > swap-space. Could indeed be useful for VRAM backup on S4 and
> > other cases.
> >
>
> Implementation seemly makes sense and matches other similar usages of
> shmem /
> folio functions I could find in the kernel.
>
> A few questions / nits below.
>
> > v5:
> > - Fix a UAF. (kernel test robot, Dan Carptenter)
> >
> > Cc: Christian König <christian.koenig@amd.com>
> > Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
> > Cc: Matthew Brost <matthew.brost@intel.com>
> > Cc: <dri-devel@lists.freedesktop.org>
> > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> > ---
> > drivers/gpu/drm/ttm/Makefile | 2 +-
> > drivers/gpu/drm/ttm/ttm_backup_shmem.c | 139
> > +++++++++++++++++++++++++
> > include/drm/ttm/ttm_backup.h | 136
> > ++++++++++++++++++++++++
> > 3 files changed, 276 insertions(+), 1 deletion(-)
> > create mode 100644 drivers/gpu/drm/ttm/ttm_backup_shmem.c
> > create mode 100644 include/drm/ttm/ttm_backup.h
> >
> > diff --git a/drivers/gpu/drm/ttm/Makefile
> > b/drivers/gpu/drm/ttm/Makefile
> > index dad298127226..5e980dd90e41 100644
> > --- a/drivers/gpu/drm/ttm/Makefile
> > +++ b/drivers/gpu/drm/ttm/Makefile
> > @@ -4,7 +4,7 @@
> >
> > ttm-y := ttm_tt.o ttm_bo.o ttm_bo_util.o ttm_bo_vm.o ttm_module.o
> > \
> > ttm_execbuf_util.o ttm_range_manager.o ttm_resource.o
> > ttm_pool.o \
> > - ttm_device.o ttm_sys_manager.o
> > + ttm_device.o ttm_sys_manager.o ttm_backup_shmem.o
> > ttm-$(CONFIG_AGP) += ttm_agp_backend.o
> >
> > obj-$(CONFIG_DRM_TTM) += ttm.o
> > diff --git a/drivers/gpu/drm/ttm/ttm_backup_shmem.c
> > b/drivers/gpu/drm/ttm/ttm_backup_shmem.c
> > new file mode 100644
> > index 000000000000..f5bc47734d71
> > --- /dev/null
> > +++ b/drivers/gpu/drm/ttm/ttm_backup_shmem.c
> > @@ -0,0 +1,139 @@
> > +// SPDX-License-Identifier: MIT
> > +/*
> > + * Copyright © 2024 Intel Corporation
> > + */
> > +
> > +#include <drm/ttm/ttm_backup.h>
> > +#include <linux/page-flags.h>
> > +
> > +/**
> > + * struct ttm_backup_shmem - A shmem based ttm_backup subclass.
> > + * @backup: The base struct ttm_backup
> > + * @filp: The associated shmem object
> > + */
> > +struct ttm_backup_shmem {
> > + struct ttm_backup backup;
> > + struct file *filp;
> > +};
> > +
> > +static struct ttm_backup_shmem *to_backup_shmem(struct ttm_backup
> > *backup)
> > +{
> > + return container_of(backup, struct ttm_backup_shmem,
> > backup);
> > +}
> > +
> > +static void ttm_backup_shmem_drop(struct ttm_backup *backup,
> > unsigned long handle)
> > +{
> > + handle -= 1;
>
> Can you explain the -1 / +1 usage to handle in this code? Is it to
> test
> that 'pgoff_t i' is indeed just a hint and return a different handle?
It's IIRC because handle '0' has a reserved usage in the code, so
handle becomes file address space + 1.
I need to double-check that so that I don't confuse this with the
swap-space backend.
>
> > + shmem_truncate_range(file_inode(to_backup_shmem(backup)-
> > >filp), handle,
> > + handle + 1);
> > +}
> > +
> > +static int ttm_backup_shmem_copy_page(struct ttm_backup *backup,
> > struct page *dst,
> > + unsigned long handle, bool
> > killable)
>
> In the vfunc definition 'killable' is named 'intr'. I'd keep the
> naming
> consistent.
Sure.
>
> > +{
> > + struct file *filp = to_backup_shmem(backup)->filp;
> > + struct address_space *mapping = filp->f_mapping;
> > + struct folio *from_folio;
> > +
> > + handle -= 1;
> > + from_folio = shmem_read_folio(mapping, handle);
> > + if (IS_ERR(from_folio))
> > + return PTR_ERR(from_folio);
> > +
> > + /* Note: Use drm_memcpy_from_wc? */
> > + copy_highpage(dst, folio_file_page(from_folio, handle));
> > + folio_put(from_folio);
> > +
> > + return 0;
> > +}
> > +
> > +static unsigned long
> > +ttm_backup_shmem_backup_page(struct ttm_backup *backup, struct
> > page *page,
> > + bool writeback, pgoff_t i, gfp_t
> > page_gfp,
> > + gfp_t alloc_gfp)
> > +{
> > + struct file *filp = to_backup_shmem(backup)->filp;
> > + struct address_space *mapping = filp->f_mapping;
> > + unsigned long handle = 0;
> > + struct folio *to_folio;
> > + int ret;
> > +
> > + to_folio = shmem_read_folio_gfp(mapping, i, alloc_gfp);
> > + if (IS_ERR(to_folio))
> > + return handle;
> > +
> > + folio_mark_accessed(to_folio);
>
> Does this not need to be after 'folio_lock'?
It's used unlocked in many places in the kernel AFAICT.
>
> > + folio_lock(to_folio);
> > + folio_mark_dirty(to_folio);
> > + copy_highpage(folio_file_page(to_folio, i), page);
> > + handle = i + 1;
> > +
> > + if (writeback && !folio_mapped(to_folio) &&
> > folio_clear_dirty_for_io(to_folio)) {
> > + struct writeback_control wbc = {
> > + .sync_mode = WB_SYNC_NONE,
> > + .nr_to_write = SWAP_CLUSTER_MAX,
> > + .range_start = 0,
> > + .range_end = LLONG_MAX,
> > + .for_reclaim = 1,
> > + };
> > + folio_set_reclaim(to_folio);
> > + ret = mapping->a_ops-
> > >writepage(folio_page(to_folio, 0), &wbc);
> > + if (!folio_test_writeback(to_folio))
> > + folio_clear_reclaim(to_folio);
> > + /* If writepage succeeds, it unlocks the folio */
> > + if (ret)
> > + folio_unlock(to_folio);
> > + } else {
> > + folio_unlock(to_folio);
> > + }
> > +
> > + folio_put(to_folio);
> > +
> > + return handle;
> > +}
> > +
> > +static void ttm_backup_shmem_fini(struct ttm_backup *backup)
> > +{
> > + struct ttm_backup_shmem *sbackup =
> > to_backup_shmem(backup);
> > +
> > + fput(sbackup->filp);
> > + kfree(sbackup);
> > +}
> > +
> > +static const struct ttm_backup_ops ttm_backup_shmem_ops = {
> > + .drop = ttm_backup_shmem_drop,
> > + .copy_backed_up_page = ttm_backup_shmem_copy_page,
> > + .backup_page = ttm_backup_shmem_backup_page,
> > + .fini = ttm_backup_shmem_fini,
> > +};
> > +
> > +/**
> > + * ttm_backup_shmem_create() - Create a shmem-based struct backup.
> > + * @size: The maximum size (in bytes) to back up.
> > + *
> > + * Create a backup utilizing shmem objects.
> > + *
> > + * Return: A pointer to a struct ttm_backup on success,
> > + * an error pointer on error.
> > + */
> > +struct ttm_backup *ttm_backup_shmem_create(loff_t size)
> > +{
> > + struct ttm_backup_shmem *sbackup =
> > + kzalloc(sizeof(*sbackup), GFP_KERNEL |
> > __GFP_ACCOUNT);
> > + struct file *filp;
> > +
> > + if (!sbackup)
> > + return ERR_PTR(-ENOMEM);
> > +
> > + filp = shmem_file_setup("ttm shmem backup", size, 0);
> > + if (IS_ERR(filp)) {
> > + kfree(sbackup);
> > + return ERR_CAST(filp);
> > + }
> > +
> > + sbackup->filp = filp;
> > + sbackup->backup.ops = &ttm_backup_shmem_ops;
> > +
> > + return &sbackup->backup;
> > +}
> > +EXPORT_SYMBOL_GPL(ttm_backup_shmem_create);
> > diff --git a/include/drm/ttm/ttm_backup.h
> > b/include/drm/ttm/ttm_backup.h
> > new file mode 100644
> > index 000000000000..88e8b97a6fdc
> > --- /dev/null
> > +++ b/include/drm/ttm/ttm_backup.h
> > @@ -0,0 +1,136 @@
> > +/* SPDX-License-Identifier: MIT */
> > +/*
> > + * Copyright © 2024 Intel Corporation
> > + */
> > +
> > +#ifndef _TTM_BACKUP_H_
> > +#define _TTM_BACKUP_H_
> > +
> > +#include <linux/mm_types.h>
> > +#include <linux/shmem_fs.h>
> > +
> > +struct ttm_backup;
> > +
> > +/**
> > + * ttm_backup_handle_to_page_ptr() - Convert handle to struct page
> > pointer
> > + * @handle: The handle to convert.
> > + *
> > + * Converts an opaque handle received from the
> > + * struct ttm_backoup_ops::backup_page() function to an (invalid)
> > + * struct page pointer suitable for a struct page array.
> > + *
> > + * Return: An (invalid) struct page pointer.
> > + */
> > +static inline struct page *
> > +ttm_backup_handle_to_page_ptr(unsigned long handle)
> > +{
> > + return (struct page *)(handle << 1 | 1);
> > +}
> > +
> > +/**
> > + * ttm_backup_page_ptr_is_handle() - Whether a struct page pointer
> > is a handle
> > + * @page: The struct page pointer to check.
> > + *
> > + * Return: true if the struct page pointer is a handld returned
> > from
> > + * ttm_backup_handle_to_page_ptr(). False otherwise.
> > + */
> > +static inline bool ttm_backup_page_ptr_is_handle(const struct page
> > *page)
> > +{
> > + return (unsigned long)page & 1;
> > +}
> > +
> > +/**
> > + * ttm_backup_page_ptr_to_handle() - Convert a struct page pointer
> > to a handle
> > + * @page: The struct page pointer to convert
> > + *
> > + * Return: The handle that was previously used in
> > + * ttm_backup_handle_to_page_ptr() to obtain a struct page
> > pointer, suitable
> > + * for use as argument in the struct ttm_backup_ops drop() or
> > + * copy_backed_up_page() functions.
> > + */
> > +static inline unsigned long
> > +ttm_backup_page_ptr_to_handle(const struct page *page)
> > +{
> > + WARN_ON(!ttm_backup_page_ptr_is_handle(page));
> > + return (unsigned long)page >> 1;
> > +}
> > +
> > +/** struct ttm_backup_ops - A struct ttm_backup backend operations
> > */
> > +struct ttm_backup_ops {
> > + /**
> > + * drop - release memory associated with a handle
> > + * @backup: The struct backup pointer used to obtain the
> > handle
> > + * @handle: The handle obtained from the @backup_page
> > function.
> > + */
> > + void (*drop)(struct ttm_backup *backup, unsigned long
> > handle);
> > +
> > + /**
> > + * copy_backed_up_page - Copy the contents of a previously
> > backed
> > + * up page
> > + * @backup: The struct backup pointer used to back up the
> > page.
> > + * @dst: The struct page to copy into.
> > + * @handle: The handle returned when the page was backed
> > up.
>
> The above two are arguments flipped in order compared to function
> definition.
Will fix.
Thanks, Thomas
>
> Matt
>
> > + * @intr: Try to perform waits interruptable or at least
> > killable.
> > + *
> > + * Return: 0 on success, Negative error code on failure,
> > notably
> > + * -EINTR if @intr was set to true and a signal is
> > pending.
> > + */
> > + int (*copy_backed_up_page)(struct ttm_backup *backup,
> > struct page *dst,
> > + unsigned long handle, bool
> > intr);
> > +
> > + /**
> > + * backup_page - Backup a page
> > + * @backup: The struct backup pointer to use.
> > + * @page: The page to back up.
> > + * @writeback: Whether to perform immediate writeback of
> > the page.
> > + * This may have performance implications.
> > + * @i: A unique integer for each page and each struct
> > backup.
> > + * This is a hint allowing the backup backend to avoid
> > managing
> > + * its address space separately.
> > + * @page_gfp: The gfp value used when the page was
> > allocated.
> > + * This is used for accounting purposes.
> > + * @alloc_gfp: The gpf to be used when the backend needs
> > to allocaete
> > + * memory.
> > + *
> > + * Return: A handle on success. 0 on failure.
> > + * (This is following the swp_entry_t convention).
> > + *
> > + * Note: This function could be extended to back up a
> > folio and
> > + * backends would then split the folio internally if
> > needed.
> > + * Drawback is that the caller would then have to keep
> > track of
> > + */
> > + unsigned long (*backup_page)(struct ttm_backup *backup,
> > struct page *page,
> > + bool writeback, pgoff_t i,
> > gfp_t page_gfp,
> > + gfp_t alloc_gfp);
> > + /**
> > + * fini - Free the struct backup resources after last use.
> > + * @backup: Pointer to the struct backup whose resources
> > to free.
> > + *
> > + * After a call to @fini, it's illegal to use the @backup
> > pointer.
> > + */
> > + void (*fini)(struct ttm_backup *backup);
> > +};
> > +
> > +/**
> > + * struct ttm_backup - Abstract a backup backend.
> > + * @ops: The operations as described above.
> > + *
> > + * The struct ttm_backup is intended to be subclassed by the
> > + * backend implementation.
> > + */
> > +struct ttm_backup {
> > + const struct ttm_backup_ops *ops;
> > +};
> > +
> > +/**
> > + * ttm_backup_shmem_create() - Create a shmem-based struct backup.
> > + * @size: The maximum size (in bytes) to back up.
> > + *
> > + * Create a backup utilizing shmem objects.
> > + *
> > + * Return: A pointer to a struct ttm_backup on success,
> > + * an error pointer on error.
> > + */
> > +struct ttm_backup *ttm_backup_shmem_create(loff_t size);
> > +
> > +#endif
> > --
> > 2.44.0
> >
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v5 08/12] drm/ttm: Add a virtual base class for graphics memory backup
2024-06-24 9:26 ` Thomas Hellström
@ 2024-06-24 15:47 ` Thomas Hellström
0 siblings, 0 replies; 36+ messages in thread
From: Thomas Hellström @ 2024-06-24 15:47 UTC (permalink / raw)
To: Matthew Brost
Cc: intel-xe, Christian König, Somalapuram Amaranath, dri-devel
On Mon, 2024-06-24 at 11:26 +0200, Thomas Hellström wrote:
> On Thu, 2024-06-20 at 15:17 +0000, Matthew Brost wrote:
> > On Tue, Jun 18, 2024 at 09:18:16AM +0200, Thomas Hellström wrote:
> > > Initially intended for experimenting with different backup
> > > solutions (shmem vs direct swap cache insertion), abstract
> > > the backup destination using a virtual base class.
> > >
> > > Also provide a sample implementation for shmem.
> > >
> > > While when settling on a preferred backup solution, one could
> > > perhaps skip the abstraction, this functionality may actually
> > > come in handy for configurable dedicated graphics memory
> > > backup to fast nvme files or similar, whithout affecting
> > > swap-space. Could indeed be useful for VRAM backup on S4 and
> > > other cases.
> > >
> >
> > Implementation seemly makes sense and matches other similar usages
> > of
> > shmem /
> > folio functions I could find in the kernel.
> >
> > A few questions / nits below.
> >
> > > v5:
> > > - Fix a UAF. (kernel test robot, Dan Carptenter)
> > >
> > > Cc: Christian König <christian.koenig@amd.com>
> > > Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
> > > Cc: Matthew Brost <matthew.brost@intel.com>
> > > Cc: <dri-devel@lists.freedesktop.org>
> > > Signed-off-by: Thomas Hellström
> > > <thomas.hellstrom@linux.intel.com>
> > > ---
> > > drivers/gpu/drm/ttm/Makefile | 2 +-
> > > drivers/gpu/drm/ttm/ttm_backup_shmem.c | 139
> > > +++++++++++++++++++++++++
> > > include/drm/ttm/ttm_backup.h | 136
> > > ++++++++++++++++++++++++
> > > 3 files changed, 276 insertions(+), 1 deletion(-)
> > > create mode 100644 drivers/gpu/drm/ttm/ttm_backup_shmem.c
> > > create mode 100644 include/drm/ttm/ttm_backup.h
> > >
> > > diff --git a/drivers/gpu/drm/ttm/Makefile
> > > b/drivers/gpu/drm/ttm/Makefile
> > > index dad298127226..5e980dd90e41 100644
> > > --- a/drivers/gpu/drm/ttm/Makefile
> > > +++ b/drivers/gpu/drm/ttm/Makefile
> > > @@ -4,7 +4,7 @@
> > >
> > > ttm-y := ttm_tt.o ttm_bo.o ttm_bo_util.o ttm_bo_vm.o
> > > ttm_module.o
> > > \
> > > ttm_execbuf_util.o ttm_range_manager.o ttm_resource.o
> > > ttm_pool.o \
> > > - ttm_device.o ttm_sys_manager.o
> > > + ttm_device.o ttm_sys_manager.o ttm_backup_shmem.o
> > > ttm-$(CONFIG_AGP) += ttm_agp_backend.o
> > >
> > > obj-$(CONFIG_DRM_TTM) += ttm.o
> > > diff --git a/drivers/gpu/drm/ttm/ttm_backup_shmem.c
> > > b/drivers/gpu/drm/ttm/ttm_backup_shmem.c
> > > new file mode 100644
> > > index 000000000000..f5bc47734d71
> > > --- /dev/null
> > > +++ b/drivers/gpu/drm/ttm/ttm_backup_shmem.c
> > > @@ -0,0 +1,139 @@
> > > +// SPDX-License-Identifier: MIT
> > > +/*
> > > + * Copyright © 2024 Intel Corporation
> > > + */
> > > +
> > > +#include <drm/ttm/ttm_backup.h>
> > > +#include <linux/page-flags.h>
> > > +
> > > +/**
> > > + * struct ttm_backup_shmem - A shmem based ttm_backup subclass.
> > > + * @backup: The base struct ttm_backup
> > > + * @filp: The associated shmem object
> > > + */
> > > +struct ttm_backup_shmem {
> > > + struct ttm_backup backup;
> > > + struct file *filp;
> > > +};
> > > +
> > > +static struct ttm_backup_shmem *to_backup_shmem(struct
> > > ttm_backup
> > > *backup)
> > > +{
> > > + return container_of(backup, struct ttm_backup_shmem,
> > > backup);
> > > +}
> > > +
> > > +static void ttm_backup_shmem_drop(struct ttm_backup *backup,
> > > unsigned long handle)
> > > +{
> > > + handle -= 1;
> >
> > Can you explain the -1 / +1 usage to handle in this code? Is it to
> > test
> > that 'pgoff_t i' is indeed just a hint and return a different
> > handle?
>
> It's IIRC because handle '0' has a reserved usage in the code, so
> handle becomes file address space + 1.
>
> I need to double-check that so that I don't confuse this with the
> swap-space backend.
Ok, so the reason is that the direct swap-space backend uses
swp_entry_t as handles and returns the special swp_entry_t '0' as an
error indication. That is also used by the "backup_page()" callback and
documented there.
/Thomas
>
>
> >
> > > + shmem_truncate_range(file_inode(to_backup_shmem(backup)-
> > > > filp), handle,
> > > + handle + 1);
> > > +}
> > > +
> > > +static int ttm_backup_shmem_copy_page(struct ttm_backup *backup,
> > > struct page *dst,
> > > + unsigned long handle, bool
> > > killable)
> >
> > In the vfunc definition 'killable' is named 'intr'. I'd keep the
> > naming
> > consistent.
>
> Sure.
>
>
> >
> > > +{
> > > + struct file *filp = to_backup_shmem(backup)->filp;
> > > + struct address_space *mapping = filp->f_mapping;
> > > + struct folio *from_folio;
> > > +
> > > + handle -= 1;
> > > + from_folio = shmem_read_folio(mapping, handle);
> > > + if (IS_ERR(from_folio))
> > > + return PTR_ERR(from_folio);
> > > +
> > > + /* Note: Use drm_memcpy_from_wc? */
> > > + copy_highpage(dst, folio_file_page(from_folio, handle));
> > > + folio_put(from_folio);
> > > +
> > > + return 0;
> > > +}
> > > +
> > > +static unsigned long
> > > +ttm_backup_shmem_backup_page(struct ttm_backup *backup, struct
> > > page *page,
> > > + bool writeback, pgoff_t i, gfp_t
> > > page_gfp,
> > > + gfp_t alloc_gfp)
> > > +{
> > > + struct file *filp = to_backup_shmem(backup)->filp;
> > > + struct address_space *mapping = filp->f_mapping;
> > > + unsigned long handle = 0;
> > > + struct folio *to_folio;
> > > + int ret;
> > > +
> > > + to_folio = shmem_read_folio_gfp(mapping, i, alloc_gfp);
> > > + if (IS_ERR(to_folio))
> > > + return handle;
> > > +
> > > + folio_mark_accessed(to_folio);
> >
> > Does this not need to be after 'folio_lock'?
>
> It's used unlocked in many places in the kernel AFAICT.
>
> >
> > > + folio_lock(to_folio);
> > > + folio_mark_dirty(to_folio);
> > > + copy_highpage(folio_file_page(to_folio, i), page);
> > > + handle = i + 1;
> > > +
> > > + if (writeback && !folio_mapped(to_folio) &&
> > > folio_clear_dirty_for_io(to_folio)) {
> > > + struct writeback_control wbc = {
> > > + .sync_mode = WB_SYNC_NONE,
> > > + .nr_to_write = SWAP_CLUSTER_MAX,
> > > + .range_start = 0,
> > > + .range_end = LLONG_MAX,
> > > + .for_reclaim = 1,
> > > + };
> > > + folio_set_reclaim(to_folio);
> > > + ret = mapping->a_ops-
> > > > writepage(folio_page(to_folio, 0), &wbc);
> > > + if (!folio_test_writeback(to_folio))
> > > + folio_clear_reclaim(to_folio);
> > > + /* If writepage succeeds, it unlocks the folio
> > > */
> > > + if (ret)
> > > + folio_unlock(to_folio);
> > > + } else {
> > > + folio_unlock(to_folio);
> > > + }
> > > +
> > > + folio_put(to_folio);
> > > +
> > > + return handle;
> > > +}
> > > +
> > > +static void ttm_backup_shmem_fini(struct ttm_backup *backup)
> > > +{
> > > + struct ttm_backup_shmem *sbackup =
> > > to_backup_shmem(backup);
> > > +
> > > + fput(sbackup->filp);
> > > + kfree(sbackup);
> > > +}
> > > +
> > > +static const struct ttm_backup_ops ttm_backup_shmem_ops = {
> > > + .drop = ttm_backup_shmem_drop,
> > > + .copy_backed_up_page = ttm_backup_shmem_copy_page,
> > > + .backup_page = ttm_backup_shmem_backup_page,
> > > + .fini = ttm_backup_shmem_fini,
> > > +};
> > > +
> > > +/**
> > > + * ttm_backup_shmem_create() - Create a shmem-based struct
> > > backup.
> > > + * @size: The maximum size (in bytes) to back up.
> > > + *
> > > + * Create a backup utilizing shmem objects.
> > > + *
> > > + * Return: A pointer to a struct ttm_backup on success,
> > > + * an error pointer on error.
> > > + */
> > > +struct ttm_backup *ttm_backup_shmem_create(loff_t size)
> > > +{
> > > + struct ttm_backup_shmem *sbackup =
> > > + kzalloc(sizeof(*sbackup), GFP_KERNEL |
> > > __GFP_ACCOUNT);
> > > + struct file *filp;
> > > +
> > > + if (!sbackup)
> > > + return ERR_PTR(-ENOMEM);
> > > +
> > > + filp = shmem_file_setup("ttm shmem backup", size, 0);
> > > + if (IS_ERR(filp)) {
> > > + kfree(sbackup);
> > > + return ERR_CAST(filp);
> > > + }
> > > +
> > > + sbackup->filp = filp;
> > > + sbackup->backup.ops = &ttm_backup_shmem_ops;
> > > +
> > > + return &sbackup->backup;
> > > +}
> > > +EXPORT_SYMBOL_GPL(ttm_backup_shmem_create);
> > > diff --git a/include/drm/ttm/ttm_backup.h
> > > b/include/drm/ttm/ttm_backup.h
> > > new file mode 100644
> > > index 000000000000..88e8b97a6fdc
> > > --- /dev/null
> > > +++ b/include/drm/ttm/ttm_backup.h
> > > @@ -0,0 +1,136 @@
> > > +/* SPDX-License-Identifier: MIT */
> > > +/*
> > > + * Copyright © 2024 Intel Corporation
> > > + */
> > > +
> > > +#ifndef _TTM_BACKUP_H_
> > > +#define _TTM_BACKUP_H_
> > > +
> > > +#include <linux/mm_types.h>
> > > +#include <linux/shmem_fs.h>
> > > +
> > > +struct ttm_backup;
> > > +
> > > +/**
> > > + * ttm_backup_handle_to_page_ptr() - Convert handle to struct
> > > page
> > > pointer
> > > + * @handle: The handle to convert.
> > > + *
> > > + * Converts an opaque handle received from the
> > > + * struct ttm_backoup_ops::backup_page() function to an
> > > (invalid)
> > > + * struct page pointer suitable for a struct page array.
> > > + *
> > > + * Return: An (invalid) struct page pointer.
> > > + */
> > > +static inline struct page *
> > > +ttm_backup_handle_to_page_ptr(unsigned long handle)
> > > +{
> > > + return (struct page *)(handle << 1 | 1);
> > > +}
> > > +
> > > +/**
> > > + * ttm_backup_page_ptr_is_handle() - Whether a struct page
> > > pointer
> > > is a handle
> > > + * @page: The struct page pointer to check.
> > > + *
> > > + * Return: true if the struct page pointer is a handld returned
> > > from
> > > + * ttm_backup_handle_to_page_ptr(). False otherwise.
> > > + */
> > > +static inline bool ttm_backup_page_ptr_is_handle(const struct
> > > page
> > > *page)
> > > +{
> > > + return (unsigned long)page & 1;
> > > +}
> > > +
> > > +/**
> > > + * ttm_backup_page_ptr_to_handle() - Convert a struct page
> > > pointer
> > > to a handle
> > > + * @page: The struct page pointer to convert
> > > + *
> > > + * Return: The handle that was previously used in
> > > + * ttm_backup_handle_to_page_ptr() to obtain a struct page
> > > pointer, suitable
> > > + * for use as argument in the struct ttm_backup_ops drop() or
> > > + * copy_backed_up_page() functions.
> > > + */
> > > +static inline unsigned long
> > > +ttm_backup_page_ptr_to_handle(const struct page *page)
> > > +{
> > > + WARN_ON(!ttm_backup_page_ptr_is_handle(page));
> > > + return (unsigned long)page >> 1;
> > > +}
> > > +
> > > +/** struct ttm_backup_ops - A struct ttm_backup backend
> > > operations
> > > */
> > > +struct ttm_backup_ops {
> > > + /**
> > > + * drop - release memory associated with a handle
> > > + * @backup: The struct backup pointer used to obtain the
> > > handle
> > > + * @handle: The handle obtained from the @backup_page
> > > function.
> > > + */
> > > + void (*drop)(struct ttm_backup *backup, unsigned long
> > > handle);
> > > +
> > > + /**
> > > + * copy_backed_up_page - Copy the contents of a
> > > previously
> > > backed
> > > + * up page
> > > + * @backup: The struct backup pointer used to back up
> > > the
> > > page.
> > > + * @dst: The struct page to copy into.
> > > + * @handle: The handle returned when the page was backed
> > > up.
> >
> > The above two are arguments flipped in order compared to function
> > definition.
>
> Will fix.
>
> Thanks, Thomas
>
> >
> > Matt
> >
> > > + * @intr: Try to perform waits interruptable or at least
> > > killable.
> > > + *
> > > + * Return: 0 on success, Negative error code on failure,
> > > notably
> > > + * -EINTR if @intr was set to true and a signal is
> > > pending.
> > > + */
> > > + int (*copy_backed_up_page)(struct ttm_backup *backup,
> > > struct page *dst,
> > > + unsigned long handle, bool
> > > intr);
> > > +
> > > + /**
> > > + * backup_page - Backup a page
> > > + * @backup: The struct backup pointer to use.
> > > + * @page: The page to back up.
> > > + * @writeback: Whether to perform immediate writeback of
> > > the page.
> > > + * This may have performance implications.
> > > + * @i: A unique integer for each page and each struct
> > > backup.
> > > + * This is a hint allowing the backup backend to avoid
> > > managing
> > > + * its address space separately.
> > > + * @page_gfp: The gfp value used when the page was
> > > allocated.
> > > + * This is used for accounting purposes.
> > > + * @alloc_gfp: The gpf to be used when the backend needs
> > > to allocaete
> > > + * memory.
> > > + *
> > > + * Return: A handle on success. 0 on failure.
> > > + * (This is following the swp_entry_t convention).
> > > + *
> > > + * Note: This function could be extended to back up a
> > > folio and
> > > + * backends would then split the folio internally if
> > > needed.
> > > + * Drawback is that the caller would then have to keep
> > > track of
> > > + */
> > > + unsigned long (*backup_page)(struct ttm_backup *backup,
> > > struct page *page,
> > > + bool writeback, pgoff_t i,
> > > gfp_t page_gfp,
> > > + gfp_t alloc_gfp);
> > > + /**
> > > + * fini - Free the struct backup resources after last
> > > use.
> > > + * @backup: Pointer to the struct backup whose resources
> > > to free.
> > > + *
> > > + * After a call to @fini, it's illegal to use the
> > > @backup
> > > pointer.
> > > + */
> > > + void (*fini)(struct ttm_backup *backup);
> > > +};
> > > +
> > > +/**
> > > + * struct ttm_backup - Abstract a backup backend.
> > > + * @ops: The operations as described above.
> > > + *
> > > + * The struct ttm_backup is intended to be subclassed by the
> > > + * backend implementation.
> > > + */
> > > +struct ttm_backup {
> > > + const struct ttm_backup_ops *ops;
> > > +};
> > > +
> > > +/**
> > > + * ttm_backup_shmem_create() - Create a shmem-based struct
> > > backup.
> > > + * @size: The maximum size (in bytes) to back up.
> > > + *
> > > + * Create a backup utilizing shmem objects.
> > > + *
> > > + * Return: A pointer to a struct ttm_backup on success,
> > > + * an error pointer on error.
> > > + */
> > > +struct ttm_backup *ttm_backup_shmem_create(loff_t size);
> > > +
> > > +#endif
> > > --
> > > 2.44.0
> > >
>
^ permalink raw reply [flat|nested] 36+ messages in thread
end of thread, other threads:[~2024-06-24 15:47 UTC | newest]
Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-18 7:18 [PATCH v5 00/12] TTM shrinker helpers and xe buffer object shrinker Thomas Hellström
2024-06-18 7:18 ` [PATCH v5 01/12] drm/ttm: Allow TTM LRU list nodes of different types Thomas Hellström
2024-06-18 7:18 ` [PATCH v5 02/12] drm/ttm: Slightly clean up LRU list iteration Thomas Hellström
2024-06-18 7:18 ` [PATCH v5 03/12] drm/ttm: Use LRU hitches Thomas Hellström
2024-06-18 7:18 ` [PATCH v5 04/12] drm/ttm, drm/amdgpu, drm/xe: Consider hitch moves within bulk sublist moves Thomas Hellström
2024-06-19 3:37 ` Matthew Brost
2024-06-19 8:24 ` Thomas Hellström
2024-06-19 14:44 ` Matthew Brost
2024-06-18 7:18 ` [PATCH v5 05/12] drm/ttm: Provide a generic LRU walker helper Thomas Hellström
2024-06-18 22:11 ` Matthew Brost
2024-06-19 7:31 ` Thomas Hellström
2024-06-19 15:09 ` Matthew Brost
2024-06-18 7:18 ` [PATCH v5 06/12] drm/ttm: Use the LRU walker helper for swapping Thomas Hellström
2024-06-19 4:23 ` Matthew Brost
2024-06-19 8:36 ` Thomas Hellström
2024-06-18 7:18 ` [PATCH v5 07/12] drm/ttm: Use the LRU walker for eviction Thomas Hellström
2024-06-19 22:52 ` Matthew Brost
2024-06-24 9:06 ` Thomas Hellström
2024-06-19 23:33 ` Matthew Brost
2024-06-24 9:16 ` Thomas Hellström
2024-06-18 7:18 ` [PATCH v5 08/12] drm/ttm: Add a virtual base class for graphics memory backup Thomas Hellström
2024-06-20 15:17 ` Matthew Brost
2024-06-24 9:26 ` Thomas Hellström
2024-06-24 15:47 ` Thomas Hellström
2024-06-18 7:18 ` [PATCH v5 09/12] drm/ttm/pool: Provide a helper to shrink pages Thomas Hellström
2024-06-18 7:18 ` [PATCH v5 10/12] drm/ttm: Use fault-injection to test error paths Thomas Hellström
2024-06-18 7:18 ` [PATCH v5 11/12] drm/ttm, drm/xe: Add a shrinker for xe bos Thomas Hellström
2024-06-18 7:18 ` [PATCH v5 12/12] drm/xe: Increase the XE_PL_TT watermark Thomas Hellström
2024-06-18 7:24 ` ✓ CI.Patch_applied: success for TTM shrinker helpers and xe buffer object shrinker (rev5) Patchwork
2024-06-18 7:24 ` ✗ CI.checkpatch: warning " Patchwork
2024-06-18 7:25 ` ✓ CI.KUnit: success " Patchwork
2024-06-18 7:37 ` ✓ CI.Build: " Patchwork
2024-06-18 7:39 ` ✗ CI.Hooks: failure " Patchwork
2024-06-18 7:41 ` ✗ CI.checksparse: warning " Patchwork
2024-06-18 8:03 ` ✓ CI.BAT: success " Patchwork
2024-06-18 19:08 ` ✗ CI.FULL: failure " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox