[PATCH i-g-t] tests/intel/xe_oa: Adapt tests for 128MB OA buffer size
Dixit, Ashutosh
ashutosh.dixit at intel.com
Wed Nov 13 02:00:31 UTC 2024
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
More information about the igt-dev
mailing list