Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/ufence: Kick ufence immediately when possible
@ 2024-10-17  9:21 Nirmoy Das
  2024-10-17 10:08 ` ✓ CI.Patch_applied: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nirmoy Das @ 2024-10-17  9:21 UTC (permalink / raw)
  To: intel-xe; +Cc: Nirmoy Das, Matthew Auld

If the backing fence is signaled then signal ufence soon with
system_wq. This should reduce load from the xe ordered_wq and also
won't block signaling a ufence which doesn't require any serialization.

Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1630
Cc: Matthew Auld <matthew.auld@intel.com>
gc: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
 drivers/gpu/drm/xe/xe_sync.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_sync.c b/drivers/gpu/drm/xe/xe_sync.c
index c6cf227ead40..598b2a481077 100644
--- a/drivers/gpu/drm/xe/xe_sync.c
+++ b/drivers/gpu/drm/xe/xe_sync.c
@@ -89,10 +89,14 @@ static void user_fence_worker(struct work_struct *w)
 	user_fence_put(ufence);
 }
 
-static void kick_ufence(struct xe_user_fence *ufence, struct dma_fence *fence)
+static void kick_ufence(struct xe_user_fence *ufence, struct dma_fence *fence,
+			bool signaled)
 {
 	INIT_WORK(&ufence->worker, user_fence_worker);
-	queue_work(ufence->xe->ordered_wq, &ufence->worker);
+	if (signaled)
+		queue_work(ufence->xe->system_wq, &ufence->worker);
+	else
+		queue_work(ufence->xe->ordered_wq, &ufence->worker);
 	dma_fence_put(fence);
 }
 
@@ -100,7 +104,7 @@ static void user_fence_cb(struct dma_fence *fence, struct dma_fence_cb *cb)
 {
 	struct xe_user_fence *ufence = container_of(cb, struct xe_user_fence, cb);
 
-	kick_ufence(ufence, fence);
+	kick_ufence(ufence, fence, false);
 }
 
 int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef,
@@ -236,7 +240,7 @@ void xe_sync_entry_signal(struct xe_sync_entry *sync, struct dma_fence *fence)
 		err = dma_fence_add_callback(fence, &sync->ufence->cb,
 					     user_fence_cb);
 		if (err == -ENOENT) {
-			kick_ufence(sync->ufence, fence);
+			kick_ufence(sync->ufence, fence, true);
 		} else if (err) {
 			XE_WARN_ON("failed to add user fence");
 			user_fence_put(sync->ufence);
-- 
2.46.0


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

* ✓ CI.Patch_applied: success for drm/xe/ufence: Kick ufence immediately when possible
  2024-10-17  9:21 [PATCH] drm/xe/ufence: Kick ufence immediately when possible Nirmoy Das
@ 2024-10-17 10:08 ` Patchwork
  2024-10-17 10:08 ` ✓ CI.checkpatch: " Patchwork
  2024-10-17 10:09 ` ✗ CI.KUnit: failure " Patchwork
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2024-10-17 10:08 UTC (permalink / raw)
  To: Nirmoy Das; +Cc: intel-xe

== Series Details ==

Series: drm/xe/ufence: Kick ufence immediately when possible
URL   : https://patchwork.freedesktop.org/series/140104/
State : success

== Summary ==

=== Applying kernel patches on branch 'drm-tip' with base: ===
Base commit: 6f9cc21188c8 drm-tip: 2024y-10m-17d-07h-13m-58s UTC integration manifest
=== git am output follows ===
Applying: drm/xe/ufence: Kick ufence immediately when possible



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

* ✓ CI.checkpatch: success for drm/xe/ufence: Kick ufence immediately when possible
  2024-10-17  9:21 [PATCH] drm/xe/ufence: Kick ufence immediately when possible Nirmoy Das
  2024-10-17 10:08 ` ✓ CI.Patch_applied: success for " Patchwork
@ 2024-10-17 10:08 ` Patchwork
  2024-10-17 10:09 ` ✗ CI.KUnit: failure " Patchwork
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2024-10-17 10:08 UTC (permalink / raw)
  To: Nirmoy Das; +Cc: intel-xe

== Series Details ==

Series: drm/xe/ufence: Kick ufence immediately when possible
URL   : https://patchwork.freedesktop.org/series/140104/
State : success

== Summary ==

+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
30ab6715fc09baee6cc14cb3c89ad8858688d474
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit e195ffde02d5d8a890716924d48f155fc61aa4c5
Author: Nirmoy Das <nirmoy.das@intel.com>
Date:   Thu Oct 17 11:21:13 2024 +0200

    drm/xe/ufence: Kick ufence immediately when possible
    
    If the backing fence is signaled then signal ufence soon with
    system_wq. This should reduce load from the xe ordered_wq and also
    won't block signaling a ufence which doesn't require any serialization.
    
    Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1630
    Cc: Matthew Auld <matthew.auld@intel.com>
    gc: Matthew Brost <matthew.brost@intel.com>
    Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
+ /mt/dim checkpatch 6f9cc21188c822a692fbbcfaa7cb40cbd8082df0 drm-intel
e195ffde02d5 drm/xe/ufence: Kick ufence immediately when possible



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

* ✗ CI.KUnit: failure for drm/xe/ufence: Kick ufence immediately when possible
  2024-10-17  9:21 [PATCH] drm/xe/ufence: Kick ufence immediately when possible Nirmoy Das
  2024-10-17 10:08 ` ✓ CI.Patch_applied: success for " Patchwork
  2024-10-17 10:08 ` ✓ CI.checkpatch: " Patchwork
@ 2024-10-17 10:09 ` Patchwork
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2024-10-17 10:09 UTC (permalink / raw)
  To: Nirmoy Das; +Cc: intel-xe

== Series Details ==

Series: drm/xe/ufence: Kick ufence immediately when possible
URL   : https://patchwork.freedesktop.org/series/140104/
State : failure

== Summary ==

+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig
ERROR:root:../lib/iomap.c:156:5: warning: no previous prototype for ‘ioread64_lo_hi’ [-Wmissing-prototypes]
  156 | u64 ioread64_lo_hi(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~
../lib/iomap.c:163:5: warning: no previous prototype for ‘ioread64_hi_lo’ [-Wmissing-prototypes]
  163 | u64 ioread64_hi_lo(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~
../lib/iomap.c:170:5: warning: no previous prototype for ‘ioread64be_lo_hi’ [-Wmissing-prototypes]
  170 | u64 ioread64be_lo_hi(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~~~
../lib/iomap.c:178:5: warning: no previous prototype for ‘ioread64be_hi_lo’ [-Wmissing-prototypes]
  178 | u64 ioread64be_hi_lo(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~~~
../lib/iomap.c:264:6: warning: no previous prototype for ‘iowrite64_lo_hi’ [-Wmissing-prototypes]
  264 | void iowrite64_lo_hi(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~
../lib/iomap.c:272:6: warning: no previous prototype for ‘iowrite64_hi_lo’ [-Wmissing-prototypes]
  272 | void iowrite64_hi_lo(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~
../lib/iomap.c:280:6: warning: no previous prototype for ‘iowrite64be_lo_hi’ [-Wmissing-prototypes]
  280 | void iowrite64be_lo_hi(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~~~
../lib/iomap.c:288:6: warning: no previous prototype for ‘iowrite64be_hi_lo’ [-Wmissing-prototypes]
  288 | void iowrite64be_hi_lo(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~~~
../drivers/gpu/drm/xe/xe_sync.c: In function ‘kick_ufence’:
../drivers/gpu/drm/xe/xe_sync.c:97:38: error: ‘struct xe_device’ has no member named ‘system_wq’
   97 |                 queue_work(ufence->xe->system_wq, &ufence->worker);
      |                                      ^~
make[7]: *** [../scripts/Makefile.build:229: drivers/gpu/drm/xe/xe_sync.o] Error 1
make[7]: *** Waiting for unfinished jobs....
make[6]: *** [../scripts/Makefile.build:478: drivers/gpu/drm/xe] Error 2
make[5]: *** [../scripts/Makefile.build:478: drivers/gpu/drm] Error 2
make[4]: *** [../scripts/Makefile.build:478: drivers/gpu] Error 2
make[3]: *** [../scripts/Makefile.build:478: drivers] Error 2
make[2]: *** [/kernel/Makefile:1936: .] Error 2
make[1]: *** [/kernel/Makefile:224: __sub-make] Error 2
make: *** [Makefile:224: __sub-make] Error 2

[10:08:45] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[10:08:49] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json ARCH=um O=.kunit --jobs=48
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel



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

end of thread, other threads:[~2024-10-17 10:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-17  9:21 [PATCH] drm/xe/ufence: Kick ufence immediately when possible Nirmoy Das
2024-10-17 10:08 ` ✓ CI.Patch_applied: success for " Patchwork
2024-10-17 10:08 ` ✓ CI.checkpatch: " Patchwork
2024-10-17 10:09 ` ✗ CI.KUnit: failure " Patchwork

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