All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Ogness <john.ogness@linutronix.de>
To: paulmck@kernel.org
Cc: Frederic Weisbecker <frederic@kernel.org>,
	rcu@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-team@fb.com, rostedt@goodmis.org, tglx@linutronix.de,
	pmladek@suse.com
Subject: Re: [PATCH v2 rcu 0/8] NMI-safe SRCU reader API
Date: Thu, 27 Oct 2022 11:37:46 +0206	[thread overview]
Message-ID: <874jvpehod.fsf@jogness.linutronix.de> (raw)
In-Reply-To: <20221024134727.GV5600@paulmck-ThinkPad-P17-Gen-1>

Hi Paul,

I am running some tests using srcunmisafe.2022.10.21a and I am hitting
the WARN_ONCE in srcu_check_nmi_safety():

[    1.836703][    T1] rcu: Hierarchical SRCU implementation.
[    1.836707][    T1] rcu:     Max phase no-delay instances is 1000.
[    1.836844][   T15] ------------[ cut here ]------------
[    1.836846][   T15] CPU 0 old state 1 new state 2
[    1.836885][   T15] WARNING: CPU: 0 PID: 15 at kernel/rcu/srcutree.c:652 srcu_check_nmi_safety+0x79/0x90
[    1.836897][   T15] Modules linked in:
[    1.836903][   T15] CPU: 0 PID: 15 Comm: pr/bkl Not tainted 6.1.0-rc1+ #9
[    1.836909][   T15] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014
[    1.836912][   T15] RIP: 0010:srcu_check_nmi_safety+0x79/0x90
[    1.836919][   T15] Code: d3 80 3d 9f 76 d3 01 00 75 e5 55 8b b0 c8 01 00 00 44 89 c1 48 c7 c7 d0 1f 87 82 c6 05 850
[    1.836923][   T15] RSP: 0000:ffffc90000083e98 EFLAGS: 00010282
[    1.836929][   T15] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[    1.836933][   T15] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 00000000ffffffff
[    1.836936][   T15] RBP: ffffc90000083e98 R08: 0000000000000000 R09: 0000000000000001
[    1.836940][   T15] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000
[    1.836943][   T15] R13: ffffc90000013d70 R14: ffff888004073900 R15: 0000000000000000
[    1.836946][   T15] FS:  0000000000000000(0000) GS:ffff888019600000(0000) knlGS:0000000000000000
[    1.836951][   T15] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    1.836954][   T15] CR2: ffff888003c01000 CR3: 0000000002c22001 CR4: 0000000000370ef0
[    1.836962][   T15] Call Trace:
[    1.836964][   T15]  <TASK>
[    1.836970][   T15]  console_bkl_kthread_func+0x27a/0x590
[    1.836981][   T15]  ? _raw_spin_unlock_irqrestore+0x3c/0x60
[    1.836998][   T15]  ? console_fill_outbuf+0x210/0x210
[    1.837003][   T15]  kthread+0x108/0x130
[    1.837012][   T15]  ? kthread_complete_and_exit+0x20/0x20
[    1.837025][   T15]  ret_from_fork+0x1f/0x30
[    1.837059][   T15]  </TASK>
[    1.837062][   T15] irq event stamp: 71
[    1.837065][   T15] hardirqs last  enabled at (73): [<ffffffff81106f99>] vprintk_store+0x1b9/0x5e0
[    1.837070][   T15] hardirqs last disabled at (74): [<ffffffff811071fb>] vprintk_store+0x41b/0x5e0
[    1.837075][   T15] softirqs last  enabled at (0): [<ffffffff8107ce22>] copy_process+0x952/0x1dd0
[    1.837081][   T15] softirqs last disabled at (0): [<0000000000000000>] 0x0
[    1.837085][   T15] ---[ end trace 0000000000000000 ]---
[    1.945054][   T12] Callback from call_rcu_tasks_rude() invoked.

My code is calling srcu_read_lock_nmisafe() from task context, in a
dedicated kthread. I am using DEFINE_STATIC_SRCU() to define/initialize
the srcu struct.

What does the warning imply?

John Ogness

  reply	other threads:[~2022-10-27  9:33 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21 14:46 [PATCH rcu 0/4] NMI-safe SRCU reader API Paul E. McKenney
2022-09-21 14:46 ` [PATCH RFC rcu 1/4] srcu: Convert ->srcu_lock_count and ->srcu_unlock_count to atomic Paul E. McKenney
2022-09-21 14:46 ` [PATCH RFC rcu 2/4] srcu: Create and srcu_read_lock_nmisafe() and srcu_read_unlock_nmisafe() Paul E. McKenney
2022-09-21 14:46 ` [PATCH RFC rcu 3/4] srcu: Check for consistent per-CPU per-srcu_struct NMI safety Paul E. McKenney
2022-09-21 14:46 ` [PATCH RFC rcu 4/4] srcu: Check for consistent global " Paul E. McKenney
2022-09-29 18:07 ` [PATCH v2 rcu 0/8] NMI-safe SRCU reader API Paul E. McKenney
2022-09-29 18:07   ` [PATCH RFC v2 rcu 1/8] srcu: Convert ->srcu_lock_count and ->srcu_unlock_count to atomic Paul E. McKenney
2022-09-30 15:02     ` John Ogness
2022-09-30 15:35       ` Paul E. McKenney
2022-09-30 20:37         ` John Ogness
2022-10-01 16:51           ` Paul E. McKenney
2022-09-29 18:07   ` [PATCH RFC v2 rcu 2/8] srcu: Create an srcu_read_lock_nmisafe() and srcu_read_unlock_nmisafe() Paul E. McKenney
2022-10-02 15:55     ` Frederic Weisbecker
2022-10-02 15:57       ` Frederic Weisbecker
2022-10-02 16:10         ` Paul E. McKenney
2022-10-02 16:09       ` Paul E. McKenney
2022-10-02 21:47         ` Frederic Weisbecker
2022-10-02 23:46           ` Paul E. McKenney
2022-10-03  9:55             ` Frederic Weisbecker
2022-10-03 11:52               ` Paul E. McKenney
2022-10-18 14:31     ` John Ogness
2022-10-18 15:18       ` Paul E. McKenney
2022-09-29 18:07   ` [PATCH RFC v2 rcu 3/8] srcu: Check for consistent per-CPU per-srcu_struct NMI safety Paul E. McKenney
2022-10-02 22:06     ` Frederic Weisbecker
2022-10-02 23:51       ` Paul E. McKenney
2022-10-03 10:13         ` Frederic Weisbecker
2022-10-03 11:57           ` Paul E. McKenney
2022-10-03 12:37             ` Frederic Weisbecker
2022-10-03 13:32               ` Paul E. McKenney
2022-10-03 13:36                 ` Frederic Weisbecker
2022-09-29 18:07   ` [PATCH RFC v2 rcu 4/8] srcu: Check for consistent global " Paul E. McKenney
2022-09-29 18:07   ` [PATCH RFC v2 rcu 5/8] arch/x86: Add ARCH_HAS_NMI_SAFE_THIS_CPU_OPS Kconfig option Paul E. McKenney
2022-09-29 18:07   ` [PATCH RFC v2 rcu 6/8] arch/arm64: " Paul E. McKenney
2022-09-29 18:07     ` Paul E. McKenney
2022-10-05 11:12     ` Mark Rutland
2022-10-05 11:12       ` Mark Rutland
2022-09-29 18:07   ` [PATCH RFC v2 rcu 7/8] arch/loongarch: " Paul E. McKenney
2022-09-29 18:07   ` [PATCH RFC v2 rcu 8/8] arch/s390: " Paul E. McKenney
2022-10-03 14:11   ` [PATCH v2 rcu 0/8] NMI-safe SRCU reader API Frederic Weisbecker
2022-10-03 16:38     ` Paul E. McKenney
2022-10-14 22:47   ` Joel Fernandes
2022-10-14 22:52     ` Joel Fernandes
2022-10-18 10:33   ` John Ogness
2022-10-18 15:24     ` Paul E. McKenney
2022-10-18 18:44       ` John Ogness
2022-10-18 18:59         ` Paul E. McKenney
2022-10-18 21:57           ` Paul E. McKenney
2022-10-19 11:13             ` John Ogness
2022-10-19 19:14               ` Paul E. McKenney
2022-10-19 21:38                 ` John Ogness
2022-10-19 22:05                 ` Frederic Weisbecker
2022-10-20 22:27                   ` Paul E. McKenney
2022-10-20 22:41                     ` Paul E. McKenney
2022-10-21 12:27                     ` John Ogness
2022-10-21 13:59                       ` Paul E. McKenney
2022-10-21 18:41                       ` Paul E. McKenney
2022-10-24  6:15                         ` John Ogness
2022-10-24 13:47                           ` Paul E. McKenney
2022-10-27  9:31                             ` John Ogness [this message]
2022-10-27 14:10                               ` Paul E. McKenney
2022-10-27 14:39                                 ` John Ogness
2022-10-27 16:01                                   ` Paul E. McKenney

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=874jvpehod.fsf@jogness.linutronix.de \
    --to=john.ogness@linutronix.de \
    --cc=frederic@kernel.org \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=pmladek@suse.com \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.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 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.