Linux LED subsystem development
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	johannes.berg@intel.com
Cc: linux-leds@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] leds: trigger: Disable CPU trigger on PREEMPT_RT
Date: Mon, 27 Sep 2021 16:23:45 +0200	[thread overview]
Message-ID: <20210927142345.GB18276@duo.ucw.cz> (raw)
In-Reply-To: <20210924111501.m57cwwn7ahiyxxdd@linutronix.de>

[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]

Hi!

> The CPU trigger is invoked on ARM from CPU-idle. That trigger later
> invokes led_trigger_event() which acquires a read lock in an IRQ-off
> section. The problematic part on PREEMPT_RT is that this lock is turned
> into a sleeping lock and must not be acquired with disabled interrupts.
> 
> The problem continues as that the LED driver underneath must not acquire
> any sleeping locks itself.
> 
> Disable the CPU trigger on PREEMPT_RT.

I know locking with leds is problematic, but I believe you'll hit
similar problem elsewhere... Disabling triggers is not solution.

Can you take a look at:

Subject: [PATCH] leds: trigger: use RCU to protect the led_cdevs list
From: Johannes Berg <johannes.berg@intel.com>

It changes affected area, and there's good chance RCU solves your
problem. (And you may be better person to review it than I am).

I'll apply Johanness' patch to the -next, and see what happens. If
someone sees a problem, speak up.

Best regards,
								Pavel
-- 
http://www.livejournal.com/~pavelmachek

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  reply	other threads:[~2021-09-27 14:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24 11:15 [PATCH] leds: trigger: Disable CPU trigger on PREEMPT_RT Sebastian Andrzej Siewior
2021-09-27 14:23 ` Pavel Machek [this message]
2021-09-27 15:35   ` Thomas Gleixner
2021-09-27 15:44     ` Pavel Machek
2021-09-27 17:18       ` Sebastian Andrzej Siewior
2021-09-27 17:36         ` Johannes Berg
2021-09-27 19:06         ` Pavel Machek
2021-09-27 19:34           ` Sebastian Andrzej Siewior
2021-10-13  8:08             ` Pavel Machek
2021-10-13  8:39               ` Sebastian Andrzej Siewior
2021-10-13  8:42                 ` Pavel Machek
2021-10-13  9:08                   ` Sebastian Andrzej Siewior
2021-10-13  9:37                   ` [PATCH v2] " Sebastian Andrzej Siewior
2021-10-13 18:08                     ` Pavel Machek
2021-09-28  0:14           ` [PATCH] " Thomas Gleixner
2021-09-27 18:48       ` Thomas Gleixner

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=20210927142345.GB18276@duo.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=bigeasy@linutronix.de \
    --cc=johannes.berg@intel.com \
    --cc=linux-leds@vger.kernel.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