[Intel-gfx] [PATCH igt] igt/pm_rps: Increase load for waitboosting

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Thu Jan 18 11:37:44 UTC 2018


On 13/01/2018 19:20, Chris Wilson wrote:
> 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 at chris-wilson.co.uk>
> ---
>   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);
>   
> 
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Regards,

Tvrtko


More information about the Intel-gfx mailing list