[igt-dev] [PATCH] tests/intel/xe_exec_thread: Increase ufence timeout

Matthew Brost matthew.brost at intel.com
Fri Jan 12 00:59:37 UTC 2024


On Fri, Jan 12, 2024 at 06:04:50AM +0530, Pallavi Mishra wrote:
> For invalidate scenario, the ufence occasionally times
> out. Increase timeout for invalidate case.
> 
> Fixes: xe_exec_threads at threads-mixed-userptr-invalidate
> and xe_exec_threads at threads-bal-mixed-userptr-invalidate
> 
> Signed-off-by: Pallavi Mishra <pallavi.mishra at intel.com>
> ---
>  tests/intel/xe_exec_threads.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/intel/xe_exec_threads.c b/tests/intel/xe_exec_threads.c
> index 17ee57a49..04c0e2196 100644
> --- a/tests/intel/xe_exec_threads.c
> +++ b/tests/intel/xe_exec_threads.c
> @@ -327,6 +327,7 @@ test_compute_mode(int fd, uint32_t vm, uint64_t addr, uint64_t userptr,
>  					 bo_size, sync, 1);
>  #define THREE_SEC	MS_TO_NS(3000)
>  #define THIRTY_SEC	MS_TO_NS(30000)
> +#define FIVE_SEC	MS_TO_NS(5000)
>  
>  	fence_timeout = igt_run_in_simulation() ? THIRTY_SEC : THREE_SEC;

The correct fix would be:
fence_timeout = igt_run_in_simulation() ? THIRTY_SEC : FIVE_SEC;

I also suspect of this change as 3 seconds is already a very long time.

Matt

>  
> @@ -389,7 +390,7 @@ test_compute_mode(int fd, uint32_t vm, uint64_t addr, uint64_t userptr,
>  					xe_wait_ufence(fd, &data[j].exec_sync,
>  						       USER_FENCE_VALUE,
>  						       exec_queues[e],
> -						       fence_timeout);
> +						       FIVE_SEC);
>  				igt_assert_eq(data[i].data, 0xc0ffee);
>  			} else if (i * 2 != n_execs) {
>  				/*
> @@ -422,7 +423,7 @@ test_compute_mode(int fd, uint32_t vm, uint64_t addr, uint64_t userptr,
>  		(flags & RACE ? n_execs / 2 + 1 : n_execs - 1) : 0;
>  	for (i = j; i < n_execs; i++)
>  		xe_wait_ufence(fd, &data[i].exec_sync, USER_FENCE_VALUE,
> -			       exec_queues[i % n_exec_queues], fence_timeout);
> +			       exec_queues[i % n_exec_queues], FIVE_SEC);
>  
>  	/* Wait for all execs to complete */
>  	if (flags & INVALIDATE)
> -- 
> 2.25.1
> 


More information about the igt-dev mailing list