From: Sujaritha <sujaritha.sundaresan@intel.com>
To: don.hiatt@intel.com, igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] lib/igt_pm: Adjust pm status check timeout and log timing
Date: Fri, 6 Mar 2020 14:14:56 -0800 [thread overview]
Message-ID: <a05de69c-ce28-1e51-894a-4edba4c79220@intel.com> (raw)
In-Reply-To: <20200306172829.45696-1-don.hiatt@intel.com>
On 3/6/20 9:28 AM, don.hiatt@intel.com wrote:
> From: Don Hiatt <don.hiatt@intel.com>
>
> Increase the overall time we wait to achieve the desired runtime
> status to 15 seconds to fix an occasional timeout and do so
> in 1 second increments to speed up exiting. Also log the
> amount of time we waited to get a handle on how much variation
> we run into.
>
> Signed-off-by: Don Hiatt <don.hiatt@intel.com>
> ---
> lib/igt_pm.c | 18 +++++++++++++-----
> 1 file changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/lib/igt_pm.c b/lib/igt_pm.c
> index 9d441e1b76ff..13675fca0c9d 100644
> --- a/lib/igt_pm.c
> +++ b/lib/igt_pm.c
> @@ -747,8 +747,8 @@ static const char *_pm_status_name(enum igt_runtime_pm_status status)
> * igt_wait_for_pm_status:
> * @status: desired runtime PM status
> *
> - * Waits until for the driver to switch to into the desired runtime PM status,
> - * with a 10 second timeout.
> + * Waits for the driver to switch into the desired runtime PM status,
> + * with up to a 15 second timeout in 1 second increments.
> *
> * Returns:
> * True if the desired runtime PM status was attained, false if the operation
> @@ -758,7 +758,7 @@ bool igt_wait_for_pm_status(enum igt_runtime_pm_status status)
> {
> enum igt_runtime_pm_status expected = status;
> bool ret;
> - int fd;
> + int fd, i;
>
> if (__igt_pm_power < 0)
> return false;
> @@ -766,8 +766,16 @@ bool igt_wait_for_pm_status(enum igt_runtime_pm_status status)
> fd = openat(__igt_pm_power, "runtime_status", O_RDONLY);
> igt_assert_f(fd >= 0, "Can't open runtime_status\n");
>
> - ret = igt_wait((status = __igt_get_runtime_pm_status(fd)) == expected,
> - 10000, 100);
> + for (i=1; i < 16; ++i) {
> + ret = igt_wait((status = __igt_get_runtime_pm_status(fd)) == expected,
> + 1000, 100);
> +
> + if (ret) {
> + igt_info("Got expected (%s) runtime pm status in %d second(s)\n",
> + _pm_status_name(expected), i);
> + break;
> + }
> + }
> close(fd);
>
> if (!ret)
We are still not sure as to why the status switch is taking longer now
but having this change and allowing the
time to be logged, should help in further understanding this failure
seen on various pm tests.
Reviewed-by : Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2020-03-06 22:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-06 17:28 [igt-dev] [PATCH i-g-t] lib/igt_pm: Adjust pm status check timeout and log timing don.hiatt
2020-03-06 19:16 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-03-06 22:14 ` Sujaritha [this message]
2020-03-07 15:43 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-03-09 15:57 ` [igt-dev] [PATCH i-g-t] " Sujaritha
-- strict thread matches above, loose matches on Subject: below --
2020-03-10 17:09 don.hiatt
2020-03-10 17:00 ` Chris Wilson
2020-03-10 17:11 ` Hiatt, Don
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=a05de69c-ce28-1e51-894a-4edba4c79220@intel.com \
--to=sujaritha.sundaresan@intel.com \
--cc=don.hiatt@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