linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fernando Lopez-Lezcano <nando@ccrma.Stanford.EDU>
To: Mike Galbraith <efault@gmx.de>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: nando@ccrma.Stanford.EDU, LKML <linux-kernel@vger.kernel.org>,
	linux-rt-users <linux-rt-users@vger.kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [ANNOUNCE] v5.4.17-rt9
Date: Thu, 6 Feb 2020 22:13:46 -0800	[thread overview]
Message-ID: <a6a9ba66-4e63-8156-2e49-291087d9e847@ccrma.stanford.edu> (raw)
In-Reply-To: <1581055866.25780.7.camel@gmx.de>

On 2/6/20 10:11 PM, Mike Galbraith wrote:
> On Thu, 2020-02-06 at 15:59 -0800, Fernando Lopez-Lezcano wrote:
>> On 2/4/20 8:58 AM, Sebastian Andrzej Siewior wrote:
>>> Dear RT folks!
>>>
>>> I'm pleased to announce the v5.4.17-rt9 patch set.
>>
>> Thanks!
>> I see a continuous stream of these:
> 
> (snips gripage)
> 
> Yup, d67739268cf0 annoys RT locking if lockdep is enabled.  The below
> shut it up for my i915 equipped lappy.

Wow, Mike, thanks!, will try it out and report...
(might take me a couple of days)

-- Fernando


> drm/i915/gt: use a LOCAL_IRQ_LOCK in __timeline_mark_lock()
> 
> Quoting drm/i915/gt: Mark up the nested engine-pm timeline lock as irqsafe
> 
>      We use a fake timeline->mutex lock to reassure lockdep that the timeline
>      is always locked when emitting requests. However, the use inside
>      __engine_park() may be inside hardirq and so lockdep now complains about
>      the mixed irq-state of the nested locked. Disable irqs around the
>      lockdep tracking to keep it happy.
> 
> This lockdep appeasement breaks RT because we take sleeping locks between
> __timeline_mark_lock()/unlock().  Use a LOCAL_IRQ_LOCK instead.
> 
> Signed-off-by: Mike Galbraith <efaukt@gmx.de>
> ---
>   drivers/gpu/drm/i915/gt/intel_engine_pm.c |    7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
> 
> --- a/drivers/gpu/drm/i915/gt/intel_engine_pm.c
> +++ b/drivers/gpu/drm/i915/gt/intel_engine_pm.c
> @@ -38,12 +38,15 @@ static int __engine_unpark(struct intel_
>   }
> 
>   #if IS_ENABLED(CONFIG_LOCKDEP)
> +#include <linux/locallock.h>
> +
> +static DEFINE_LOCAL_IRQ_LOCK(timeline_lock);
> 
>   static inline unsigned long __timeline_mark_lock(struct intel_context *ce)
>   {
>   	unsigned long flags;
> 
> -	local_irq_save(flags);
> +	local_lock_irqsave(timeline_lock, flags);
>   	mutex_acquire(&ce->timeline->mutex.dep_map, 2, 0, _THIS_IP_);
> 
>   	return flags;
> @@ -53,7 +56,7 @@ static inline void __timeline_mark_unloc
>   					  unsigned long flags)
>   {
>   	mutex_release(&ce->timeline->mutex.dep_map, 0, _THIS_IP_);
> -	local_irq_restore(flags);
> +	local_unlock_irqrestore(timeline_lock, flags);
>   }
> 
>   #else
> 
> 



  reply	other threads:[~2020-02-07  6:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-04 16:58 [ANNOUNCE] v5.4.17-rt9 Sebastian Andrzej Siewior
2020-02-06 23:59 ` Fernando Lopez-Lezcano
2020-02-07  6:11   ` Mike Galbraith
2020-02-07  6:13     ` Fernando Lopez-Lezcano [this message]
2020-02-07  6:56       ` Mike Galbraith
2020-06-20 10:09         ` v5.4.17-rt10 does not boot on intel ycollette.nospam
2020-06-20 12:35           ` ycollette.nospam
2020-06-25 16:55           ` v5.6.17 (was v5.4.17-rt10) " Fernando Lopez-Lezcano
2020-02-12 10:20     ` [ANNOUNCE] v5.4.17-rt9 Sebastian Andrzej Siewior

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=a6a9ba66-4e63-8156-2e49-291087d9e847@ccrma.stanford.edu \
    --to=nando@ccrma.stanford.edu \
    --cc=bigeasy@linutronix.de \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --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).