[PATCH 2/2] tests/intel/xe_eudebug_online: Add pagefault stress tests
Jan Maslak
jan.maslak at intel.com
Mon May 26 00:13:04 UTC 2025
Add a stress variant of the already existing
xe_eudebug_online at pagefault-[read|write] tests that increases
number of threads in the shader and number of threads in
threadgroup to their maximum available amounts.
Signed-off-by: Jan Maslak <jan.maslak at intel.com>
---
tests/intel/xe_eudebug_online.c | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/tests/intel/xe_eudebug_online.c b/tests/intel/xe_eudebug_online.c
index 3d138bdc3..ad62dd929 100644
--- a/tests/intel/xe_eudebug_online.c
+++ b/tests/intel/xe_eudebug_online.c
@@ -39,6 +39,7 @@
#define SHADER_PAGEFAULT_READ (1 << 14)
#define SHADER_PAGEFAULT_WRITE (1 << 15)
#define FAULTABLE_VM (1 << 16)
+#define PAGEFAULT_STRESS_TEST (1 << 17)
#define TRIGGER_UFENCE_SET_BREAKPOINT (1 << 24)
#define TRIGGER_RESUME_SINGLE_WALK (1 << 25)
#define TRIGGER_RESUME_PARALLEL_WALK (1 << 26)
@@ -126,6 +127,9 @@ static struct intel_buf *create_uc_buf(int fd, int width, int height, uint64_t r
static int get_number_of_threads(uint64_t flags)
{
+ if (flags & (PAGEFAULT_STRESS_TEST))
+ return 65535; /* 64K - 1 */
+
if (flags & (SHADER_MIN_THREADS | SHADER_PAGEFAULT))
return 16;
@@ -1068,6 +1072,10 @@ static void run_online_client(struct xe_eudebug_client *c)
struct intel_buf *buf;
uint32_t *ptr;
int fd, vm_flags;
+ uint32_t num_threads_in_tg = 1;
+
+ if (c->flags & PAGEFAULT_STRESS_TEST)
+ num_threads_in_tg = 64;
metadata[0] = calloc(2, sizeof(**metadata));
metadata[1] = calloc(2, sizeof(**metadata));
@@ -1115,7 +1123,7 @@ static void run_online_client(struct xe_eudebug_client *c)
sip = get_sip(fd, c->flags);
igt_nsec_elapsed(&ts);
- gpgpu_shader_exec(ibb, buf, w_dim.x, w_dim.y, 1, shader, sip, 0, 0);
+ gpgpu_shader_exec(ibb, buf, w_dim.x, w_dim.y, num_threads_in_tg, shader, sip, 0, 0);
gpgpu_shader_destroy(sip);
gpgpu_shader_destroy(shader);
@@ -1629,6 +1637,18 @@ static void test_set_breakpoint_online_sigint_debugger(int fd,
* Description:
* Check whether KMD sends pagefault event for workload in debug mode that
* triggers a write pagefault.
+ *
+ * SUBTEST: pagefault-read-stress
+ * Functionality: page faults
+ * Description:
+ * Check whether KMD sends read pagefault event for workload in debug mode
+ * with many threads.
+ *
+ * SUBTEST: pagefault-write-stress
+ * Functionality: page faults
+ * Description:
+ * Check whether KMD sends write pagefault event for workload in debug mode
+ * with many threads.
*/
static void test_pagefault_online(int fd, struct drm_xe_engine_class_instance *hwe,
int flags)
@@ -2664,6 +2684,11 @@ igt_main
test_gt_render_or_compute("pagefault-write", fd, hwe)
test_pagefault_online(fd, hwe, SHADER_PAGEFAULT_WRITE);
+ test_gt_render_or_compute("pagefault-read-stress", fd, hwe)
+ test_pagefault_online(fd, hwe, SHADER_PAGEFAULT_READ | PAGEFAULT_STRESS_TEST);
+ test_gt_render_or_compute("pagefault-write-stress", fd, hwe)
+ test_pagefault_online(fd, hwe, SHADER_PAGEFAULT_WRITE | PAGEFAULT_STRESS_TEST);
+
igt_fixture {
xe_eudebug_enable(fd, was_enabled);
--
2.34.1
More information about the igt-dev
mailing list