Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
To: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
Cc: <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH 09/13] tests/intel/xe_oa: Test oa buffer sizes
Date: Tue, 18 Feb 2025 10:44:54 -0800	[thread overview]
Message-ID: <Z7TVJuGk5lgHciFy@orsosgc001> (raw)
In-Reply-To: <85seob14qa.wl-ashutosh.dixit@intel.com>

On Tue, Feb 18, 2025 at 10:34:53AM -0800, Dixit, Ashutosh wrote:
>On Fri, 14 Feb 2025 17:06:24 -0800, Umesh Nerlige Ramappa wrote:
>>
>> Introduce oa buffer size test separately. Pick a random valid buffer
>> size for the test.
>>
>> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
>> ---
>>  tests/intel/xe_oa.c | 30 ++++++++++++++++++++++++++++++
>>  1 file changed, 30 insertions(+)
>>
>> diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
>> index 03d223df4..ee87b7338 100644
>> --- a/tests/intel/xe_oa.c
>> +++ b/tests/intel/xe_oa.c
>> @@ -93,6 +93,23 @@ struct accumulator {
>>	uint64_t deltas[MAX_RAW_OA_COUNTERS];
>>  };
>>
>> +struct oa_buf_size {
>> +	char name[12];
>> +	uint32_t size;
>> +} buf_sizes[] = {
>> +	{ "128K", SZ_128K },
>> +	{ "256K", SZ_256K },
>> +	{ "512K", SZ_512K },
>> +	{ "1M", SZ_1M },
>> +	{ "2M", SZ_2M },
>> +	{ "4M", SZ_4M },
>> +	{ "8M", SZ_8M },
>> +	{ "16M", SZ_16M },
>> +	{ "32M", SZ_32M },
>> +	{ "64M", SZ_64M },
>> +	{ "128M", SZ_128M },
>
>Would you have the running time for these? Hopefully not too huge for the
>large buffer sizes, even if we are running just one of them? And what about
>slower platforms?
>
>That was the reason we restricted OA buffer size to just 16 M.
>
>This is what I measured here:
>
>https://patchwork.freedesktop.org/patch/627269/?series=142128&rev=1
>
>	$ sudo ./build/tests/xe_oa --r oa-buffer-size
>	IGT-Version: 1.29-g724fd0b79 (x86_64) (Linux: 6.12.0-rc4+ x86_64)
>	Using IGT_SRANDOM=1733459091 for randomisation
>	Opened device: /dev/dri/card0
>	Starting subtest: oa-buffer-size
>	Starting dynamic subtest: 8MB
>	Dynamic subtest 8MB: SUCCESS (0.403s)
>	Starting dynamic subtest: 32MB
>	Dynamic subtest 32MB: SUCCESS (1.595s)
>	Starting dynamic subtest: 128MB
>	Dynamic subtest 128MB: SUCCESS (6.326s)
>	Subtest oa-buffer-size: SUCCESS (8.324s)

I can run 128MB and see how long it takes. I guess I didn't hit the 
larger buffers on random runs.  Technically around 30 seconds for 128MB 
buffer with 20us period and a 256 byte report. If report is 576 bytes, 
then 13 seconds. As long as it falls within the IGT timeout period, we 
should be good.

Thanks,
Umesh


>
>> +};
>> +
>>  /* OA unit types */
>>  enum {
>>	OAG,
>> @@ -305,6 +322,7 @@ static struct intel_mmio_data mmio_data;
>>  static igt_render_copyfunc_t render_copy;
>>  static uint32_t rc_width, rc_height;
>>  static uint32_t buffer_fill_size;
>> +static uint32_t num_buf_sizes;
>>
>>  static struct intel_xe_perf_metric_set *metric_set(const struct drm_xe_engine_class_instance *hwe)
>>  {
>> @@ -1094,6 +1112,7 @@ init_sys_info(void)
>>	rc_width = 1920;
>>	rc_height = 1080;
>>	buffer_fill_size = SZ_16M;
>> +	num_buf_sizes = ARRAY_SIZE(buf_sizes);
>>	oa_exponent_default = max_oa_exponent_for_period_lte(1000000);
>>
>>	default_oa_buffer_size = get_default_oa_buffer_size(drm_fd);
>> @@ -4805,6 +4824,17 @@ igt_main
>>		__for_one_hwe_in_oag(hwe)
>>			test_buffer_fill(hwe);
>>
>> +	/**
>> +	 * SUBTEST: buffer-size
>> +	 * Description: Test various OA buffer sizes
>> +	 */
>> +	igt_subtest_with_dynamic("buffer-size") {
>> +		long k = random() % num_buf_sizes;
>> +
>> +		__for_one_hwe_in_oag_w_arg(hwe, buf_sizes[k].name)
>> +			test_non_zero_reason(hwe, buf_sizes[k].size);
>> +	}
>> +
>>	igt_subtest_with_dynamic("non-zero-reason")
>>		__for_one_hwe_in_oag(hwe)
>>			test_non_zero_reason(hwe, 0);
>> --
>> 2.34.1
>>

  parent reply	other threads:[~2025-02-18 18:45 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-15  1:06 [PATCH 00/13] Some refactor, rewrite and fixes for OA tests Umesh Nerlige Ramappa
2025-02-15  1:06 ` [PATCH 01/13] tests/intel/xe_oa: Use static for global variables Umesh Nerlige Ramappa
2025-02-18 17:28   ` Dixit, Ashutosh
2025-02-15  1:06 ` [PATCH 02/13] tests/intel/xe_oa: Drop unused macro Umesh Nerlige Ramappa
2025-02-18 17:32   ` Dixit, Ashutosh
2025-02-15  1:06 ` [PATCH 03/13] tests/intel/xe_oa: Rename oa_exp_1_millisec to oa_exponent_default Umesh Nerlige Ramappa
2025-02-22  2:42   ` Dixit, Ashutosh
2025-02-22  3:35     ` Dixit, Ashutosh
2025-02-15  1:06 ` [PATCH 04/13] tests/intel/xe_oa: Use default exponent for some tests Umesh Nerlige Ramappa
2025-02-22  2:43   ` Dixit, Ashutosh
2025-02-22  3:37     ` Dixit, Ashutosh
2025-02-15  1:06 ` [PATCH 05/13] tests/intel/xe_oa: Use same render copy width and height across tests Umesh Nerlige Ramappa
2025-02-22  2:48   ` Dixit, Ashutosh
2025-02-15  1:06 ` [PATCH 06/13] tests/intel/xe_oa: Rewrite the polling small buf test Umesh Nerlige Ramappa
2025-02-24 21:35   ` Dixit, Ashutosh
2025-02-25  4:26     ` Dixit, Ashutosh
2025-02-25 22:51       ` Umesh Nerlige Ramappa
2025-02-27  3:45         ` Dixit, Ashutosh
2025-02-15  1:06 ` [PATCH 07/13] tests/intel/xe_oa: Simplify the buffer-fill test Umesh Nerlige Ramappa
2025-02-24 21:33   ` Dixit, Ashutosh
2025-02-15  1:06 ` [PATCH 08/13] tests/intel/xe_oa: Use default buffer size for non-zero reason Umesh Nerlige Ramappa
2025-02-22  3:10   ` Dixit, Ashutosh
2025-02-15  1:06 ` [PATCH 09/13] tests/intel/xe_oa: Test oa buffer sizes Umesh Nerlige Ramappa
2025-02-18 18:34   ` Dixit, Ashutosh
2025-02-18 18:38     ` Dixit, Ashutosh
2025-02-18 18:44     ` Umesh Nerlige Ramappa [this message]
2025-02-22  0:13       ` Dixit, Ashutosh
2025-02-22  1:12         ` Umesh Nerlige Ramappa
2025-02-22  3:14   ` Dixit, Ashutosh
2025-02-15  1:06 ` [PATCH 10/13] tests/intel/xe_oa: Rewrite enable-disable test Umesh Nerlige Ramappa
2025-02-25  0:30   ` Dixit, Ashutosh
2025-02-25  2:54     ` Dixit, Ashutosh
2025-02-25 22:25       ` Umesh Nerlige Ramappa
2025-02-15  1:06 ` [PATCH 11/13] tests/intel/xe_oa: Enable unprivileged-single-ctx-counters and fix it Umesh Nerlige Ramappa
2025-02-25  3:53   ` Dixit, Ashutosh
2025-02-15  1:06 ` [PATCH 12/13] tests/intel/xe_oa: Fix mmio_trigger_reports testing Umesh Nerlige Ramappa
2025-02-22  3:32   ` Dixit, Ashutosh
2025-02-15  1:06 ` [PATCH 13/13] tests/intel/xe_oa: Set boundaries for OA exponent test Umesh Nerlige Ramappa
2025-02-22  3:17   ` Dixit, Ashutosh
2025-02-15  2:09 ` ✓ Xe.CI.BAT: success for Some refactor, rewrite and fixes for OA tests Patchwork
2025-02-15  2:23 ` ✗ i915.CI.BAT: failure " Patchwork
2025-02-18 18:32   ` Umesh Nerlige Ramappa
2025-02-16  8:05 ` ✗ Xe.CI.Full: " Patchwork
2025-02-18 18:38   ` Umesh Nerlige Ramappa
2025-02-18 18:40     ` Dixit, Ashutosh

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=Z7TVJuGk5lgHciFy@orsosgc001 \
    --to=umesh.nerlige.ramappa@intel.com \
    --cc=ashutosh.dixit@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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