Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Poosa, Karthik" <karthik.poosa@intel.com>
To: Riana Tauro <riana.tauro@intel.com>,
	"Gupta, Anshuman" <anshuman.gupta@intel.com>,
	"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
	Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: "Nilawar, Badal" <badal.nilawar@intel.com>
Subject: Re: [PATCH i-g-t v3] tests/intel/xe_pm_residency: Print execution and sleep times
Date: Mon, 23 Sep 2024 14:46:53 +0530	[thread overview]
Message-ID: <ec07695c-39aa-4698-b1b8-136b81e71fbd@intel.com> (raw)
In-Reply-To: <dff59643-3f71-4ddd-8a57-6a27e5cbaa24@intel.com>


On 20-09-2024 17:16, Riana Tauro wrote:
> Hi Karthik
>
> On 9/20/2024 2:01 PM, Gupta, Anshuman wrote:
>>
>>
>>> -----Original Message-----
>>> From: Poosa, Karthik <karthik.poosa@intel.com>
>>> Sent: Friday, September 20, 2024 2:03 PM
>>> To: igt-dev@lists.freedesktop.org
>>> Cc: Gupta, Anshuman <anshuman.gupta@intel.com>; Nilawar, Badal
>>> <badal.nilawar@intel.com>; Tauro, Riana <riana.tauro@intel.com>; Poosa,
>>> Karthik <karthik.poosa@intel.com>
>>> Subject: [PATCH i-g-t v3] tests/intel/xe_pm_residency: Print 
>>> execution and sleep
>>> times
>>>
>>> Print the workload execution and sleep times of the test to help 
>>> diagnose
>>> timeouts.
>>>
>>> v2: Patchwork test re-run.
>>>
>>> v3:
>>>   - Assert if syncobj_wait took more than 1.2 seconds, as it causes 
>>> the test
>>>     to timeout because test would sleep for more than 120 seconds which
>>>     triggers per task timeout.
>>>
>>> Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
>>> Reviewed-by: Riana Tauro <riana.tauro@intel.com>
>>> ---
>>>   tests/intel/xe_pm_residency.c | 5 ++++-
>>>   1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/tests/intel/xe_pm_residency.c 
>>> b/tests/intel/xe_pm_residency.c index
>>> 0e687558b..343fdd694 100644
>>> --- a/tests/intel/xe_pm_residency.c
>>> +++ b/tests/intel/xe_pm_residency.c
>>> @@ -139,11 +139,14 @@ static void exec_load(int fd, struct
>>> drm_xe_engine_class_instance *hwe, unsigned
>>>           elapsed = igt_nsec_elapsed(&tv);
>>>           igt_assert_eq(data->data, done[1]);
>>>
>>> -        igt_debug("Execution took %.3fms (submit %.1fus, wait
>>> %.1fus)\n",
>>> +        igt_info("Execution took %.3fms (submit %.1fus, wait
>>> %.1fus)\n",
>>>                 1e-6 * elapsed,
>>>                 1e-3 * submit,
>>>                 1e-3 * (elapsed - submit));
>> We don't need to change to igt_info upon igt_assert it will dump each 
>> igt_debug log.
>>>
>>> +        /* Assert if syncobj_wait took more than 1.2 seconds */
>> Explain by comment why 1.2 seconds  ?
>>> +        igt_assert((uint64_t)(elapsed - submit) < (uint64_t)(1.2 *
>>> +NSEC_PER_SEC));
>
> Why are we checking (elapsed-submit) here when sleep is calculated 
> only based on elapsed?

Hi Riana,

Because I wanted to assert on syncobj_wait time. We dont expect it to 
take in seconds for MI_STORE.

'elapsed' would have both submit and wait time.

See the sample log below.

  Execution took 1.202ms (submit 302.4us, wait 899.8us)

>
> Thanks,
> Riana
>> Your calculation is based upon the igt runner per test timeout which 
>> can change.
>> So better to stick with 1 second. Or better to get per test timeout 
>> via igt environment
>> variable.
>> Cc: Kamil
>> Is it possible to get the per test igt timeout value in igt test ?
>>
>> Thanks,
>> Anshuman
>>> +
>>>           syncobj_reset(fd, &syncobj, 1);
>>>
>>>           /*
>>> -- 
>>> 2.25.1
>>

  reply	other threads:[~2024-09-23  9:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-20  8:33 [PATCH i-g-t v3] tests/intel/xe_pm_residency: Print execution and sleep times Karthik Poosa
2024-09-20  8:31 ` Gupta, Anshuman
2024-09-20 11:46   ` Riana Tauro
2024-09-23  9:16     ` Poosa, Karthik [this message]
2024-10-14 11:13   ` Kamil Konieczny
2024-09-20  9:46 ` ✓ Fi.CI.BAT: success for tests/intel/xe_pm_residency: Print execution and sleep times (rev3) Patchwork
2024-09-20  9:53 ` ✓ CI.xeBAT: " Patchwork
2024-09-20 13:47 ` ✗ CI.xeFULL: failure " Patchwork
2024-09-21  0:24 ` ✗ Fi.CI.IGT: " Patchwork

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=ec07695c-39aa-4698-b1b8-136b81e71fbd@intel.com \
    --to=karthik.poosa@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=riana.tauro@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