Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Sai Teja Pottumuttu <sai.teja.pottumuttu@intel.com>
Cc: <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t] tests/intel/xe_oa: Adapt tests for 128MB OA buffer size
Date: Tue, 12 Nov 2024 18:00:31 -0800	[thread overview]
Message-ID: <85ed3fyjsw.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20241112185901.2326879-1-sai.teja.pottumuttu@intel.com>

On Tue, 12 Nov 2024 10:59:01 -0800, Sai Teja Pottumuttu wrote:
>
> diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
> index 33e978a48..9ea7e73d2 100644
> --- a/tests/intel/xe_oa.c
> +++ b/tests/intel/xe_oa.c
> @@ -63,7 +63,7 @@
>  #define PIPE_CONTROL_PPGTT_WRITE	(0 << 2)
>  #define PIPE_CONTROL_GLOBAL_GTT_WRITE   (1 << 2)
>
> -#define MAX_OA_BUF_SIZE (16 * 1024 * 1024)
> +#define MAX_OA_BUF_SIZE (128 * 1024 * 1024)
>  #define OA_BUFFER_SIZE MAX_OA_BUF_SIZE
>
>  #define RING_FORCE_TO_NONPRIV_ADDRESS_MASK 0x03fffffc
> @@ -2364,7 +2364,7 @@ test_buffer_fill(const struct drm_xe_engine_class_instance *hwe)
>		.properties_ptr = to_user_pointer(properties),
>	};
>	size_t report_size = get_oa_format(fmt).size;
> -	int buf_size = 65536 * report_size;
> +	int buf_size = OA_BUFFER_SIZE;
>	uint8_t *buf = malloc(buf_size);
>	int len;
>	size_t oa_buf_size = MAX_OA_BUF_SIZE;
> @@ -2590,7 +2590,7 @@ test_enable_disable(const struct drm_xe_engine_class_instance *hwe)
>		.properties_ptr = to_user_pointer(properties),
>	};
>	size_t report_size = get_oa_format(fmt).size;
> -	int buf_size = 65536 * report_size;
> +	int buf_size = OA_BUFFER_SIZE;
>	uint8_t *buf = malloc(buf_size);
>	size_t oa_buf_size = MAX_OA_BUF_SIZE;
>	int n_full_oa_reports = oa_buf_size / report_size;

1. Thanks for the patch. Though I still see this intermittent failure with
   https://patchwork.freedesktop.org/series/140390/:

	Starting subtest: oa-unit-concurrent-oa-buffer-read
	(xe_oa:13996) CRITICAL: Test assertion failure function test_blocking, file ../tests/intel/xe_oa.c:1994:
	(xe_oa:13996) CRITICAL: Failed assertion: kernel_ns <= (test_duration_ns / 100ull)
	Stack trace:
	  #0 ../lib/igt_core.c:2051 __igt_fail_assert()
	  #1 ../tests/intel/xe_oa.c:1991 test_blocking.constprop.0()
	  #2 ../tests/intel/xe_oa.c:4258 __igt_unique____real_main4759()
	  #3 ../tests/intel/xe_oa.c:4759 main()
	  #4 ../sysdeps/nptl/libc_start_call_main.h:58 __libc_start_call_main()
	  #5 ../csu/libc-start.c:128 __libc_start_main@@GLIBC_2.34()
	  #6 [_start+0x25]
	child 0 failed with exit status 98
	Subtest oa-unit-concurrent-oa-buffer-read failed.
	No log.
	Subtest oa-unit-concurrent-oa-buffer-read: FAIL (1.132s)

I can also suggest the following general improvements in this area if you
have time:

1. Get rid of MAX_OA_BUF_SIZE, just keep OA_BUFFER_SIZE

2. Rather than hardcoding OA_BUFFER_SIZE, define a global variable and
   populate it using DRM_XE_OBSERVATION_IOCTL_INFO (see
   include/drm-uapi/xe_drm.h). Populating the variable once, in a fixture,
   before the tests run should be sufficient.

These can be done even now. If you do these, please do them in separate
patches to keep the code reviews easy.

Thanks.
--
Ashutosh

      parent reply	other threads:[~2024-11-13  2:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-12 18:59 [PATCH i-g-t] tests/intel/xe_oa: Adapt tests for 128MB OA buffer size Sai Teja Pottumuttu
2024-11-12 20:05 ` ✗ Fi.CI.BAT: failure for " Patchwork
2024-11-12 20:11 ` ✓ CI.xeBAT: success " Patchwork
2024-11-12 21:28 ` ✗ CI.xeFULL: failure " Patchwork
2024-11-13  2:00 ` Dixit, Ashutosh [this message]

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=85ed3fyjsw.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=sai.teja.pottumuttu@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox