[PATCH i-g-t 5/6] tests/intel/xe_oa: Reduce test_non_zero_reason execution time
Dixit, Ashutosh
ashutosh.dixit at intel.com
Tue Apr 15 16:49:26 UTC 2025
On Mon, 14 Apr 2025 15:40:39 -0700, Umesh Nerlige Ramappa wrote:
>
> On Tue, Apr 08, 2025 at 11:12:09AM -0700, Ashutosh Dixit wrote:
> > Only check every 128th report to reduce test execution time. Without this
>
> Since you have already read the entire buffer into memory, you could just
> check 2 reports at random location. I am thinking random would be better
> than fixed intervals to catch strange issues.
OK, will change this.
>
> > patch execution times for buffer-size subtest for OA buffer sizes > 16
> > M (with PEC report sanity checks) are excessive. E.g. for 128 MB size:
> >
> > Starting subtest: buffer-size
> > Starting dynamic subtest: ccs-0-128M
> > Dynamic subtest ccs-0-128M: SUCCESS (133.654s)
> > Subtest buffer-size: SUCCESS (133.654s)
> >
> > With this patch:
> >
> > Starting subtest: buffer-size
> > Starting dynamic subtest: ccs-0-128M
> > Dynamic subtest ccs-0-128M: SUCCESS (11.209s)
> > Subtest buffer-size: SUCCESS (11.209s)
> >
> > Signed-off-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
> > ---
> > tests/intel/xe_oa.c | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
> > index cc9702322d..f3ce37ff5a 100644
> > --- a/tests/intel/xe_oa.c
> > +++ b/tests/intel/xe_oa.c
> > @@ -2646,13 +2646,14 @@ test_non_zero_reason(const struct drm_xe_engine_class_instance *hwe, size_t oa_b
> > igt_debug("Got %u bytes\n", total_len);
> >
> > last_report = NULL;
> > - for (uint32_t offset = 0; offset < total_len; offset += report_size) {
> > + for (uint32_t offset = 0, n = 0; offset < total_len; offset += report_size) {
> > const uint32_t *report = (void *) (buf + offset);
> > uint32_t reason = (report[0] >> OAREPORT_REASON_SHIFT) & OAREPORT_REASON_MASK;
> >
> > igt_assert_neq(reason, 0);
> >
> > - if (last_report) {
> > + /* Only check every 128th report to reduce test execution time */
> > + if (last_report && !(n++ % 128)) {
> > sanity_check_reports(last_report, report, fmt);
> > pec_sanity_check_reports(last_report, report, metric_set(hwe));
> > }
> > --
> > 2.48.1
> >
More information about the igt-dev
mailing list