From: Johannes Berg <johannes@sipsolutions.net>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Pavel Machek <pavel@ucw.cz>
Cc: Thomas Gleixner <tglx@linutronix.de>,
"linux-leds@vger.kernel.org" <linux-leds@vger.kernel.org>
Subject: Re: [PATCH] leds: trigger: Disable CPU trigger on PREEMPT_RT
Date: Mon, 27 Sep 2021 19:36:23 +0200 [thread overview]
Message-ID: <044da7aa2a4300bada4ee7c8efb7f7b5ef425256.camel@sipsolutions.net> (raw)
In-Reply-To: <20210927171802.uak3tbpqaig3mm7m@linutronix.de>
On Mon, 2021-09-27 at 17:18 +0000, Sebastian Andrzej Siewior wrote:
> On 2021-09-27 17:44:51 [+0200], Pavel Machek wrote:
> >
> > Would you mind reading and responding to the rest of the email?
>
> The patch you mentioned,
> https://https://lkml.kernel.org/r/.kernel.org/all/20210915181601.99a68f5718be.I1a28b342d2d52cdeeeb81ecd6020c25cbf1dbfc0@changeid/
>
> would remove the lock from led_trigger_event().
> Are there any guarantees how many callbacks maybe invoked and what kind
> of locks may be acquired?
In a way, the point of my patch is that after it we don't have to *care*
what locking happens in the callbacks.
The problem in our driver was that we did a spinlock without disabling
IRQs there in the callback, and that interacts badly with the rwlock in
the LED subsystem.
> Leaving kworker usage aside there are still things like spinlock_t usage
> in input_leds_brightness_set(), nic78bx_brightness_set() (from a quick
> grep) which have the same problems.
Looks like *everything* (that can work on ARM) and uses a spinlock would
have this problem? My patch doesn't address that at all. In fact, like I
said above, the entire point of the patch is to remove restrictions on
what the locking in the underlying LED driver can be.
johannes
next prev parent reply other threads:[~2021-09-27 17:47 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
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 [this message]
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=044da7aa2a4300bada4ee7c8efb7f7b5ef425256.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=bigeasy@linutronix.de \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--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