From: Martin Peres <martin.peres@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] sw_sync: Use fixed runtime for sync_expired_merge
Date: Fri, 21 Feb 2020 09:24:21 +0200 [thread overview]
Message-ID: <d0d76a0d-d9f6-93fe-0149-6c755a33715a@linux.intel.com> (raw)
In-Reply-To: <20200220165721.2056191-1-chris@chris-wilson.co.uk>
On 2020-02-20 18:57, Chris Wilson wrote:
> Convert from using a fixed number of iterations (1 million), to using a
> fixed runtime so that we have predictable (and shorter!) run times across
> a wide variety of machines.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Martin Peres <martin.peres@linux.intel.com>
Thanks for making this test more reasonable :) Strength is in execution
count, not execution time :)
Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
> ---
> tests/sw_sync.c | 17 +++++++----------
> 1 file changed, 7 insertions(+), 10 deletions(-)
>
> diff --git a/tests/sw_sync.c b/tests/sw_sync.c
> index 626b6d39f..6e439496d 100644
> --- a/tests/sw_sync.c
> +++ b/tests/sw_sync.c
> @@ -747,30 +747,27 @@ static void test_sync_multi_producer_single_consumer(void)
>
> static void test_sync_expired_merge(void)
> {
> - int iterations = 1 << 20;
> int timeline;
> - int i;
> - int fence_expired, fence_merged;
> + int expired;
>
> timeline = sw_sync_timeline_create();
>
> sw_sync_timeline_inc(timeline, 100);
> - fence_expired = sw_sync_timeline_create_fence(timeline, 1);
> - igt_assert_f(sync_fence_wait(fence_expired, 0) == 0,
> + expired = sw_sync_timeline_create_fence(timeline, 1);
> + igt_assert_f(sync_fence_wait(expired, 0) == 0,
> "Failure waiting for expired fence\n");
>
> - fence_merged = sync_fence_merge(fence_expired, fence_expired);
> - close(fence_merged);
> + close(sync_fence_merge(expired, expired));
>
> - for (i = 0; i < iterations; i++) {
> - int fence = sync_fence_merge(fence_expired, fence_expired);
> + igt_until_timeout(2) {
> + int fence = sync_fence_merge(expired, expired);
>
> igt_assert_f(sync_fence_wait(fence, -1) == 0,
> "Failure waiting on fence\n");
> close(fence);
> }
>
> - close(fence_expired);
> + close(expired);
> }
>
> static void test_sync_random_merge(void)
>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2020-02-21 7:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-20 16:57 [igt-dev] [PATCH i-g-t] sw_sync: Use fixed runtime for sync_expired_merge Chris Wilson
2020-02-20 19:09 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-02-21 7:24 ` Martin Peres [this message]
2020-02-23 2:09 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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=d0d76a0d-d9f6-93fe-0149-6c755a33715a@linux.intel.com \
--to=martin.peres@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@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