The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Karl Mehltretter <kmehltretter@gmail.com>
To: Gabriele Monaco <gmonaco@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	 Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	 Thomas Gleixner <tglx@kernel.org>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	 Clark Williams <clrkwllms@kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	 Peter Zijlstra <peterz@infradead.org>,
	Andy Lutomirski <luto@kernel.org>,
	 Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	 Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	 Valentin Schneider <vschneid@redhat.com>,
	K Prateek Nayak <kprateek.nayak@amd.com>,
	 Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	 Randy Dunlap <rdunlap@infradead.org>,
	Wen Yang <wen.yang@linux.dev>,
	 linux-trace-kernel@vger.kernel.org,
	linux-rt-devel@lists.linux.dev, linux-doc@vger.kernel.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v2 0/9] rv: Verify generic IRQ context transitions
Date: Sat, 28 Nov 2026 12:54:31 +0100	[thread overview]
Message-ID: <awq_lh1x7P6NQrx8@gmail.com> (raw)
In-Reply-To: <9419fa94de8acc8f1ae445004b77d20d0be3e98e.camel@redhat.com>

On Sat, Nov 21, 2026 at 03:23:08PM +0100, Gabriele Monaco wrote:
> Maybe, you could somehow reuse the __schedule() tracepoints and understand you
> came from interrupt context, but that would obviously not match the
> interrupt/preemption counts, although they are (now) guarded by a BUG so you
> don't really need them.
> The loop should work fairly well anyway.
> 

Good point. With the BUG_ON() in preempt_schedule_irq(), every irqexit
check is already enforced elsewhere.

It seems dropping irqexit and its scheduler tracepoints is best.

For irqstate, I injected faults on arm64 and x86_64, with and without
lockdep, and went through past IRQ context fixes:

- Its only unique catch was an injected traced entry paired with a raw
  exit.
- A leaked PREEMPT_RT serving-softirq bit was reported first by RCU or
  lockdep, even with lockdep compiled out.
- It would not have caught any of the past bugs I looked at. Most were
  preempt_count disagreeing with lockdep, irqtime or nohz.
- On a Raspberry Pi 500+, it added about 73 ns to each
  irq_enter_rcu()/irq_exit_rcu() pair and had no measurable effect on
  hackbench or locktorture. PROVE_LOCKING added only 12 ns to the pair
  but made hackbench eight times slower.

How do you see it? The results above only measure detection beyond the
existing checks. Is irqstate worth a v3 for other reasons, such as
running a model of the IRQ context rules on production kernels, or is
there something you would like me to investigate first?

Thanks,
Karl

      reply	other threads:[~2026-11-28 11:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-07 17:12 [RFC PATCH v2 0/9] rv: Verify generic IRQ context transitions Karl Mehltretter
2026-11-07 17:12 ` [RFC PATCH v2 1/9] tracing/irq: Add generic IRQ context boundary tracepoints Karl Mehltretter
2026-11-21 10:26   ` Gabriele Monaco
2026-11-07 17:12 ` [RFC PATCH v2 2/9] tracing/sched: Add IRQ preemption lifecycle tracepoints Karl Mehltretter
2026-11-21 10:35   ` Gabriele Monaco
2026-11-07 17:12 ` [RFC PATCH v2 3/9] rv: Add a monitor for generic IRQ context transitions Karl Mehltretter
2026-11-07 17:12 ` [RFC PATCH v2 4/9] rv: Add a monitor for IRQ-exit scheduling ownership Karl Mehltretter
2026-11-23  7:58   ` Gabriele Monaco
2026-11-07 17:12 ` [RFC PATCH v2 5/9] docs/rv: Document the IRQ monitors Karl Mehltretter
2026-11-21 13:59   ` Gabriele Monaco
2026-11-07 17:12 ` [RFC PATCH v2 6/9] rv: Add KUnit coverage for IRQ context transitions Karl Mehltretter
2026-11-07 17:12 ` [RFC PATCH v2 7/9] rv: Add KUnit coverage for IRQ-exit scheduling Karl Mehltretter
2026-11-07 17:12 ` [RFC PATCH v2 8/9] rv: Test empty PREEMPT_RT softirq worker intervals Karl Mehltretter
2026-11-07 17:12 ` [RFC PATCH v2 9/9] rv: Test IRQ-exit softirq provenance and handoff Karl Mehltretter
2026-11-21 14:01   ` Gabriele Monaco
2026-11-22 20:21     ` Karl Mehltretter
2026-11-21 14:23 ` [RFC PATCH v2 0/9] rv: Verify generic IRQ context transitions Gabriele Monaco
2026-11-28 11:54   ` Karl Mehltretter [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=awq_lh1x7P6NQrx8@gmail.com \
    --to=kmehltretter@gmail.com \
    --cc=bigeasy@linutronix.de \
    --cc=bsegall@google.com \
    --cc=clrkwllms@kernel.org \
    --cc=corbet@lwn.net \
    --cc=dietmar.eggemann@arm.com \
    --cc=gmonaco@redhat.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mgorman@suse.de \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rdunlap@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=skhan@linuxfoundation.org \
    --cc=tglx@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=wen.yang@linux.dev \
    /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