linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mario Kleiner <mario.kleiner.de@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: "Mario Kleiner" <mario.kleiner@tuebingen.mpg.de>,
	"Peter Hurley" <peter@hurleysoftware.com>,
	"Clark Williams" <williams@redhat.com>,
	"Daniel Vetter" <daniel.vetter@ffwll.ch>,
	"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"Dave Airlie" <airlied@redhat.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Luis Claudio R. Goncalves" <lclaudio@uudg.org>,
	intel-gfx <intel-gfx@lists.freedesktop.org>,
	linux-rt-users <linux-rt-users@vger.kernel.org>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Subject: Re: [Intel-gfx] BUG: sleeping function called from invalid context on 3.10.10-rt7
Date: Thu, 26 Sep 2013 18:16:47 +0200	[thread overview]
Message-ID: <52445DEF.1060007@gmail.com> (raw)
In-Reply-To: <20130925101301.6cbe5d0f@gandalf.local.home>

On 25.09.13 16:13, Steven Rostedt wrote:
> On Wed, 25 Sep 2013 06:32:10 +0200
> Mario Kleiner <mario.kleiner@tuebingen.mpg.de> wrote:
>
>
>> But given the new situation, your proposal is great! If we push the
>> clock readouts into the get_scanoutpos routine, we can make this robust
>> without causing grief for the rt people and without the need for a new
>> separate lock for display regs in intel-kms.
>>
>> E.g., for intel-kms:
>>
>> i915_get_crtc_scanoutpos(..., ktime_t *stime, ktime_t *etime)
>> {
>>     ...
>>     spin_lock_irqsave(...uncore.lock);
>>     preempt_disable();
>>     *stime = ktime_get();
>>     position = __raw_i915_read32(dev_priv, PIPEDSL(pipe));
>>     *etime = ktime_get();
>>     preempt_enable();
>>     spin_unlock_irqrestore(...uncore.lock)
>>     ...
>> }
>>
>> With your patchset to reduce the amount of register reads needed in that
>> function, and given that forcewake handling isn't needed for these
>> registers, this should make it robust again and wouldn't need new locks.
>>
>> Unless ktime_get is also a bad thing to do in a preempt disabled section?
>
> ktime_get() works fine in preempt_disable sections, although it may add
> some latencies, but you shouldn't need to worry about it.
>
> I like this solution the best too, but if it does go in, I would ask to
> send us the patch for adding the preempt_disable() and we can add the
> preempt_disable_rt() to it. Why make mainline have a little more
> overhead?
>
> -- Steve

Good! I will do that. Thanks for clarifying the irq and constraints on 
raw locks in the other thread.

-mario

> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>

  reply	other threads:[~2013-09-26 16:16 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 [this message]
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
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=52445DEF.1060007@gmail.com \
    --to=mario.kleiner.de@gmail.com \
    --cc=airlied@redhat.com \
    --cc=bigeasy@linutronix.de \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lclaudio@uudg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mario.kleiner@tuebingen.mpg.de \
    --cc=peter@hurleysoftware.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=ville.syrjala@linux.intel.com \
    --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).