public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
To: Imre Deak <imre.deak@intel.com>, igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/perf: Fix timeout for RC6 re-enabling
Date: Tue, 16 Apr 2019 15:03:45 +0100	[thread overview]
Message-ID: <c2d2810d-29ef-20b9-b73f-cc0ac19e76a2@intel.com> (raw)
In-Reply-To: <20190416135135.17260-1-imre.deak@intel.com>

On 16/04/2019 14:51, Imre Deak wrote:
> After closing the perf stream the parking the GPU engines may easily
> take more than 1 second: releasing the FD itself results in a new
> request submission via i915_perf_release()->i915_oa_stream_destroy()->
> gen8_disable_metric_set(). That means a >1sec delay for the delayed
> unpark to be called due to the delay from
>
>   queue_delayed_work(retire_work, round_jiffies_up_relative(HZ))
>
> + the delay from
>
>   mod_delayed_work(idle_work, msecs_to_jiffies(100))
>
> Scheduling may push this delay even further, I measured >2sec delays on
> my GLK. Based on this give some slack for the RC6 residency counter to
> change.


Thanks a lot for looking into this.

Whatever you do it will probably be better than the current state :)


Adding a couple of people who are also looking at fixing this test.


-Lionel


>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103179
> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
>   tests/perf.c | 9 +++++++--
>   1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/tests/perf.c b/tests/perf.c
> index 4307d36a..5dc10108 100644
> --- a/tests/perf.c
> +++ b/tests/perf.c
> @@ -3591,6 +3591,7 @@ test_rc6_disable(void)
>   	};
>   	unsigned long n_events_start, n_events_end;
>   	unsigned long rc6_enabled;
> +	int i;
>   
>   	rc6_enabled = 0;
>   	igt_sysfs_scanf(sysfs, "power/rc6_enable", "%lu", &rc6_enabled);
> @@ -3606,8 +3607,12 @@ test_rc6_disable(void)
>   	__perf_close(stream_fd);
>   
>   	n_events_start = rc6_residency_ms();
> -	nanosleep(&(struct timespec){ .tv_sec = 1, .tv_nsec = 0 }, NULL);
> -	n_events_end = rc6_residency_ms();
> +	for (i = 0; i < 5; i++) {
> +		nanosleep(&(struct timespec){ .tv_sec = 1, .tv_nsec = 0 }, NULL);
> +		n_events_end = rc6_residency_ms();
> +		if (n_events_end != n_events_start)
> +			break;
> +	}
>   	igt_assert_neq(n_events_end - n_events_start, 0);
>   }
>   


_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2019-04-16 14:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-16 13:51 [igt-dev] [PATCH i-g-t] tests/perf: Fix timeout for RC6 re-enabling Imre Deak
2019-04-16 13:56 ` Chris Wilson
2019-04-16 14:01   ` Imre Deak
2019-04-16 14:03 ` Lionel Landwerlin [this message]
2019-04-16 14:09 ` [igt-dev] [PATCH v2] " Imre Deak
2019-04-16 14:12   ` Lionel Landwerlin
2019-04-16 14:47 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/perf: Fix timeout for RC6 re-enabling (rev2) Patchwork
2019-04-16 15:28   ` Imre Deak
2019-04-16 21:08 ` [igt-dev] ✓ 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=c2d2810d-29ef-20b9-b73f-cc0ac19e76a2@intel.com \
    --to=lionel.g.landwerlin@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=imre.deak@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