drm/xe/ufence: Kick ufence immediately when possible
Subsystems (2)
PATCH 1/1 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.
gc: Matthew Brost <[email protected]>
--- drivers/gpu/drm/xe/xe_sync.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/gpu/drm/xe/xe_sync.c +8 -4
@@ -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);
Signature · 1 line
2.46.0
Patchwork
CI✓ CI.Patch_applied: success for drm/xe/ufence: Kick ufence immediately when possible
== Series Details ==
== 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
Patchwork
CI✓ CI.checkpatch: success for drm/xe/ufence: Kick ufence immediately when possible
In reply to Nirmoy Das== Series Details ==
== 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 <[email protected]> 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.
gc: Matthew Brost <[email protected]>
+ /mt/dim checkpatch 6f9cc21188c822a692fbbcfaa7cb40cbd8082df0 drm-intel e195ffde02d5 drm/xe/ufence: Kick ufence immediately when possible
Patchwork
CI✗ CI.KUnit: failure for drm/xe/ufence: Kick ufence immediately when possible
In reply to Nirmoy Das== Series Details ==
== 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