From: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/perf: add a stress test opening/closing the stream
Date: Thu, 27 Feb 2020 13:10:16 +0200 [thread overview]
Message-ID: <826e8f8d-2517-6ac7-7abd-2b8bf5f38897@intel.com> (raw)
In-Reply-To: <158279901604.8627.8025260404770607562@skylake-alporthouse-com>
On 27/02/2020 12:23, Chris Wilson wrote:
> Quoting Lionel Landwerlin (2020-02-27 10:17:24)
>> This appears to trigger hard hangs...
> Didn't even require a bg load!
Good point actually... I think there was still a glxgears running.
>> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
>> ---
>> tests/perf.c | 31 +++++++++++++++++++++++++++++++
>> 1 file changed, 31 insertions(+)
>>
>> diff --git a/tests/perf.c b/tests/perf.c
>> index d9bac561..d9ff4edb 100644
>> --- a/tests/perf.c
>> +++ b/tests/perf.c
>> @@ -3995,6 +3995,34 @@ test_rc6_disable(void)
>> igt_assert_neq(n_events_end - n_events_start, 0);
>> }
>>
>> +static void
>> +test_stress_open_close(void)
>> +{
>> + igt_until_timeout(2) {
>> + int oa_exponent = 5; /* 5 micro seconds */
>> + uint64_t properties[] = {
>> + /* XXX: even without periodic sampling we have to
>> + * specify at least one sample layout property...
>> + */
>> + DRM_I915_PERF_PROP_SAMPLE_OA, true,
>> +
>> + /* OA unit configuration */
>> + DRM_I915_PERF_PROP_OA_METRICS_SET, test_set->perf_oa_metrics_set,
>> + DRM_I915_PERF_PROP_OA_FORMAT, test_set->perf_oa_format,
>> + DRM_I915_PERF_PROP_OA_EXPONENT, oa_exponent,
>> + };
>> + struct drm_i915_perf_open_param param = {
>> + .flags = I915_PERF_FLAG_FD_CLOEXEC |
>> + I915_PERF_FLAG_DISABLED, /* XXX: open disabled */
>> + .num_properties = sizeof(properties) / 16,
> #define NUM_PROPERTIES(p) (sizeof(p) / (2 * sizeof(uint64_t)))
>
> [and probably crib the kernels assert_pointer_is_array()]
>
>> + .properties_ptr = to_user_pointer(properties),
>> + };
>> +
>> + stream_fd = __perf_open(drm_fd, ¶m, false);
>> + __perf_close(stream_fd);
> Ok, that looks as basic as can be -- I was struggling to decide what the
> minimum parameters were :)
>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> -Chris
_______________________________________________
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-27 11:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-27 10:17 [igt-dev] [PATCH i-g-t] tests/perf: add a stress test opening/closing the stream Lionel Landwerlin
2020-02-27 10:23 ` Chris Wilson
2020-02-27 11:10 ` Lionel Landwerlin [this message]
2020-02-27 14:04 ` [igt-dev] ✗ GitLab.Pipeline: failure for " Patchwork
2020-02-27 14:37 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2020-02-28 14: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=826e8f8d-2517-6ac7-7abd-2b8bf5f38897@intel.com \
--to=lionel.g.landwerlin@intel.com \
--cc=chris@chris-wilson.co.uk \
--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