Re: [PATCH igt] igt/pm_rps: Increase load for waitboosting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Chris Wilson (2018-01-13 19:20:21)
> The waitboost subtests encode internal knowledge of the kernel, and
> should we wish to change how the kernel functions, we also need to
> update the test (or reconfigure it somehow to express desired latencies
> for certain workloads). One such change proposed is to remove the
> waitboost if the target request is also completed, so update the test to
> not wait on the current batch.
> 
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

Joonas, this marries the test to the new implementation (and is
backwards compatible). Please kindly review,
-Chris

> ---
>  tests/pm_rps.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/tests/pm_rps.c b/tests/pm_rps.c
> index a48ca368d..8dd73917b 100644
> --- a/tests/pm_rps.c
> +++ b/tests/pm_rps.c
> @@ -487,12 +487,27 @@ static void stabilize_check(int *out)
>         igt_debug("Waited %d msec to stabilize cur\n", wait);
>  }
>  
> +static void resubmit_batch(int fd, uint32_t handle, int count)
> +{
> +       struct drm_i915_gem_exec_object2 obj = {
> +               .handle = handle
> +       };
> +       struct drm_i915_gem_execbuffer2 eb = {
> +               .buffer_count = 1,
> +               .buffers_ptr = to_user_pointer(&obj),
> +       };
> +       while (count--)
> +               gem_execbuf(fd, &eb);
> +}
> +
>  static void boost_freq(int fd, int *boost_freqs)
>  {
>         int64_t timeout = 1;
>         igt_spin_t *load;
>  
>         load = igt_spin_batch_new(fd, 0, 0, 0);
> +       resubmit_batch(fd, load->handle, 16);
> +
>         /* Waiting will grant us a boost to maximum */
>         gem_wait(fd, load->handle, &timeout);
>  
> -- 
> 2.15.1
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux