[igt-dev] [PATCH i-g-t] i915/gem_ctx_persistence: Race context closure with replace-engines

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Thu Feb 13 11:02:09 UTC 2020


On 13/02/2020 09:51, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2020-02-13 09:07:59)
>>
>> On 11/02/2020 19:22, Chris Wilson wrote:
>>> +     igt_until_timeout(5) {
>>> +             igt_spin_t *spin;
>>> +             uint32_t ctx;
>>> +
>>> +             ctx = gem_context_clone_with_engines(i915, 0);
>>> +             gem_context_set_persistence(i915, ctx, true);
>>> +
>>> +             spin = igt_spin_new(i915, ctx, .flags = IGT_SPIN_FENCE_OUT);
>>> +             for (int i = 0; i < ncpus; i++)
>>> +                     write(t[i].pipe[1], &ctx, sizeof(ctx));
>>
>> It's early so I hope I am not too confused, but drm client in the forked
>> process is a different one. So I think it needs to use threads to be
>> able to share.
> 
> It using the same fd, so the children have control over the parents ctx
> (and shares the ctx id space via the fd)

It was too early then.

Then with a more neutral comment:

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Regards,

Tvrtko



More information about the igt-dev mailing list