Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Riana Tauro <riana.tauro@intel.com>
To: "Gupta, Anshuman" <anshuman.gupta@intel.com>,
	"Sundaresan, Sujaritha" <sujaritha.sundaresan@intel.com>,
	"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Cc: "Nilawar, Badal" <badal.nilawar@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t] RFC tests/xe: Stress test GT C states
Date: Mon, 31 Jul 2023 18:53:27 +0530	[thread overview]
Message-ID: <d12956e8-a29f-a6ca-eb85-110110e342a2@intel.com> (raw)
In-Reply-To: <CY5PR11MB6211507AB9E69C3FA0A716F39505A@CY5PR11MB6211.namprd11.prod.outlook.com>

Hi Anshuman

On 7/31/2023 5:34 PM, Gupta, Anshuman wrote:
> 
> 
>> -----Original Message-----
>> From: Sundaresan, Sujaritha <sujaritha.sundaresan@intel.com>
>> Sent: Monday, July 31, 2023 3:38 PM
>> To: Tauro, Riana <riana.tauro@intel.com>; igt-dev@lists.freedesktop.org
>> Cc: Nilawar, Badal <badal.nilawar@intel.com>; Gupta, Anshuman
>> <anshuman.gupta@intel.com>; Belgaumkar, Vinay
>> <vinay.belgaumkar@intel.com>
>> Subject: Re: [igt-dev] [PATCH i-g-t] RFC tests/xe: Stress test GT C states
>>
>>
>> On 7/31/2023 1:57 PM, Riana Tauro wrote:
>>> Hi Suja
>>>
>>> On 7/31/2023 1:00 PM, Sundaresan, Sujaritha wrote:
>>>>
>>>> On 7/28/2023 11:39 AM, Riana Tauro wrote:
>>>>> stress test GT C states by checking if GT is in C0 when forcewake is
>>>>> acquired and in C6 once released.
>>>>>
>>>>> Signed-off-by: Riana Tauro <riana.tauro@intel.com>
>>>>> ---
>>>>>    tests/xe/xe_pm_residency.c | 27 +++++++++++++++++++++++++++
>>>>>    1 file changed, 27 insertions(+)
>>>>>
>>>>> diff --git a/tests/xe/xe_pm_residency.c b/tests/xe/xe_pm_residency.c
>>>>> index 4936de166..9713e61cd 100644
>>>>> --- a/tests/xe/xe_pm_residency.c
>>>>> +++ b/tests/xe/xe_pm_residency.c
>>>>> @@ -85,6 +85,29 @@ static void test_idle_residency(int fd, int gt)
>>>>>        assert_within_epsilon(residency_end - residency_start,
>>>>> elapsed_ms, tolerance);
>>>>>    }
>>>>> +/**
>>>>> + * SUBTEST: stress-gt-c6
>>>>> + * Description: stress test GT C states by acquiring/releasing
>>>>> forcewake
>>>>> + * Run type: FULL
>>>>> + */
>>>>> +static void stress_c6(int fd, int n) {
>>>>> +    int handle, gt;
>>>>> +
>>>>> +    while (n--) {
>>>>> +        handle = igt_debugfs_open(fd, "forcewake_all", O_WRONLY);
>>>>> +        igt_assert(handle >= 0);
>>>>> +        /* check if all gts are in C0 after forcewake is acquired
>>>>> +*/
>>>>> +        xe_for_each_gt(fd, gt)
>>>>> +            igt_assert_f(!xe_is_gt_in_c6(fd, gt), "GT in C6\n");
>>>>> +        close(handle);
>>>>> +        /* check if all gts are in C6 after forcewake is released
>>>>> +*/
>>>>> +        xe_for_each_gt(fd, gt)
>>>>> +            igt_assert_f(igt_wait(xe_is_gt_in_c6(fd, gt), 1000, 1),
>>>>> +                     "GT is not in C6\n");
>>>>> +    }
>>>>> +}
>>>>> +
>>>>>    igt_main
>>>>>    {
>>>>>        int fd, gt;
>>>>> @@ -104,6 +127,10 @@ igt_main
>>>>>            xe_for_each_gt(fd, gt)
>>>>>                test_idle_residency(fd, gt);
>>>>> +    igt_describe("stress test GT C states by acquiring/releasing
>>>>> forcewake");
>>>>> +    igt_subtest("stress-gt-c6")
> How about toggle-gt-c6 ?
Sounds better. Will rename and send a new rev

Thanks
Riana
> Thanks,
> Anshuman Gupta.
>>>>> +        stress_c6(fd, 16);
>>>>> +
>>>>>        igt_fixture {
>>>>>            close(fd);
>>>>>        }
>>>>
>>>> Hi Riana,
>>>>
>>>> Just curious, But usually stress testing involves some sort a
>>>> workload running to test out rc6 during the run. Will you be
>>>> introducing another test with a spinner of sorts ?I will be sending
>>>> out another patch series for exec as well which will
>>> be similar to rc6-idle of i915.
>> Got it.
>>>
>>> This patch does only acquiring/releasing forcewake and checks GT C
>>> states. added a loop to check multiple times.
>> The loop for this case makes sense.
>>>
>>> Should i rename the test?
>> Maybe ? But I'm not sure to what. I guess this is between sanity and stress test.
>> So that can be your call I guess.
>>>
>>> Thanks
>>> Riana
>>>>
>>>> Thanks,
>>>>
>>>> Suja
>>>>

      reply	other threads:[~2023-07-31 13:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-28  6:09 [igt-dev] [PATCH i-g-t] RFC tests/xe: Stress test GT C states Riana Tauro
2023-07-28  6:42 ` [igt-dev] ○ CI.xeBAT: info for " Patchwork
2023-07-28  6:44 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-07-28 14:08 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-07-31  7:30 ` [igt-dev] [PATCH i-g-t] " Sundaresan, Sujaritha
2023-07-31  8:27   ` Riana Tauro
2023-07-31 10:07     ` Sundaresan, Sujaritha
2023-07-31 12:04       ` Gupta, Anshuman
2023-07-31 13:23         ` Riana Tauro [this message]

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=d12956e8-a29f-a6ca-eb85-110110e342a2@intel.com \
    --to=riana.tauro@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=sujaritha.sundaresan@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