From: Carsten Emde <C.Emde@osadl.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Christoph Mathys <eraserix@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Chris Wilson <chris@chris-wilson.co.uk>,
Daniel Vetter <daniel@ffwll.ch>,
Linux RT Users <linux-rt-users@vger.kernel.org>
Subject: [PATCH v2] drm/i915: Do not flush caches on RT, print a warning instead
Date: Sun, 09 Jun 2013 13:45:04 +0200 [thread overview]
Message-ID: <51B46AC0.7050502@osadl.org> (raw)
In-Reply-To: <51B35727.6040907@osadl.org>
Invalidating and flushing all caches may introduce long latencies of up
to several milliseconds. Do not execute it in PREEMPT_RT_FULL kernels,
warn once instead and propose to pin all GPU renderering tasks to a
single CPU, if possible.
Original commit:
25ff1195f8a0b3724541ae7bbe331b4296de9c06 upstream.
Original log:
In order to fully serialize access to the fenced region and the update
to the fence register we need to take extreme measures on SNB+, and
manually flush writes to memory prior to writing the fence register in
conjunction with the memory barriers placed around the register write.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Carsten Emde <C.Emde@osadl.org>
---
i915_gem.c | 26 ++++----------------------
1 file changed, 4 insertions(+), 22 deletions(-)
Index: linux-3.8.13-rt10/drivers/gpu/drm/i915/i915_gem.c
===================================================================
--- linux-3.8.13-rt10.orig/drivers/gpu/drm/i915/i915_gem.c
+++ linux-3.8.13-rt10/drivers/gpu/drm/i915/i915_gem.c
@@ -2656,10 +2656,12 @@ static inline int fence_number(struct dr
return fence - dev_priv->fence_regs;
}
+#ifndef CONFIG_PREEMPT_RT_FULL
static void i915_gem_write_fence__ipi(void *data)
{
wbinvd();
}
+#endif
static void i915_gem_object_update_fence(struct drm_i915_gem_object *obj,
struct drm_i915_fence_reg *fence,
@@ -2679,8 +2681,18 @@ static void i915_gem_object_update_fence
* on each processor in order to manually flush all memory
* transactions before updating the fence register.
*/
+#ifdef CONFIG_PREEMPT_RT_FULL
+ if (HAS_LLC(obj->base.dev)) {
+ WARN_ONCE(1, "Cannot flush caches on RT"
+#ifdef CONFIG_SMP
+ ", please pin rendering tasks to a single CPU"
+#endif
+ "\n");
+ }
+#else
if (HAS_LLC(obj->base.dev))
on_each_cpu(i915_gem_write_fence__ipi, NULL, 1);
+#endif
i915_gem_write_fence(dev, fence_reg, enable ? obj : NULL);
if (enable) {
next prev parent reply other threads:[~2013-06-09 11:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-21 16:45 [ANNOUNCE] 3.6.11.4-rt36 Steven Rostedt
2013-05-27 7:38 ` Christoph Mathys
2013-05-27 9:12 ` Christoph Mathys
[not found] ` <CALqGcGop=cpgSvcdmwE6QOSjo-JHBDGYpe2qyy3cxULfamgy+w@mail.gmail.com>
2013-06-07 20:34 ` Steven Rostedt
2013-06-08 16:09 ` [PATCH] " Carsten Emde
2013-06-09 11:45 ` Carsten Emde [this message]
2013-06-10 6:30 ` [PATCH v2] drm/i915: Do not flush caches on RT, print a warning instead Christoph Mathys
2013-06-10 22:22 ` Paul Gortmaker
2013-06-11 11:42 ` Sebastian Andrzej Siewior
2013-06-14 16:04 ` Sebastian Andrzej Siewior
2013-06-14 20:32 ` Daniel Vetter
2013-07-04 7:09 ` [ANNOUNCE] 3.6.11.4-rt36 - Kernel Bug Lampersperger Andreas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51B46AC0.7050502@osadl.org \
--to=c.emde@osadl.org \
--cc=bigeasy@linutronix.de \
--cc=chris@chris-wilson.co.uk \
--cc=daniel@ffwll.ch \
--cc=eraserix@gmail.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).