From: Thomas Gleixner <tglx@linutronix.de>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
Johan Hovold <johan@kernel.org>,
Eric Dumazet <edumazet@google.com>,
netdev <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
Peter Zijlstra <peterz@infradead.org>,
linux-serial@vger.kernel.org
Subject: Re: [patch 1/1] genirq: Disable interrupts for force threaded handlers
Date: Wed, 17 Mar 2021 17:09:55 +0100 [thread overview]
Message-ID: <87pmzxyd64.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20210317144806.y4dogv6n2s62fpnw@linutronix.de>
On Wed, Mar 17 2021 at 15:48, Sebastian Andrzej Siewior wrote:
> On 2021-03-17 15:38:52 [+0100], Thomas Gleixner wrote:
>> thread(irq_A)
>> irq_handler(A)
>> spin_lock(&foo->lock);
>>
>> interrupt(irq_B)
>> irq_handler(B)
>> spin_lock(&foo->lock);
>
> It will not because both threads will wake_up(thread). It is an issue if
> - if &foo->lock is shared between a hrtimer and threaded-IRQ
> - if &foo->lock is shared between a non-threaded and thread-IRQ
> - if &foo->lock is shared between a printk() in hardirq context and
> thread-IRQ as I learned today.
That's the point and it's entirely clear from the above: A is thread
context and B is hard interrupt context and if the lock is shared then
it's busted. Otherwise we would not have this discussion at all.
next prev parent reply other threads:[~2021-03-17 16:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-17 14:38 [patch 1/1] genirq: Disable interrupts for force threaded handlers Thomas Gleixner
2021-03-17 14:48 ` Sebastian Andrzej Siewior
2021-03-17 16:09 ` Thomas Gleixner [this message]
2021-03-17 16:23 ` Johan Hovold
2021-03-18 8:51 ` Sebastian Andrzej Siewior
2021-03-20 23:19 ` [tip: irq/urgent] " tip-bot2 for 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=87pmzxyd64.fsf@nanos.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=andy.shevchenko@gmail.com \
--cc=bigeasy@linutronix.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=krzysztof.kozlowski@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.