All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antonio Argenziano <antonio.argenziano@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 igt] test/gem_exec_schedule: Check each engine is an independent timeline
Date: Mon, 23 Apr 2018 09:00:29 -0700	[thread overview]
Message-ID: <3dcbb3d0-0da0-5c3c-37f1-9c7d37c81272@intel.com> (raw)
In-Reply-To: <152449867697.10658.17542738996973799380@mail.alporthouse.com>



On 23/04/18 08:51, Chris Wilson wrote:
> Quoting Antonio Argenziano (2018-04-23 16:37:17)
>>
>>
>> On 23/04/18 06:43, Chris Wilson wrote:
>>> In the existing ABI, each engine operates its own timeline
>>> (fence.context) and so should execute independently of any other. If we
>>> install a blocker on all other engines, that should not affect execution
>>> on the local engine.
>>>
>>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>>> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>>> +static void independent(int fd, unsigned int engine)
>>> +{
>>> +     IGT_CORK_HANDLE(cork);
>>> +     uint32_t scratch, plug, batch;
>>> +     igt_spin_t *spin = NULL;
>>> +     unsigned int other;
>>> +     uint32_t *ptr;
>>> +
>>> +     igt_require(engine != 0);
>>> +
>>> +     scratch = gem_create(fd, 4096);
>>> +     plug = igt_cork_plug(&cork, fd);
>>> +
>>> +     /* Check that we can submit to engine while all others are blocked */
>>> +     for_each_physical_engine(fd, other) {
>>> +             if (other == engine)
>>> +                     continue;
>>> +
>>> +             if (spin == NULL) {
>>> +                     spin = __igt_spin_batch_new(fd, 0, other, 0);
>>> +             } else {
>>> +                     struct drm_i915_gem_exec_object2 obj = {
>>> +                             .handle = spin->handle,
>>> +                     };
>>> +                     struct drm_i915_gem_execbuffer2 eb = {
>>> +                             .buffer_count = 1,
>>> +                             .buffers_ptr = to_user_pointer(&obj),
>>> +                             .flags = other,
>>> +                     };
>>> +                     gem_execbuf(fd, &eb);
>>> +             }
>>> +
>>> +             store_dword(fd, 0, other, scratch, 0, other, plug, 0);
>>> +     }
>>> +     igt_require(spin);
>>> +
>>> +     /* Same priority, but different timeline (as different engine) */
>>> +     batch = __store_dword(fd, 0, engine, scratch, 0, engine, plug, 0);
>>
>> It would be interesting to check that priority scheduling/preemption is
>> still happening on the free engine.
> 
> It's being run on machines without scheduling as well. Reordering tests
> are later; not sure if I care about reordering while blocking, that's an
> entirely different set of tests being worked on for queues.

Cool, a different set of tests is what I had in mind as well :).

Oh BTW, with the igt_require in the subtests this is:

Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>

Thanks,
Antonio

> -Chris
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Antonio Argenziano <antonio.argenziano@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org, Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: Re: [igt-dev] [PATCH igt] test/gem_exec_schedule: Check each engine is an independent timeline
Date: Mon, 23 Apr 2018 09:00:29 -0700	[thread overview]
Message-ID: <3dcbb3d0-0da0-5c3c-37f1-9c7d37c81272@intel.com> (raw)
In-Reply-To: <152449867697.10658.17542738996973799380@mail.alporthouse.com>



On 23/04/18 08:51, Chris Wilson wrote:
> Quoting Antonio Argenziano (2018-04-23 16:37:17)
>>
>>
>> On 23/04/18 06:43, Chris Wilson wrote:
>>> In the existing ABI, each engine operates its own timeline
>>> (fence.context) and so should execute independently of any other. If we
>>> install a blocker on all other engines, that should not affect execution
>>> on the local engine.
>>>
>>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>>> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>>> +static void independent(int fd, unsigned int engine)
>>> +{
>>> +     IGT_CORK_HANDLE(cork);
>>> +     uint32_t scratch, plug, batch;
>>> +     igt_spin_t *spin = NULL;
>>> +     unsigned int other;
>>> +     uint32_t *ptr;
>>> +
>>> +     igt_require(engine != 0);
>>> +
>>> +     scratch = gem_create(fd, 4096);
>>> +     plug = igt_cork_plug(&cork, fd);
>>> +
>>> +     /* Check that we can submit to engine while all others are blocked */
>>> +     for_each_physical_engine(fd, other) {
>>> +             if (other == engine)
>>> +                     continue;
>>> +
>>> +             if (spin == NULL) {
>>> +                     spin = __igt_spin_batch_new(fd, 0, other, 0);
>>> +             } else {
>>> +                     struct drm_i915_gem_exec_object2 obj = {
>>> +                             .handle = spin->handle,
>>> +                     };
>>> +                     struct drm_i915_gem_execbuffer2 eb = {
>>> +                             .buffer_count = 1,
>>> +                             .buffers_ptr = to_user_pointer(&obj),
>>> +                             .flags = other,
>>> +                     };
>>> +                     gem_execbuf(fd, &eb);
>>> +             }
>>> +
>>> +             store_dword(fd, 0, other, scratch, 0, other, plug, 0);
>>> +     }
>>> +     igt_require(spin);
>>> +
>>> +     /* Same priority, but different timeline (as different engine) */
>>> +     batch = __store_dword(fd, 0, engine, scratch, 0, engine, plug, 0);
>>
>> It would be interesting to check that priority scheduling/preemption is
>> still happening on the free engine.
> 
> It's being run on machines without scheduling as well. Reordering tests
> are later; not sure if I care about reordering while blocking, that's an
> entirely different set of tests being worked on for queues.

Cool, a different set of tests is what I had in mind as well :).

Oh BTW, with the igt_require in the subtests this is:

Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>

Thanks,
Antonio

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

  reply	other threads:[~2018-04-23 16:00 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-23 13:43 [PATCH igt] test/gem_exec_schedule: Check each engine is an independent timeline Chris Wilson
2018-04-23 13:43 ` [igt-dev] " Chris Wilson
2018-04-23 15:32 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-04-23 15:37 ` [igt-dev] [PATCH igt] " Antonio Argenziano
2018-04-23 15:37   ` Antonio Argenziano
2018-04-23 15:51   ` Chris Wilson
2018-04-23 15:51     ` Chris Wilson
2018-04-23 16:00     ` Antonio Argenziano [this message]
2018-04-23 16:00       ` Antonio Argenziano
2018-04-23 16:52 ` Tvrtko Ursulin
2018-04-23 16:52   ` Tvrtko Ursulin
2018-04-23 17:08   ` Chris Wilson
2018-04-23 17:08     ` [Intel-gfx] " Chris Wilson
2018-04-24  8:55     ` Tvrtko Ursulin
2018-04-24  8:55       ` Tvrtko Ursulin
2018-04-24  9:23       ` Chris Wilson
2018-04-24  9:23         ` [Intel-gfx] " Chris Wilson
2018-04-23 18:22 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork
2018-04-23 20:33 ` [PATCH igt v2] " Chris Wilson
2018-04-23 20:33   ` [igt-dev] " Chris Wilson
2018-04-23 23:16   ` [PATCH igt] " Chris Wilson
2018-04-23 23:16     ` [igt-dev] " Chris Wilson
2018-04-24  9:29     ` Tvrtko Ursulin
2018-04-24  9:29       ` [igt-dev] [Intel-gfx] " Tvrtko Ursulin
2018-04-23 21:04 ` [igt-dev] ✓ Fi.CI.BAT: success for test/gem_exec_schedule: Check each engine is an independent timeline (rev2) Patchwork
2018-04-23 22:20 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-04-24  0:30 ` [igt-dev] ✓ Fi.CI.BAT: success for test/gem_exec_schedule: Check each engine is an independent timeline (rev3) Patchwork
2018-04-24  1:30 ` [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=3dcbb3d0-0da0-5c3c-37f1-9c7d37c81272@intel.com \
    --to=antonio.argenziano@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.