[igt-dev] [PATCH i-g-t] i915/gem_exec_fence: Reduce non-preemptible workload

Chris Wilson chris at chris-wilson.co.uk
Thu May 28 08:32:17 UTC 2020


Quoting Dominik Grzegorzek (2020-05-28 09:27:37)
> Non-preemptible spinners should be avoided as often as possible.
> gem_exec_fence@[basic-await, nb-await] has no reason to use non-preemptible
> workload, only hanging subtests need it.
> 
> Signed-off-by: Dominik Grzegorzek <dominik.grzegorzek at intel.com>
> ---
>  tests/i915/gem_exec_fence.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/i915/gem_exec_fence.c b/tests/i915/gem_exec_fence.c
> index ad22f9f5..d70e73a2 100644
> --- a/tests/i915/gem_exec_fence.c
> +++ b/tests/i915/gem_exec_fence.c
> @@ -344,9 +344,10 @@ static void test_fence_await(int fd, const struct intel_execution_engine2 *e,
>  
>         spin = igt_spin_new(fd,
>                             .engine = e->flags,
> -                           .flags = (IGT_SPIN_FENCE_OUT |
> +                           .flags = IGT_SPIN_FENCE_OUT |
> +                                    (flags & HANG ?
>                                       IGT_SPIN_NO_PREEMPTION |
> -                                     (flags & HANG ? IGT_SPIN_INVALID_CS : 0)));
> +                                     IGT_SPIN_INVALID_CS : 0));

So this would now allow a request on the same engine to be timesliced
ahead of the signaler, if the fencing was broken. Ok. (Not that it makes
much difference, any timeslicing engine has other engines on which the
waiters may bypass the signaler.)

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


More information about the igt-dev mailing list