From: Hugh Dickins <hughd@google.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Hugh Dickins <hughd@google.com>,
Jacek Anaszewski <jacek.anaszewski@gmail.com>,
linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Revert "leds: avoid races with workqueue"?
Date: Sun, 26 May 2019 13:36:11 -0700 (PDT) [thread overview]
Message-ID: <alpine.LSU.2.11.1905261318290.2394@eggly.anvils> (raw)
In-Reply-To: <20190526172002.GB1282@xo-6d-61-c0.localdomain>
On Sun, 26 May 2019, Pavel Machek wrote:
> On Sat 2019-05-25 10:32:31, Hugh Dickins wrote:
> >
> > Thanks, Pavel: yes, that works fine for me on the T420s, no debug
> > complaints, good and silent; and the wifi LED is blinking as before.
>
> I'd like to prevent recurrence of similar problem, and I wonder if you
> can give me a hint.
>
> I can annotate code that can sleep with might_sleep().
>
> How can I annotate code that can not sleep? I might do
>
> spin_lock(&dummy);
> this_should_not_sleep();
> spin_unlock(&dummy);
>
> But I don't really need extra serialization. I just want annotations for
> lockdep. Any ideas?
I haven't tried to do that directly, so I'm likely to give bad advice:
in particular, I forget the limitations of checking in_atomic().
But very useful (and much cheaper than lockdep) debug options in
this area are CONFIG_DEBUG_PREEMPT and CONFIG_DEBUG_ATOMIC_SLEEP.
Hugh
prev parent reply other threads:[~2019-05-26 20:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-24 23:02 Hugh Dickins
2019-05-25 9:08 ` Pavel Machek
2019-05-25 9:37 ` Pavel Machek
2019-05-25 17:32 ` Hugh Dickins
2019-05-26 17:20 ` Pavel Machek
2019-05-26 20:36 ` Hugh Dickins [this message]
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=alpine.LSU.2.11.1905261318290.2394@eggly.anvils \
--to=hughd@google.com \
--cc=jacek.anaszewski@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
/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
all inboxes | Powered by JetHome®