All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
To: Jan Maslak <jan.maslak@intel.com>, <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH 2/2] tests/intel/xe_eudebug_online: Add pagefault stress tests
Date: Mon, 2 Jun 2025 18:14:35 +0300	[thread overview]
Message-ID: <a0da5c25-4ad3-43f4-a418-c5dace6ff805@intel.com> (raw)
In-Reply-To: <20250526001304.2899977-3-jan.maslak@intel.com>



On 5/26/25 3:13 AM, Jan Maslak wrote:
> Add a stress variant of the already existing
> xe_eudebug_online@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@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 */
This value causes the Local Y Maximum and Local X Maximum values to be 
set higher than the values that can be set in the COMPUTE_WALKER_BODY 
structure used by the COMPUTE_WALKER command.
Please check that these values are set correctly in the 
__xehp_gpgpu_execfunc() function

G.G.
> +
>   	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);
>   


  reply	other threads:[~2025-06-02 15:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-26  0:13 [PATCH 0/2] tests/intel/xe_eudebug_online: Introduce pagefault stress tests Jan Maslak
2025-05-26  0:13 ` [PATCH 1/2] lib/gpu_cmds: expose num_threads_in_tg parameter for tests Jan Maslak
2025-06-02 12:54   ` Gwan-gyeong Mun
2025-06-02 19:19     ` Zbigniew Kempczyński
2025-05-26  0:13 ` [PATCH 2/2] tests/intel/xe_eudebug_online: Add pagefault stress tests Jan Maslak
2025-06-02 15:14   ` Gwan-gyeong Mun [this message]
2025-05-26  0:48 ` ✓ Xe.CI.BAT: success for tests/intel/xe_eudebug_online: Introduce " Patchwork
2025-05-26  1:00 ` ✓ i915.CI.BAT: " Patchwork
2025-05-26  2:36 ` ✗ Xe.CI.Full: failure " Patchwork
2025-05-26  2:42 ` ✗ i915.CI.Full: " Patchwork
2025-11-20 13:31   ` Jan Maslak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a0da5c25-4ad3-43f4-a418-c5dace6ff805@intel.com \
    --to=gwan-gyeong.mun@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jan.maslak@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.