[PATCH i-g-t 2/2] tests/intel/xe_pm_residency: Limit max usleep time to 50sec.
Himal Prasad Ghimiray
himal.prasad.ghimiray at intel.com
Mon Oct 7 17:23:56 UTC 2024
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
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>
---
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