Re: [igt-dev] [PATCH igt] test/gem_exec_schedule: Check each engine is an independent timeline

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
> > Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> 
> > +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.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux