Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/intel/xe_vm: Fix Sync Issue between Unbind and Hammer Thread
@ 2024-04-05 21:06 Jagmeet Randhawa
  2024-04-05 21:56 ` Matthew Brost
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jagmeet Randhawa @ 2024-04-05 21:06 UTC (permalink / raw)
  Cc: igt-dev, stuart.summers, matthew.auld, Jagmeet Randhawa

This patch addresses a critical synchronization issue
between the "test_munmap_style_unbind" function and
the "hammer_thread" function. Previously, "test_munmap_style_unbind"
would proceed with it's execution after launching
"hammer_thread". However, the "hammer_thread" in it's
initial iteration encountered an error during the syncobj_wait()
call halting its execution prematurely. So we never returned
back to the "hammer_thread" from "test_munmap_style_unbind".

We resolved this error by adding a syncobj_signal() call in our
"hammer_thread" function, allowing "hammer_thread" to send the
signal to "test_munmap_style_unbind" therefore ensuring the
seamless operation of both threads and correct synchronization.

Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Stuart Summers <stuart.summers@intel.com>
Signed-off-by: Jagmeet Randhawa <jagmeet.randhawa@intel.com>
---
VLK-54352 and VLK-55620

 tests/intel/xe_vm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/intel/xe_vm.c b/tests/intel/xe_vm.c
index ecb2a783c..a25878cd8 100644
--- a/tests/intel/xe_vm.c
+++ b/tests/intel/xe_vm.c
@@ -1153,6 +1153,7 @@ static void *hammer_thread(void *tdata)
 		} else {
 			exec.num_syncs = 1;
 			err = __xe_exec(t->fd, &exec);
+			syncobj_signal(t->fd, &sync[0].handle, 1);
 			igt_assert(syncobj_wait(t->fd, &sync[0].handle, 1,
 						INT64_MAX, 0, NULL));
 			syncobj_reset(t->fd, &sync[0].handle, 1);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-04-08 21:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-05 21:06 [PATCH i-g-t] tests/intel/xe_vm: Fix Sync Issue between Unbind and Hammer Thread Jagmeet Randhawa
2024-04-05 21:56 ` Matthew Brost
2024-04-05 21:58   ` Matthew Brost
2024-04-08 21:37   ` Randhawa, Jagmeet
2024-04-05 21:57 ` ✓ CI.xeBAT: success for " Patchwork
2024-04-05 22:15 ` ✓ Fi.CI.BAT: " Patchwork
2024-04-06  4:24 ` ✗ Fi.CI.IGT: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox