[PATCH] drm/xe/tests: Limit purgeable size for faster execution
Nirmoy Das
nirmoy.das at intel.com
Wed Nov 13 15:02:28 UTC 2024
xe_bo_shrink_kunit takes a while to run on some machines depending
on swap storage speed and ram size. Limit purgeable size to 2GB
so xe_bo_shrink_kunit can execute much faster.
Cc: Matthew Auld <matthew.auld at intel.com>
Suggested-by: Thomas Hellström <thomas.hellstrom at linux.intel.com>
Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2998
Signed-off-by: Nirmoy Das <nirmoy.das at intel.com>
---
drivers/gpu/drm/xe/tests/xe_bo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/tests/xe_bo.c b/drivers/gpu/drm/xe/tests/xe_bo.c
index cd811aa2b227..71b71a546abe 100644
--- a/drivers/gpu/drm/xe/tests/xe_bo.c
+++ b/drivers/gpu/drm/xe/tests/xe_bo.c
@@ -467,7 +467,7 @@ static int shrink_test_run_device(struct xe_device *xe)
}
to_alloc = ram * 2;
- ram_and_swap = ram + get_nr_swap_pages() * PAGE_SIZE;
+ ram_and_swap = ram + min(get_nr_swap_pages() * PAGE_SIZE, SZ_2G);
if (to_alloc > ram_and_swap)
purgeable = to_alloc - ram_and_swap;
purgeable += div64_u64(purgeable, 5);
--
2.46.0
More information about the Intel-xe
mailing list