From: Stefan Wiehler <stefan.wiehler@nokia.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>,
Will Deacon <will@kernel.org>
Cc: Joel Fernandes <joel@joelfernandes.org>,
"Paul E. McKenney" <paulmck@kernel.org>,
Josh Triplett <josh@joshtriplett.org>,
Boqun Feng <boqun.feng@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Lai Jiangshan <jiangshanlai@gmail.com>,
Zqiang <qiang.zhang1211@gmail.com>,
linux-arm-kernel@lists.infradead.org, rcu@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm: smp: Avoid false positive CPU hotplug Lockdep-RCU splat
Date: Fri, 9 Aug 2024 15:37:38 +0200 [thread overview]
Message-ID: <f15aea08-8daa-4994-a8f6-be0461b06539@nokia.com> (raw)
In-Reply-To: <ZfF4t74OD4CgVaGV@shell.armlinux.org.uk>
I'd like to revive the discussion and quickly summarize our options to
avoid a false-positive Lockdep-RCU splat when check_and_switch_context()
acquires the ASID spinlock:
1. Briefly report CPU as online again via
rcutree_report_cpu_{starting|dead}()
2. Replace raw_spin_lock*() by arch_spin_lock()
3. Remove ASID spinlock
Both 1. and 2. are workarounds with different pros and cons/proponents.
Regarding 3., the last comment form Russell is:
> For 32-bit non-LPAE, I can't recall any issues, nor can I think of any
> because module space is just another few entries in the L1 page tables
> below the direct mapping (which isn't a problem because we don't use
> anything in hardware to separate the kernel space from user space in
> the page tables.) TTBCR is set to 0.
>
> For LPAE, there may be issues there because TTBR0 and TTBR1 are both
> used, and TTBCR.T1SZ is set non-zero to:
>
> arch/arm/include/asm/pgtable-3level-hwdef.h:#define TTBR1_SIZE (((PAGE_OFFSET >> 30) - 1) << 16)
>
> so I suspect that's where the problems may lie - but then module
> mappings should also exist in init_mm (swapper_pg_dir) and should
> be global.
Unfortunately I'm don't feel qualified to contribute to the discussion
on option 3. Russell and Will, would you be able to spare some time to
drive this further? Otherwise I would propose to make a decision on
going for option 1 or 2.
Kind regards,
Stefan
next prev parent reply other threads:[~2024-08-09 13:37 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-07 16:09 Stefan Wiehler
2024-03-07 17:45 ` Paul E. McKenney
2024-03-07 17:49 ` Paul E. McKenney
2024-03-07 18:54 ` Russell King (Oracle)
2024-03-07 19:08 ` Paul E. McKenney
2024-03-07 18:49 ` Boqun Feng
2024-03-08 10:20 ` Stefan Wiehler
2024-03-08 14:57 ` Joel Fernandes
2024-03-09 7:45 ` Stefan Wiehler
2024-03-09 9:57 ` Russell King (Oracle)
2024-03-12 22:14 ` Will Deacon
2024-03-12 22:39 ` Russell King (Oracle)
2024-03-13 0:32 ` Will Deacon
2024-03-13 9:58 ` Russell King (Oracle)
2024-08-09 13:37 ` Stefan Wiehler [this message]
2024-08-09 13:48 ` Russell King (Oracle)
2024-08-09 14:06 ` Stefan Wiehler
2024-03-11 16:08 ` Russell King (Oracle)
2024-03-11 16:17 ` Stefan Wiehler
2024-03-11 19: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=f15aea08-8daa-4994-a8f6-be0461b06539@nokia.com \
--to=stefan.wiehler@nokia.com \
--cc=boqun.feng@gmail.com \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mathieu.desnoyers@efficios.com \
--cc=paulmck@kernel.org \
--cc=qiang.zhang1211@gmail.com \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=will@kernel.org \
/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®