Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Mike Rapoport <rppt@kernel.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>,
	linux-kernel@vger.kernel.org, Andy Lutomirski <luto@kernel.org>,
	Borislav Petkov <bp@alien8.de>,
	David Hildenbrand <david@kernel.org>,
	Ingo Molnar <mingo@redhat.com>, Jason Gunthorpe <jgg@ziepe.ca>,
	Juergen Gross <jgross@suse.com>,
	Kevin Tian <kevin.tian@intel.com>,
	Kiryl Shutsemau <kas@kernel.org>,
	"Liam R. Howlett" <liam@infradead.org>,
	Lorenzo Stoakes <ljs@kernel.org>,
	Lu Baolu <baolu.lu@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Shakeel Butt <shakeel.butt@linux.dev>,
	Suren Baghdasaryan <surenb@google.com>,
	Thomas Gleixner <tglx@kernel.org>,
	Toshi Kani <toshi.kani@hpe.com>,
	Vlastimil Babka <vbabka@kernel.org>,
	Will Deacon <will@kernel.org>,
	linux-mm@kvack.org, x86@kernel.org
Subject: Re: [PATCH 3/3] x86/mm: Fix and document DEBUG_PAGEALLOC
Date: Thu, 30 Jul 2026 12:43:33 +0200	[thread overview]
Message-ID: <20260730104333.GE751831@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <ampPb0o0T_JdxrMx@kernel.org>

On Wed, Jul 29, 2026 at 10:07:27PM +0300, Mike Rapoport wrote:

> > > I like my version with your comments added there more as it localizes the
> > > DEBUG_PAGEALLOC exception in the lock wrappers.
> > 
> > So I don't like removing cpa_lock entirely; it is still serializing cpa
> 
> I meant static inline cpa_lock(), not removing it entirely.
> With your comment why DEBUG_PAGEALLOC is special.

That is, I despise the whole:

	if (!debug_pagealloc_enabled())
		spin_lock(&cpa_lock);

with a passion. It blanked kills cpa_lock as whole and changes the rules
for everyone when debug_pagealloc is on.

cpa_lock ensures that concurrent cpa() calls on an overlapping region
have a well defined outcome. By removing it entirely you can get random
state.

In practise this isn't likely to matter, but relaxing this for a debug
option is insane. Debug stuff should tighten rules, not relax them.


  reply	other threads:[~2026-07-30 10:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-29 11:08 [PATCH 0/3] x86/mm: DEBUG_PAGEALLOC musings Peter Zijlstra
2026-07-29 11:08 ` [PATCH 1/3] x86/mm: Use guard() in cpa_collapse_large_pages() Peter Zijlstra
2026-07-29 11:08 ` [PATCH 2/3] x86/mm: Use guard() for pgd_lock Peter Zijlstra
2026-07-29 11:08 ` [PATCH 3/3] x86/mm: Fix and document DEBUG_PAGEALLOC Peter Zijlstra
2026-07-29 14:13   ` Mike Rapoport
2026-07-29 14:48     ` Peter Zijlstra
2026-07-29 19:07       ` Mike Rapoport
2026-07-30 10:43         ` Peter Zijlstra [this message]
2026-07-30 11:17           ` Mike Rapoport

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=20260730104333.GE751831@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=baolu.lu@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=david@kernel.org \
    --cc=hpa@zytor.com \
    --cc=jgg@ziepe.ca \
    --cc=jgross@suse.com \
    --cc=kas@kernel.org \
    --cc=kevin.tian@intel.com \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=rppt@kernel.org \
    --cc=shakeel.butt@linux.dev \
    --cc=surenb@google.com \
    --cc=tglx@kernel.org \
    --cc=toshi.kani@hpe.com \
    --cc=vbabka@kernel.org \
    --cc=will@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