From: Mike Rapoport <rppt@kernel.org>
To: Breno Leitao <leitao@debian.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>,
Andy Lutomirski <luto@kernel.org>, Borislav Petkov <bp@alien8.de>,
"Denis V . Lunev" <den@openvz.org>,
Ingo Molnar <mingo@redhat.com>, Juergen Gross <jgross@suse.com>,
Kiryl Shutsemau <kas@kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@kernel.org>,
linux-kernel@vger.kernel.org, x86@kernel.org,
Dave Hansen <dave.hansen@intel.com>
Subject: Re: [PATCH] x86/mm/pat: don't gate cpa_lock on debug_pagealloc_enabled()
Date: Tue, 28 Jul 2026 18:19:03 +0300 [thread overview]
Message-ID: <amjIZwONBjbNnust@kernel.org> (raw)
In-Reply-To: <ami0JWx2tHVig_KH@gmail.com>
On Tue, Jul 28, 2026 at 06:53:56AM -0700, Breno Leitao wrote:
> On Wed, Jul 15, 2026 at 05:45:19PM +0300, Mike Rapoport wrote:
> > @@ -1235,11 +1234,9 @@ static int split_large_page(struct cpa_data *cpa, pte_t *kpte,
> > {
> > struct ptdesc *ptdesc;
> >
> > - if (!debug_pagealloc_enabled())
> > - spin_unlock(&cpa_lock);
> > + spin_unlock(&cpa_lock);
> > ptdesc = pagetable_alloc(GFP_KERNEL, 0);
> > - if (!debug_pagealloc_enabled())
> > - spin_lock(&cpa_lock);
> > + spin_lock(&cpa_lock);
>
> A DEBUG_PAGEALLOC + KASAN kernel from linux-next-20260727 fails to finish
> booting on a large VM (many CPUs + large memory). Boot stalls in early
> userspace with a non-responsive CSD lock; it never reaches a login.
>
> I bisected it to this patch, which is the following on linux-next:
>
> 5fce67641a3e ("x86/mm/pat: Don't gate cpa_lock on debug_pagealloc_enabled()")
>
> Reverting it (restoring the !debug_pagealloc_enabled() gating around
> cpa_lock) makes the same kernel boot reliably.
>
> Symptom
> -------
>
> Boot hangs during udev coldplug (concurrent module loading, i.e. concurrent
> set_memory()). With csdlock_debug=1 the console shows:
>
> smp: csd: Detected non-responsive CSD lock (#1) on CPU#55, waiting
> 5000000019 ns for CPU#57 do_flush_tlb_all+0x0/0x30(0x0).
> smp: csd: CSD lock (#1) unresponsive.
> Sending NMI from CPU 55 to CPUs 57:
> NMI backtrace for cpu 57
> CPU: 57 UID: 0 PID: 860 Comm: (udev-worker) Tainted: G E \
> 7.2.0-rc5-next-20260727 #1 PREEMPT(full)
> RIP: 0010:queued_spin_lock_slowpath+0xae/0xd30
> Call Trace:
> <TASK>
> do_raw_spin_lock+0x268/0x2f0
> __change_page_attr_set_clr+0x32d/0x21f0
> ...
>
> CPU#55 is stuck in flush_tlb_all() waiting for CPU#57 to answer the IPI;
> CPU#57 is spinning on cpa_lock (RBX resolves to cpa_lock) inside
> __change_page_attr_set_clr(). The clocksource watchdog also reports
> remote CPUs timing out on the same IPIs just before this.
>
> Is this a known issue?
Yes:
https://lore.kernel.org/all/20260728-cpa-fixes-v1-0-2ed2352300b3@kernel.org
> --breno
--
Sincerely yours,
Mike.
prev parent reply other threads:[~2026-07-28 15:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 14:45 [PATCH] x86/mm/pat: don't gate cpa_lock on debug_pagealloc_enabled() Mike Rapoport
2026-07-15 15:08 ` Dave Hansen
2026-07-15 15:10 ` [tip: x86/mm] x86/mm/pat: Don't " tip-bot2 for Mike Rapoport (Microsoft)
2026-07-21 15:49 ` [PATCH] x86/mm/pat: don't " Lorenzo Stoakes (ARM)
2026-07-28 13:53 ` Breno Leitao
2026-07-28 15:19 ` Mike Rapoport [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=amjIZwONBjbNnust@kernel.org \
--to=rppt@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=den@openvz.org \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=kas@kernel.org \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@kernel.org \
--cc=x86@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