Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
To: Ashutosh Dixit <ashutosh.dixit@intel.com>
Cc: <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t 5/6] tests/intel/xe_oa: Reduce test_non_zero_reason execution time
Date: Fri, 2 May 2025 15:07:50 -0700	[thread overview]
Message-ID: <aBVCNm_Pigb4YHsy@unerlige-desk.amr.corp.intel.com> (raw)
In-Reply-To: <20250422193458.1467567-6-ashutosh.dixit@intel.com>

On Tue, Apr 22, 2025 at 12:34:57PM -0700, Ashutosh Dixit wrote:
>Only check a single report from a random location to reduce
>test_non_zero_reason execution time.
>
>Before:
>	Starting subtest: non-zero-reason
>	Starting dynamic subtest: rcs-0
>	Dynamic subtest rcs-0: SUCCESS (11.108s)
>	Subtest non-zero-reason: SUCCESS (11.108s)
>
>With this patch:
>	Starting subtest: non-zero-reason
>	Starting dynamic subtest: rcs-0
>	Dynamic subtest rcs-0: SUCCESS (1.200s)
>	Subtest non-zero-reason: SUCCESS (1.200s)
>
>v2: Check one report at a random location (Umesh)
>
>Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>

Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>

>---
> tests/intel/xe_oa.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
>diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
>index 83495bbacf..c01adbad34 100644
>--- a/tests/intel/xe_oa.c
>+++ b/tests/intel/xe_oa.c
>@@ -2616,7 +2616,7 @@ test_non_zero_reason(const struct drm_xe_engine_class_instance *hwe, size_t oa_b
> 	uint8_t *buf = malloc(buf_size);
> 	uint32_t total_len = 0;
> 	const uint32_t *last_report;
>-	int len;
>+	int len, check_idx;
> 	u32 oa_status;
>
> 	igt_assert(buf);
>@@ -2651,6 +2651,9 @@ test_non_zero_reason(const struct drm_xe_engine_class_instance *hwe, size_t oa_b
>
> 	igt_debug("Got %u bytes\n", total_len);
>
>+	check_idx = random() % (total_len / report_size);
>+	check_idx = check_idx ?: 1;
>+
> 	last_report = NULL;
> 	for (uint32_t offset = 0; offset < total_len; offset += report_size) {
> 		const uint32_t *report = (void *) (buf + offset);
>@@ -2660,9 +2663,10 @@ test_non_zero_reason(const struct drm_xe_engine_class_instance *hwe, size_t oa_b
>
> 		/*
> 		 * Only check for default OA buffer size, since non-default
>-		 * sizes can drop reports due to buffer overrun.
>+		 * sizes can drop reports due to buffer overrun. Also, only
>+		 * check one random report to reduce test execution time.
> 		 */
>-		if (!oa_buffer_size && last_report) {
>+		if (!oa_buffer_size && last_report && (offset / report_size == check_idx)) {
> 			sanity_check_reports(last_report, report, fmt);
> 			pec_sanity_check_reports(last_report, report, metric_set(hwe));
> 		}
>-- 
>2.48.1
>

  reply	other threads:[~2025-05-02 22:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-22 19:34 [PATCH i-g-t 0/6] Sanity check Xe2 PEC OA reports Ashutosh Dixit
2025-04-22 19:34 ` [PATCH i-g-t 1/6] tests/intel/xe_oa: Rename check_reports to mmap_check_reports Ashutosh Dixit
2025-04-22 19:34 ` [PATCH i-g-t 2/6] tests/intel/xe_oa: Fix oa_tick_delta Ashutosh Dixit
2025-04-22 19:34 ` [PATCH i-g-t 3/6] tests/intel/xe_oa: Sanity check PEC report data for TestOa metric set Ashutosh Dixit
2025-05-02 22:00   ` Umesh Nerlige Ramappa
2025-04-22 19:34 ` [PATCH i-g-t 4/6] tests/intel/xe_oa: Only sanity check timer PEC reports Ashutosh Dixit
2025-04-22 19:34 ` [PATCH i-g-t 5/6] tests/intel/xe_oa: Reduce test_non_zero_reason execution time Ashutosh Dixit
2025-05-02 22:07   ` Umesh Nerlige Ramappa [this message]
2025-04-22 19:34 ` [PATCH i-g-t 6/6] tests/intel/xe_oa: Drop pec_sanity_check_one Ashutosh Dixit
2025-05-02 22:08   ` Umesh Nerlige Ramappa
2025-04-23  0:17 ` ✓ i915.CI.BAT: success for Sanity check Xe2 PEC OA reports (rev2) Patchwork
2025-04-23  8:01 ` ✗ Xe.CI.Full: failure " Patchwork
2025-04-23  8:56 ` ✓ i915.CI.Full: success " Patchwork
2025-04-23 17:09 ` ✗ Xe.CI.Full: failure " Patchwork
2025-04-24  0:01 ` ✓ Xe.CI.BAT: success " Patchwork
2025-04-24 14:21 ` ✗ Xe.CI.Full: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2025-04-08 18:12 [PATCH i-g-t 0/6] Sanity check Xe2 PEC OA reports Ashutosh Dixit
2025-04-08 18:12 ` [PATCH i-g-t 5/6] tests/intel/xe_oa: Reduce test_non_zero_reason execution time Ashutosh Dixit
2025-04-14 22:40   ` Umesh Nerlige Ramappa
2025-04-15 16:49     ` 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=aBVCNm_Pigb4YHsy@unerlige-desk.amr.corp.intel.com \
    --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