[igt-dev] [PATCH igt] igt/gem_exec_schedule: Exercise "deep" preemption

Michał Winiarski michal.winiarski at intel.com
Wed Apr 18 12:58:19 UTC 2018


On Wed, Apr 11, 2018 at 11:13:56AM +0100, Chris Wilson wrote:
> In investigating the issue with having to force preemption within the
> executing ELSP[], we want to trigger preemption between all elements of
> that array. To that end, we issue a series of requests with different
> priorities to fill the in-flight ELSP[] and then demand preemption into
> the middle of that series. One can think of even more complicated
> reordering requirements of ELSP[], trying to switch between every
> possible combination of permutations. Rather than check all 2 billion
> combinations, be content with a few.
> 
> v2: Add a different pattern for queued requests. Not only do we need to
> inject a request into the middle of a single context with a queue of
> different priority contexts, but we also want a queue of different
> contexts, as they have different patterns of ELSP[] behaviour.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala at intel.com>
> Cc: Michał Winiarski <michal.winiarski at intel.com>
> ---
>  tests/gem_exec_schedule.c | 188 ++++++++++++++++++++++++++++++++++----
>  1 file changed, 169 insertions(+), 19 deletions(-)
> 
> diff --git a/tests/gem_exec_schedule.c b/tests/gem_exec_schedule.c
> index d2f040ab..6ff15b6e 100644
> --- a/tests/gem_exec_schedule.c
> +++ b/tests/gem_exec_schedule.c

[snip]

> @@ -981,12 +1117,26 @@ igt_main
>  					igt_subtest_f("preempt-contexts-%s", e->name)
>  						preempt(fd, e->exec_id | e->flags, NEW_CTX);
>  
> -					igt_subtest_f("preempt-other-%s", e->name)
> -						preempt_other(fd, e->exec_id | e->flags);
> -
>  					igt_subtest_f("preempt-self-%s", e->name)
>  						preempt_self(fd, e->exec_id | e->flags);
>  
> +					igt_subtest_f("preempt-other-%s", e->name)
> +						preempt_other(fd, e->exec_id | e->flags, 0);
> +
> +					igt_subtest_f("preempt-other-chain-%s", e->name)
> +						preempt_other(fd, e->exec_id | e->flags, CHAIN);
> +
> +					igt_subtest_f("preempt-queue-%s", e->name)
> +						preempt_queue(fd, e->exec_id | e->flags, 0);
> +
> +					igt_subtest_f("preempt-queue-chain-%s", e->name)
> +						preempt_queue(fd, e->exec_id | e->flags, CHAIN);
> +					igt_subtest_f("preempt-contexts-%s", e->name)
> +						preempt_queue(fd, e->exec_id | e->flags, CONTEXTS);

With preempt-queue-contexts.

Reviewed-by: Michał Winiarski <michal.winiarski at intel.com>

-Michał

> +
> +					igt_subtest_f("preempt-contexts-chain-%s", e->name)
> +						preempt_queue(fd, e->exec_id | e->flags, CONTEXTS | CHAIN);
> +
>  					igt_subtest_group {
>  						igt_hang_t hang;
>  
> -- 
> 2.17.0
> 


More information about the igt-dev mailing list