Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Tvrtko Ursulin <tursulin@ursulin.net>,
	igt-dev@lists.freedesktop.org
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t 5/9] tests/perf_pmu: Add trailing edge idle test variants
Date: Mon, 5 Feb 2018 10:32:22 +0000	[thread overview]
Message-ID: <8432a92f-e3fe-1e5d-357a-9bec2e741998@linux.intel.com> (raw)
In-Reply-To: <151760432399.15322.6945216875328756515@mail.alporthouse.com>


On 02/02/2018 20:45, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2018-02-02 18:37:50)
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> Additional set of tests which stops the batch and sleeps for a bit
>> before sampling the counter in order to test that the busyness stop
>> being recorded correctly.
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
>> ---
>>   tests/perf_pmu.c | 81 +++++++++++++++++++++++++++++++++++++++++++++-----------
>>   1 file changed, 66 insertions(+), 15 deletions(-)
>>
>> diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
>> index 3faa04a4f68a..27f32b8a1602 100644
>> --- a/tests/perf_pmu.c
>> +++ b/tests/perf_pmu.c
>> @@ -131,6 +131,21 @@ static unsigned int e2ring(int gem_fd, const struct intel_execution_engine2 *e)
>>   }
>>   
>>   #define TEST_BUSY (1)
>> +#define FLAG_SYNC (2)
>> +#define TEST_TRAILING_IDLE (4)
>> +
>> +static void end_spin(int fd, igt_spin_t *spin, unsigned int flags)
>> +{
>> +       if (!spin)
>> +               return;
>> +
>> +       igt_spin_batch_end(spin);
>> +
>> +       if (flags & FLAG_SYNC)
>> +               gem_sync(fd, spin->handle);
>> +       else
>> +               usleep(batch_duration_ns / 5000);
> 
> Split this to
> 
> 	if (flags & FLAG_SYNC)
> 		gem_sync();
> 	
> 	if (flags & TEST_TRAILING_IDLE)
> 		usleep();
> 
> That keeps it descriptive.

I wanted to only do one per invocation. For tests that have flags = 
TEST_TRAILING_IDLE | FLAG_SYNC, but I think I can also change those to 
not or the flags on the second invocation but only pass in FLAG_SYNC. I 
think it works for now.

>> +}
>>   
>>   static void
>>   single(int gem_fd, const struct intel_execution_engine2 *e, unsigned int flags)
>> @@ -149,9 +164,11 @@ single(int gem_fd, const struct intel_execution_engine2 *e, unsigned int flags)
>>   
>>          val = pmu_read_single(fd);
>>          slept = measured_usleep(batch_duration_ns / 1000);
>> +       if (spin && (flags & TEST_TRAILING_IDLE))
>> +               end_spin(gem_fd, spin, flags);
> 
> Can simplify and miss the first if (spin) here as end_spin does it for
> you. And later again in no_sema()

True.

> 
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Thanks, I'll sent the updated version.

Regards,

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

  reply	other threads:[~2018-02-05 10:32 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-02 18:37 [igt-dev] [PATCH v2 i-g-t 0/9] perf_pmu reliability improvements Tvrtko Ursulin
2018-02-02 18:37 ` [igt-dev] [PATCH i-g-t 1/9] tests/perf_pmu: Tighten busy measurement Tvrtko Ursulin
2018-02-02 18:37 ` [igt-dev] [PATCH i-g-t 2/9] tests/perf_pmu: More busy measurement tightening Tvrtko Ursulin
2018-02-02 18:37 ` [igt-dev] [PATCH i-g-t 3/9] tests/perf_pmu: Use measured sleep in all time based tests Tvrtko Ursulin
2018-02-02 18:37 ` [igt-dev] [PATCH i-g-t 4/9] tests/perf_pmu: Convert to flags Tvrtko Ursulin
2018-02-02 20:39   ` Chris Wilson
2018-02-02 18:37 ` [igt-dev] [PATCH i-g-t 5/9] tests/perf_pmu: Add trailing edge idle test variants Tvrtko Ursulin
2018-02-02 20:45   ` Chris Wilson
2018-02-05 10:32     ` Tvrtko Ursulin [this message]
2018-02-05 11:36     ` [igt-dev] [PATCH i-g-t v2 " Tvrtko Ursulin
2018-02-05 14:08       ` Chris Wilson
2018-02-02 18:37 ` [igt-dev] [PATCH i-g-t 6/9] tests/perf_pmu: PMU enable race test Tvrtko Ursulin
2018-02-02 20:52   ` Chris Wilson
2018-02-05 10:07     ` Tvrtko Ursulin
2018-02-05 10:16       ` Chris Wilson
2018-02-05 10:40         ` Tvrtko Ursulin
2018-02-05 14:11           ` Chris Wilson
2018-02-05 15:01             ` [igt-dev] [PATCH i-g-t v3 " Tvrtko Ursulin
2018-02-05 11:36     ` [igt-dev] [PATCH i-g-t v2 " Tvrtko Ursulin
2018-02-05 14:12       ` Chris Wilson
2018-02-02 18:37 ` [igt-dev] [PATCH i-g-t 7/9] tests/perf_pmu: Always skip missing engines Tvrtko Ursulin
2018-02-02 20:54   ` Chris Wilson
2018-02-05 11:37     ` [igt-dev] [PATCH i-g-t v2 " Tvrtko Ursulin
2018-02-05 14:13       ` Chris Wilson
2018-02-02 18:37 ` [igt-dev] [PATCH i-g-t 8/9] tests/perf_pmu: Explicitly test for engine availability in init tests Tvrtko Ursulin
2018-02-02 20:57   ` Chris Wilson
2018-02-05 11:37     ` [igt-dev] [PATCH i-g-t v2 " Tvrtko Ursulin
2018-02-05 14:14       ` Chris Wilson
2018-02-05 15:02         ` [igt-dev] [PATCH i-g-t v3 " Tvrtko Ursulin
2018-02-02 18:37 ` [igt-dev] [PATCH i-g-t 9/9] tests/perf_pmu: Use short batches from hotplug test Tvrtko Ursulin
2018-02-02 21:43   ` Chris Wilson
2018-02-05 11:38     ` [igt-dev] [PATCH i-g-t v2 " Tvrtko Ursulin
2018-02-05 14:37       ` Chris Wilson
2018-02-05 11:59     ` [igt-dev] [PATCH i-g-t " Tvrtko Ursulin
2018-02-02 19:18 ` [igt-dev] ✓ Fi.CI.BAT: success for perf_pmu reliability improvements (rev2) Patchwork
2018-02-02 22:20 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2018-02-05 12:12 ` [igt-dev] ✓ Fi.CI.BAT: success for perf_pmu reliability improvements (rev7) Patchwork
2018-02-05 13:55 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-02-05 15:21 ` [igt-dev] ✓ Fi.CI.BAT: success for perf_pmu reliability improvements (rev9) Patchwork
2018-02-05 17:35 ` [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=8432a92f-e3fe-1e5d-357a-9bec2e741998@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=tursulin@ursulin.net \
    --cc=tvrtko.ursulin@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