[PATCH i-g-t 2/2] tests/intel/xe_pm_residency: Limit max usleep time to 50sec.

Ghimiray, Himal Prasad himal.prasad.ghimiray at intel.com
Tue Oct 8 04:13:21 UTC 2024



On 07-10-2024 23:02, Cavitt, Jonathan wrote:
> -----Original Message-----
> From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of Himal Prasad Ghimiray
> Sent: Monday, October 7, 2024 10:24 AM
> To: igt-dev at lists.freedesktop.org
> Cc: Ghimiray, Himal Prasad <himal.prasad.ghimiray at intel.com>; Brost, Matthew <matthew.brost at intel.com>; Nilawar, Badal <badal.nilawar at intel.com>; Tauro, Riana <riana.tauro at intel.com>; Gupta, Anshuman <anshuman.gupta at intel.com>
> Subject: [PATCH i-g-t 2/2] tests/intel/xe_pm_residency: Limit max usleep time to 50sec.

/s/sec/milisec.

>>
>> There may be an approximately 1-second delay between xe_exec and
>> xe_sched_job_run, which could result in the usleep duration exceeding IGT
>> timeouts. To address this, limit the maximum usleep time to 50 seconds

/s/seconds/miliseconds/

will fix.

>>
>> Cc: Matthew Brost <matthew.brost at intel.com>
>> Cc: Badal Nilawar <badal.nilawar at intel.com>
>> Cc: Riana Tauro <riana.tauro at intel.com>
>> Cc: Anshuman Gupta <anshuman.gupta at intel.com>
>> Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray at intel.com>
> 
> Seems good.
> Reviewed-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
> -Jonathan Cavitt

Thanks.

> 
>> ---
>>   tests/intel/xe_pm_residency.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tests/intel/xe_pm_residency.c b/tests/intel/xe_pm_residency.c
>> index f4d05889c..a86107eca 100644
>> --- a/tests/intel/xe_pm_residency.c
>> +++ b/tests/intel/xe_pm_residency.c
>> @@ -150,7 +150,7 @@ static void exec_load(int fd, struct drm_xe_engine_class_instance *hwe, unsigned
>>   		 * Execute the above workload for ~1% of the elapsed time and sleep for
>>   		 * the rest of the time (~99%)
>>   		 */
>> -		usleep(elapsed / 10);
>> +		usleep(min_t(elapsed, elapsed / 10, 50 * 1000));
>>   	} while (!READ_ONCE(*done));
>>   
>>   	xe_vm_unbind_sync(fd, vm, 0, addr, bo_size);
>> -- 
>> 2.34.1
>>
>>



More information about the igt-dev mailing list