From: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Hurley <peter@hurleysoftware.com>,
"Luis Claudio R. Goncalves" <lclaudio@uudg.org>,
linux-rt-users <linux-rt-users@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Clark Williams <williams@redhat.com>,
Dave Airlie <airlied@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Subject: Re: BUG: sleeping function called from invalid context on 3.10.10-rt7
Date: Wed, 11 Sep 2013 21:07:10 +0200 [thread overview]
Message-ID: <5230BF5E.9000207@tuebingen.mpg.de> (raw)
In-Reply-To: <20130911143557.14c1fe6a@gandalf.local.home>
On 11.09.13 20:35, Steven Rostedt wrote:
> On Wed, 11 Sep 2013 20:29:07 +0200
> Mario Kleiner <mario.kleiner@tuebingen.mpg.de> wrote:
>
>> That said, maybe preempt_disable is no longer the optimal choice there
>> and there's some better way to achieve good protection against
>> interruptions of that bit of code? My knowledge here is a bit rusty, and
>> the intel kms drivers and rt stuff has changed quite a bit.
>
> If you set your code to a higher priority than other tasks (and
> interrupts) than it wont be preempted there. Unless of course it blocks
> on a lock, but even then, priority inheritance will take place and it
> still should be rather quick. (unless the holder of the lock is doing
> that strange polling).
>
> -- Steve
>
Right, on a rt kernel. But that creates the problem of not very computer
savvy users (psychologists and biologists mostly) somehow having to
choose proper priorities for gpu interrupt threads and for the
x-server/wayland/..., and not much protection on a non-rt kernel?
preempt_disable() a few years ago looked like a good "plug and play"
default solution, because the ->get_crtc_scanoutpos() function was
supposed to have a very low and bounded execution time. At the time we
wrote the patches for intel/radeon/nouveau, that was the case. Typical
execution time (= preempt off time) was like 1-4 usecs, even on very low
end hardware.
Seems that at least intel's kms driver does a lot of things now, which
can sleep and spin inside that section? I tried to follow the posted
stack trace, but got lost somewhere around the i915_read32 code and
power management stuff...
-mario
next prev parent reply other threads:[~2013-09-11 19:07 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-11 10:28 BUG: sleeping function called from invalid context on 3.10.10-rt7 Luis Claudio R. Goncalves
2013-09-11 13:26 ` Steven Rostedt
2013-09-11 15:16 ` Peter Hurley
2013-09-11 15:38 ` Steven Rostedt
2013-09-11 19:31 ` Peter Hurley
2013-09-17 19:50 ` Peter Hurley
2013-09-17 20:55 ` Daniel Vetter
2013-09-18 16:52 ` Peter Hurley
2013-09-18 17:03 ` Daniel Vetter
2013-09-18 17:03 ` Ville Syrjälä
2013-09-20 22:07 ` Mario Kleiner
2013-09-23 8:38 ` [Intel-gfx] " Ville Syrjälä
2013-09-25 4:32 ` Mario Kleiner
2013-09-25 7:49 ` [Intel-gfx] " Ville Syrjälä
2013-09-25 14:18 ` Steven Rostedt
2013-09-26 16:43 ` Mario Kleiner
2013-09-25 13:52 ` Steven Rostedt
2013-09-25 14:13 ` Steven Rostedt
2013-09-26 16:16 ` Mario Kleiner
2013-10-11 10:18 ` Sebastian Andrzej Siewior
2013-10-11 12:37 ` Steven Rostedt
2013-10-11 13:30 ` Sebastian Andrzej Siewior
2013-10-11 13:49 ` Mario Kleiner
2013-10-11 14:38 ` Steven Rostedt
2013-09-25 14:07 ` Steven Rostedt
2013-09-11 18:29 ` Mario Kleiner
2013-09-11 18:35 ` Steven Rostedt
2013-09-11 19:07 ` Mario Kleiner [this message]
2013-09-11 19:19 ` Steven Rostedt
2013-09-11 20:23 ` Mario Kleiner
2013-10-11 14:19 ` Sebastian Andrzej Siewior
2013-10-11 14:45 ` Luis Claudio R. Goncalves
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=5230BF5E.9000207@tuebingen.mpg.de \
--to=mario.kleiner@tuebingen.mpg.de \
--cc=airlied@redhat.com \
--cc=bigeasy@linutronix.de \
--cc=lclaudio@uudg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=peter@hurleysoftware.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=williams@redhat.com \
/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).