From: Joel Fernandes <joelagnelf@nvidia.com>
To: Boqun Feng <boqun@kernel.org>, "Paul E. McKenney" <paulmck@kernel.org>
Cc: Kumar Kartikeya Dwivedi <memxor@gmail.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
frederic@kernel.org, neeraj.iitr10@gmail.com, urezki@gmail.com,
boqun.feng@gmail.com, rcu@vger.kernel.org,
Tejun Heo <tj@kernel.org>,
bpf@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
John Fastabend <john.fastabend@gmail.com>
Subject: Re: Next-level bug in SRCU implementation of RCU Tasks Trace + PREEMPT_RT
Date: Fri, 20 Mar 2026 13:54:22 -0400 [thread overview]
Message-ID: <2d9e7e42-8667-4880-9708-b81a82443809@nvidia.com> (raw)
In-Reply-To: <ab18cUI_4jKA8wcA@tardis.local>
On 3/20/2026 12:57 PM, Boqun Feng wrote:
>
>>>> So we really do need to make some variant of call_srcu() that deals
>>>> with this.
>>>>
>>>> We do have some options. First, we could make call_srcu() deal with it
>>>> directly, or second, we could create something like call_srcu_lockless()
>>>> or call_srcu_nolock() or whatever that can safely be invoked from any
>>>> context, including NMI handlers, and that invokes call_srcu() directly
>>>> when it determines that it is safe to do so. The advantage of the second
>>>> approach is that it avoids incurring the overhead of checking in the
>>>> common case.
>>> Within the RCU scope, I prefer the second option.
>> Works for me!
>>
>> Would you guys like to implement this, or would you prefer that I do so?
>>
> I feel I don't have cycles for it soon, I have a big backlog (including
> making preempt_count 64bit on 64bit x86). But I will send the fix in the
> current call_srcu() for v7.0 and work with Joel to get into Linus' tree.
Boqun, I get a splat as below with your irq_work patch on rcutorture:
Maybe the srcu_get_delay call needs:
raw_spin_lock_irqsave_rcu_node(ssp->srcu_sup, flags);
delay = srcu_get_delay(ssp);
raw_spin_unlock_irqrestore_rcu_node(ssp->srcu_sup, flags);
can you check?
[ 0.459781] ------------[ cut here ]------------
[ 0.460401] WARNING: kernel/rcu/srcutree.c:681 at srcu_get_delay+0xb4/0xd0,
CPU#0: swapper/0/1
[ 0.460751] Modules linked in:
[ 0.460751] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted
7.0.0-rc3-00020-gc18a9e13ce7f #96 PREEMPTLAZY
[ 0.460751] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.15.0-1
04/01/2014
[ 0.460751] RIP: 0010:srcu_get_delay+0xb4/0xd0
[ 0.460751] Code: 00 00 00 5b 5d 48 39 d0 48 0f 47 c2 e9 45 b0 0b 01 48 89 fd
be ff ff ff ff 48 8d bb d0 00 00 00 e8 e1 86 0a 01 85 c0 75 0d 90 <0f> 0b 90 48
8b 55 40 e9 57 ff ff ff 48 8b 55 40 e9 4e ff ff ff 0f
[ 0.460751] RSP: 0000:ffffb4ba80003f80 EFLAGS: 00010046
[ 0.460751] RAX: 0000000000000000 RBX: ffffffffac1604c0 RCX: 0000000000000001
[ 0.460751] RDX: 0000000000000000 RSI: 00000000ffffffff RDI: ffffffffac160590
[ 0.460751] RBP: ffffffffac160460 R08: 0000000000000000 R09: 0000000000000000
[ 0.460751] R10: 0000000000000000 R11: ffffb4ba80003ff8 R12: 0000000000000023
[ 0.460751] R13: ffff9de181214b00 R14: 0000000000000000 R15: 0000000000000000
[ 0.460751] FS: 0000000000000000(0000) GS:ffff9de1f2799000(0000)
knlGS:0000000000000000
[ 0.460751] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 0.460751] CR2: ffff9de18ddda000 CR3: 000000000c64e000 CR4: 00000000000006f0
[ 0.460751] Call Trace:
[ 0.460751] <IRQ>
[ 0.460751] srcu_irq_work+0x11/0x40
[ 0.460751] irq_work_single+0x42/0x90
[ 0.460751] irq_work_run_list+0x26/0x40
[ 0.460751] irq_work_run+0x18/0x30
[ 0.460751] __sysvec_irq_work+0x30/0x180
[ 0.460751] sysvec_irq_work+0x6a/0x80
[ 0.460751] </IRQ>
[ 0.460751] <TASK>
[ 0.460751] asm_sysvec_irq_work+0x1a/0x20
[ 0.460751] RIP: 0010:_raw_spin_unlock_irqrestore+0x34/0x50
[ 0.460751] Code: c7 18 53 48 89 f3 48 8b 74 24 10 e8 e6 58 f1 fe 48 89 ef e8
2e 92 f1 fe 80 e7 02 74 06 e8 e4 c0 00 ff fb 65 ff 0d fc 63 66 01 <74> 07 5b 5d
c3 cc cc cc cc e8 7e 03 df fe 5b 5d e9 57 1b 00 00 0f
[ 0.460751] RSP: 0000:ffffb4ba80013d50 EFLAGS: 00000286
[ 0.460751] RAX: 0000000000001c8b RBX: 0000000000000297 RCX: 0000000000000000
[ 0.460751] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffffab614c2c
[ 0.460751] RBP: ffffffffac160578 R08: 0000000000000001 R09: 0000000000000000
[ 0.460751] R10: 0000000000000001 R11: 0000000000000000 R12: fffffffffffffe74
[ 0.460751] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000001
[ 0.460751] ? _raw_spin_unlock_irqrestore+0x2c/0x50
[ 0.460751] srcu_gp_start_if_needed+0x354/0x530
[ 0.460751] __synchronize_srcu+0xcc/0x180
[ 0.460751] ? __pfx_wakeme_after_rcu+0x10/0x10
[ 0.460751] ? synchronize_srcu+0x3f/0x170
[ 0.460751] ? __pfx_rcu_init_tasks_generic+0x10/0x10
[ 0.460751] rcu_init_tasks_generic+0x104/0x150
[ 0.460751] do_one_initcall+0x59/0x2e0
[ 0.460751] ? _printk+0x56/0x70
[ 0.460751] kernel_init_freeable+0x227/0x440
[ 0.460751] ? __pfx_kernel_init+0x10/0x10
[ 0.460751] kernel_init+0x15/0x1c0
[ 0.460751] ret_from_fork+0x2ac/0x330
[ 0.460751] ? __pfx_kernel_init+0x10/0x10
[ 0.460751] ret_from_fork_asm+0x1a/0x30
[ 0.460751] </TASK>
next prev parent reply other threads:[~2026-03-20 17:54 UTC|newest]
Thread overview: 101+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 13:34 Next-level bug in SRCU implementation of RCU Tasks Trace + PREEMPT_RT Paul E. McKenney
2026-03-18 10:50 ` Sebastian Andrzej Siewior
2026-03-18 11:49 ` Paul E. McKenney
2026-03-18 14:43 ` Sebastian Andrzej Siewior
2026-03-18 15:43 ` Paul E. McKenney
2026-03-18 16:04 ` Sebastian Andrzej Siewior
2026-03-18 16:32 ` Paul E. McKenney
2026-03-18 16:42 ` Boqun Feng
2026-03-18 18:45 ` Paul E. McKenney
2026-03-18 16:47 ` Sebastian Andrzej Siewior
2026-03-18 18:48 ` Paul E. McKenney
2026-03-19 8:55 ` Sebastian Andrzej Siewior
2026-03-19 10:05 ` Paul E. McKenney
2026-03-19 10:43 ` Paul E. McKenney
2026-03-19 10:51 ` Sebastian Andrzej Siewior
2026-03-18 15:51 ` Boqun Feng
2026-03-18 18:42 ` Paul E. McKenney
2026-03-18 20:04 ` Joel Fernandes
2026-03-18 20:11 ` Kumar Kartikeya Dwivedi
2026-03-18 20:25 ` Joel Fernandes
2026-03-18 21:52 ` Boqun Feng
2026-03-18 21:55 ` Boqun Feng
2026-03-18 22:15 ` Boqun Feng
2026-03-18 22:52 ` Joel Fernandes
2026-03-18 23:27 ` Boqun Feng
2026-03-19 1:08 ` Boqun Feng
2026-03-19 9:03 ` Sebastian Andrzej Siewior
2026-03-19 16:27 ` Boqun Feng
2026-03-19 16:33 ` Sebastian Andrzej Siewior
2026-03-19 16:48 ` Boqun Feng
2026-03-19 16:59 ` Kumar Kartikeya Dwivedi
2026-03-19 17:27 ` Boqun Feng
2026-03-19 18:41 ` Kumar Kartikeya Dwivedi
2026-03-19 20:14 ` Boqun Feng
2026-03-19 20:21 ` Joel Fernandes
2026-03-19 20:39 ` Boqun Feng
2026-03-20 15:34 ` Paul E. McKenney
2026-03-20 15:59 ` Boqun Feng
2026-03-20 16:24 ` Paul E. McKenney
2026-03-20 16:57 ` Boqun Feng
2026-03-20 17:54 ` Joel Fernandes [this message]
2026-03-20 18:14 ` [PATCH] rcu: Use an intermediate irq_work to start process_srcu() Boqun Feng
2026-03-20 19:18 ` Joel Fernandes
2026-03-20 20:47 ` Andrea Righi
2026-03-20 20:54 ` Boqun Feng
2026-03-20 21:00 ` Andrea Righi
2026-03-20 21:02 ` Andrea Righi
2026-03-20 21:06 ` Boqun Feng
2026-03-20 22:29 ` [PATCH v2] " Boqun Feng
2026-03-23 21:09 ` Joel Fernandes
2026-03-23 22:18 ` Boqun Feng
2026-03-23 22:50 ` Joel Fernandes
2026-03-24 11:27 ` Frederic Weisbecker
2026-03-24 14:56 ` Joel Fernandes
2026-03-24 14:56 ` Alexei Starovoitov
2026-03-24 17:36 ` Boqun Feng
2026-03-24 18:40 ` Joel Fernandes
2026-03-24 19:23 ` Paul E. McKenney
2026-03-26 19:12 ` patchwork-bot+netdevbpf
2026-03-21 4:27 ` [PATCH] " Zqiang
2026-03-21 18:15 ` Boqun Feng
2026-03-21 10:10 ` Paul E. McKenney
2026-03-21 17:15 ` Boqun Feng
2026-03-21 17:41 ` Paul E. McKenney
2026-03-21 18:06 ` Boqun Feng
2026-03-21 19:31 ` Paul E. McKenney
2026-03-21 19:45 ` Boqun Feng
2026-03-21 20:07 ` Paul E. McKenney
2026-03-21 20:08 ` Boqun Feng
2026-03-22 10:09 ` Paul E. McKenney
2026-03-22 16:16 ` Boqun Feng
2026-03-22 17:09 ` Paul E. McKenney
2026-03-22 17:31 ` Boqun Feng
2026-03-22 17:44 ` Paul E. McKenney
2026-03-22 18:17 ` Boqun Feng
2026-03-22 19:47 ` Paul E. McKenney
2026-03-22 20:26 ` Boqun Feng
2026-03-23 7:50 ` Paul E. McKenney
2026-03-20 18:20 ` Next-level bug in SRCU implementation of RCU Tasks Trace + PREEMPT_RT Boqun Feng
2026-03-20 23:11 ` Paul E. McKenney
2026-03-21 3:29 ` Paul E. McKenney
2026-03-21 17:03 ` [RFC PATCH] rcu-tasks: Avoid using mod_timer() in call_rcu_tasks_generic() Boqun Feng
2026-03-23 15:17 ` Boqun Feng
2026-03-23 20:37 ` Joel Fernandes
2026-03-23 21:50 ` Kumar Kartikeya Dwivedi
2026-03-23 22:13 ` Boqun Feng
2026-03-20 16:15 ` Next-level bug in SRCU implementation of RCU Tasks Trace + PREEMPT_RT Boqun Feng
2026-03-20 16:24 ` Paul E. McKenney
2026-03-19 17:02 ` Sebastian Andrzej Siewior
2026-03-19 17:44 ` Boqun Feng
2026-03-19 18:42 ` Joel Fernandes
2026-03-19 20:20 ` Boqun Feng
2026-03-19 20:26 ` Joel Fernandes
2026-03-19 20:45 ` Joel Fernandes
2026-03-19 10:02 ` Paul E. McKenney
2026-03-19 14:34 ` Boqun Feng
2026-03-19 16:10 ` Paul E. McKenney
2026-03-18 23:56 ` Kumar Kartikeya Dwivedi
2026-03-19 0:26 ` Zqiang
2026-03-19 1:13 ` Boqun Feng
2026-03-19 2:47 ` Joel Fernandes
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=2d9e7e42-8667-4880-9708-b81a82443809@nvidia.com \
--to=joelagnelf@nvidia.com \
--cc=ast@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=boqun.feng@gmail.com \
--cc=boqun@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=frederic@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=memxor@gmail.com \
--cc=neeraj.iitr10@gmail.com \
--cc=paulmck@kernel.org \
--cc=rcu@vger.kernel.org \
--cc=tj@kernel.org \
--cc=urezki@gmail.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 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.