From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (unknown [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 625F810E0BE for ; Mon, 31 Jul 2023 08:28:16 +0000 (UTC) Message-ID: Date: Mon, 31 Jul 2023 13:57:59 +0530 To: "Sundaresan, Sujaritha" , References: <20230728060906.2047834-1-riana.tauro@intel.com> <825ff60a-aa42-7941-8d27-6002935e58b3@intel.com> Content-Language: en-US From: Riana Tauro In-Reply-To: <825ff60a-aa42-7941-8d27-6002935e58b3@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Subject: Re: [igt-dev] [PATCH i-g-t] RFC tests/xe: Stress test GT C states List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: badal.nilawar@intel.com Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: 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 >> --- >>   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") >> +        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. This patch does only acquiring/releasing forcewake and checks GT C states. added a loop to check multiple times. Should i rename the test? Thanks Riana > > Thanks, > > Suja >