From: Jiri Slaby <jirislaby@kernel.org>
To: Wladislav Wiebe <wladislav.wiebe@nokia.com>,
tglx@linutronix.de, corbet@lwn.net
Cc: akpm@linux-foundation.org, paulmck@kernel.org,
rostedt@goodmis.org, Neeraj.Upadhyay@amd.com, david@redhat.com,
bp@alien8.de, arnd@arndb.de, fvdl@google.com,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
peterz@infradead.org
Subject: Re: [PATCH v4] genirq: add support for warning on long-running IRQ handlers
Date: Thu, 31 Jul 2025 09:46:54 +0200 [thread overview]
Message-ID: <8de10920-f777-4419-9933-1d005828a9f7@kernel.org> (raw)
In-Reply-To: <20250724155059.2992-1-wladislav.wiebe@nokia.com>
On 24. 07. 25, 17:50, Wladislav Wiebe wrote:
> Introduce a mechanism to detect and warn about prolonged IRQ handlers.
> With a new command-line parameter (irqhandler.duration_warn_us=),
> users can configure the duration threshold in microseconds when a warning
> in such format should be emitted:
>
> "[CPU14] long duration of IRQ[159:bad_irq_handler [long_irq]], took: 1330 us"
>
> The implementation uses local_clock() to measure the execution duration of the
> generic IRQ per-CPU event handler.
This version LGTM
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
> --- a/kernel/irq/handle.c
> +++ b/kernel/irq/handle.c
...
> +static inline void irqhandler_duration_check(u64 ts_start, unsigned int irq,
> + const struct irqaction *action)
> +{
> + u64 delta_ns = local_clock() - ts_start;
> +
> + if (unlikely(delta_ns > irqhandler_duration_threshold_ns)) {
> + pr_warn_ratelimited("[CPU%u] long duration of IRQ[%u:%ps], took: %llu us\n",
> + smp_processor_id(), irq, action->handler,
> + delta_ns >> 10);
Only that: would the division matter in here? Or print ns? But feel free
to ignore this.
thanks,
--
js
suse labs
next prev parent reply other threads:[~2025-07-31 7:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-24 15:50 Wladislav Wiebe
2025-07-31 7:46 ` Jiri Slaby [this message]
2025-08-04 9:47 ` Wladislav Wiebe
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=8de10920-f777-4419-9933-1d005828a9f7@kernel.org \
--to=jirislaby@kernel.org \
--cc=Neeraj.Upadhyay@amd.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=david@redhat.com \
--cc=fvdl@google.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=wladislav.wiebe@nokia.com \
/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®