Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/i915 i915: Kludge: wait for R...



details:   https://anonhg.NetBSD.org/src/rev/f84a0fae5fa7
branches:  trunk
changeset: 1028826:f84a0fae5fa7
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 12:09:09 2021 +0000

description:
i915: Kludge: wait for RCU grace period in __i915_request_dtor.

Unfortunately, pool_cache_put does not guarantee that an RCU or
pserialize grace period has completed before it invokes the pool
cache's destructor.  This is likely to kill performance...

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/i915_request.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r bc29b9331b11 -r f84a0fae5fa7 sys/external/bsd/drm2/dist/drm/i915/i915_request.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_request.c        Sun Dec 19 12:09:01 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_request.c        Sun Dec 19 12:09:09 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_request.c,v 1.10 2021/12/19 12:03:48 riastradh Exp $      */
+/*     $NetBSD: i915_request.c,v 1.11 2021/12/19 12:09:09 riastradh Exp $      */
 
 /*
  * Copyright © 2008-2015 Intel Corporation
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_request.c,v 1.10 2021/12/19 12:03:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_request.c,v 1.11 2021/12/19 12:09:09 riastradh Exp $");
 
 #include <linux/dma-fence-array.h>
 #include <linux/irq_work.h>
@@ -614,6 +614,11 @@
 {
        struct i915_request *rq = arg;
 
+#ifdef __NetBSD__
+       /* XXX pool cache does not guarantee this for us.  */
+       synchronize_rcu();
+#endif
+
        dma_fence_destroy(&rq->fence);
 #ifdef __NetBSD__
        i915_sw_fence_fini(&rq->submit);



Home | Main Index | Thread Index | Old Index