From: Peter Zijlstra <peterz@infradead.org>
To: Frederic Weisbecker <frederic@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
"Paul E . McKenney" <paulmck@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [RFC PATCH 1/3] lockdep/irq: Be more strict about IRQ-threadable code end
Date: Mon, 23 Mar 2020 14:53:20 +0100 [thread overview]
Message-ID: <20200323135320.GJ2452@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20200323033207.32370-2-frederic@kernel.org>
On Mon, Mar 23, 2020 at 04:32:05AM +0100, Frederic Weisbecker wrote:
> --- a/kernel/irq/handle.c
> +++ b/kernel/irq/handle.c
> @@ -144,18 +144,24 @@ irqreturn_t __handle_irq_event_percpu(struct irq_desc *desc, unsigned int *flags
>
> for_each_action_of_desc(desc, action) {
> irqreturn_t res;
> + bool threadable;
>
> /*
> * If this IRQ would be threaded under force_irqthreads, mark it so.
> */
> - if (irq_settings_can_thread(desc) &&
> - !(action->flags & (IRQF_NO_THREAD | IRQF_PERCPU | IRQF_ONESHOT)))
> + threadable = (irq_settings_can_thread(desc) &&
> + !(action->flags & (IRQF_NO_THREAD | IRQF_PERCPU | IRQF_ONESHOT)));
> +
> + if (threadable)
> trace_hardirq_threaded();
>
> trace_irq_handler_entry(irq, action);
> res = action->handler(irq, action->dev_id);
> trace_irq_handler_exit(irq, action, res);
>
> + if (threadable)
> + trace_hardirq_unthreaded();
AFAICT this doesn't work for nested IRQ handlers.
> if (WARN_ONCE(!irqs_disabled(),"irq %u handler %pS enabled interrupts\n",
> irq, action->handler))
> local_irq_disable();
> --
> 2.25.0
>
next prev parent reply other threads:[~2020-03-23 13:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-23 3:32 [RFC PATCH 0/3] lockdep/irq: wait-type related cleanups Frederic Weisbecker
2020-03-23 3:32 ` [RFC PATCH 1/3] lockdep/irq: Be more strict about IRQ-threadable code end Frederic Weisbecker
2020-03-23 13:53 ` Peter Zijlstra [this message]
2020-03-23 15:30 ` Frederic Weisbecker
2020-03-23 16:31 ` Peter Zijlstra
2020-03-24 3:20 ` Frederic Weisbecker
2020-03-23 3:32 ` [RFC PATCH 2/3] lockdep: Merge hardirq_threaded and irq_config together Frederic Weisbecker
2020-03-23 14:02 ` Peter Zijlstra
2020-03-23 14:53 ` Sebastian Andrzej Siewior
2020-03-23 16:14 ` Frederic Weisbecker
2020-03-23 3:32 ` [RFC PATCH 3/3] lockdep: Briefly comment current->hardirq_threadable usecases Frederic Weisbecker
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=20200323135320.GJ2452@worktop.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bigeasy@linutronix.de \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@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;
as well as URLs for NNTP newsgroup(s).