[igt-dev] [PATCH i-g-t v14 29/33] tests/gem_ppgtt: Migrate memory check out of render blits

Chris Wilson chris at chris-wilson.co.uk
Thu Jan 14 15:16:15 UTC 2021


Quoting Zbigniew Kempczyński (2021-01-14 12:22:29)
> Running memory cache flush when bcs is doing blits leads to serializing
> bcs and rcs part. So we move memory check before blitting giving chance
> to parallel the execution.

Good catch.

> Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> Cc: Dominik Grzegorzek <dominik.grzegorzek at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>  tests/i915/gem_ppgtt.c | 46 +++++++++++++++++++++++-------------------
>  1 file changed, 25 insertions(+), 21 deletions(-)
> 
> diff --git a/tests/i915/gem_ppgtt.c b/tests/i915/gem_ppgtt.c
> index 674bba43a..10ddea403 100644
> --- a/tests/i915/gem_ppgtt.c
> +++ b/tests/i915/gem_ppgtt.c
> @@ -81,14 +81,8 @@ static void fork_rcs_copy(int timeout, uint32_t final,
>  #define CREATE_CONTEXT 0x1
>  {
>         igt_render_copyfunc_t render_copy;
> -       uint64_t mem_per_child;
>         int devid;
>  
> -       mem_per_child = SIZE;
> -       if (flags & CREATE_CONTEXT)
> -               mem_per_child += 2 * 128 * 1024; /* rough context sizes */
> -       intel_require_memory(count, mem_per_child, CHECK_RAM);
> -
>         for (int child = 0; child < count; child++) {
>                 int fd = drm_open_driver(DRIVER_INTEL);
>                 struct buf_ops *bops;
> @@ -270,7 +264,8 @@ static bool has_contexts(void)
>         return result;
>  }
>  
> -#define N_CHILD 8
> +#define BCS_CHILD 1
> +#define RCS_CHILD 8

I wouldn't bother with these, instead I would update the test to use
nprocs + 1.

Nevertheless,

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


More information about the igt-dev mailing list