[PATCH] Revert "tests/intel/xe_vm: Do not error on -ECANCELED"

Cavitt, Jonathan jonathan.cavitt at intel.com
Wed Apr 10 15:49:23 UTC 2024


-----Original Message-----
From: Brost, Matthew <matthew.brost at intel.com> 
Sent: Friday, April 5, 2024 3:52 PM
To: igt-dev at lists.freedesktop.org
Cc: Brost, Matthew <matthew.brost at intel.com>; Cavitt, Jonathan <jonathan.cavitt at intel.com>
Subject: [PATCH] Revert "tests/intel/xe_vm: Do not error on -ECANCELED"
> 
> The test should never unbind an address used by hammer thread nor should
> the exec queue in the hammer thread get banned.
> 
> This reverts commit 81462e71323ae6764d7f509f4a1bbd3e41aab13e.
> 
> Cc: Jonathan Cavitt <jonathan.cavitt at intel.com>
> Signed-off-by: Matthew Brost <matthew.brost at intel.com>

Acked-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
You also proposed an alternative solution that I verified to work
(https://patchwork.freedesktop.org/patch/588571/?series=132238&rev=2)
Perhaps this revert and the new patch can be posted together as part of the
same series?
-Jonathan Cavitt

> ---
>  tests/intel/xe_vm.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/intel/xe_vm.c b/tests/intel/xe_vm.c
> index ecb2a783c4..bd4973cc38 100644
> --- a/tests/intel/xe_vm.c
> +++ b/tests/intel/xe_vm.c
> @@ -1126,7 +1126,6 @@ static void *hammer_thread(void *tdata)
>  	uint32_t exec_queue = xe_exec_queue_create(t->fd, t->vm, t->eci, 0);
>  	int b;
>  	int i = 0;
> -	int err = 0;
>  
>  	sync[0].handle = syncobj_create(t->fd, 0);
>  	pthread_barrier_wait(t->barrier);
> @@ -1149,15 +1148,14 @@ static void *hammer_thread(void *tdata)
>  		exec.address = batch_addr;
>  		if (i % 32) {
>  			exec.num_syncs = 0;
> -			err = __xe_exec(t->fd, &exec);
> +			xe_exec(t->fd, &exec);
>  		} else {
>  			exec.num_syncs = 1;
> -			err = __xe_exec(t->fd, &exec);
> +			xe_exec(t->fd, &exec);
>  			igt_assert(syncobj_wait(t->fd, &sync[0].handle, 1,
>  						INT64_MAX, 0, NULL));
>  			syncobj_reset(t->fd, &sync[0].handle, 1);
>  		}
> -		igt_assert(!err || err == -ECANCELED);
>  		++i;
>  	}
>  
> -- 
> 2.34.1
> 
> 


More information about the igt-dev mailing list