[igt-dev] [PATCH i-g-t] tests/gem_exec_alignment.c: Update to be completable in a rational time.

Chris Wilson chris at chris-wilson.co.uk
Wed Feb 12 10:02:13 UTC 2020


Quoting Dominik Grzegorzek (2020-02-12 09:14:01)
> +       /*
> +        * Due to the high complexity of searching holes in virtual memory,
> +        * number of objects has to be limited. The algorithm for each alignment
> +        * performs execbuffer multiple times and doubles number of objects
> +        * in every iteration till timeout is reached.
> +        **/
>         for (alignment = 4096; alignment < gtt_size; alignment <<= 1) {
> -               for (i = 0; i < count; i++)
> -                       execobj[i].alignment = alignment;
> +               alignment_set_timeout(TIMEOUT);
> +               clock_gettime(CLOCK_MONOTONIC, &start);

I was thinking we made the timeout global and just run the test for a
maximum of N secs and see how far into the alignment loop we get?

There's no reason to believe that higher power of two alignments provide
any different path coverage, just as noted we find ourselves in
increasingly fragmented virtual space. If you want a challenge,
supplement this with a priority-inversion test case... (Where a low
priority client can create a mess in their own address space, causing a
delay [>10ms] of a high priority client. It's a clear and present bug.)
-Chris


More information about the igt-dev mailing list