From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C8FD43D171B for ; Thu, 30 Jul 2026 10:43:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785408231; cv=none; b=UpAbHsPRbqMUKkwZ1ZxUcFzVRvokYneUH/OhAUFZDywupxGFhKtdncen7vdm//dakt0LHmm656ThA5Kp1V1Nbg5mtycSN69oF7oqzB0kwx3qklRNltRdvIo57cTGrMejlHLUU6kJCXovmgo67j9TULrvmSDIIV16cal/Lzy8op4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785408231; c=relaxed/simple; bh=wRm7Kf4OB+B4pL3yFm9jOAO/yI9wI78vA629lXHgnWo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XniO0WGxyhvgB7bIuVVaOiAajmlpho6NNy7QZMYf0PH7bCyDwnlezXJXpTt8XXkaOzJpE40GCFNrYS9Oa/76Pc8rUFCwQiI+AE+zwE+6YwgIHrkviS+z/B+BEBeQiz1V7Hdd179MIJMn77/2q77YuiDugWF6xImsZZG3+aO4x3k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=NuWQBwxC; arc=none smtp.client-ip=90.155.92.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="NuWQBwxC" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=RksSVJP5jpMGYGZkzaOXY22WiKXmSFnpB2S8nUJGyiA=; b=NuWQBwxCS29i0hlQyqjXwOe0Pu gNy7UmGWU1XId3HCqlSJ5sFR4kdI2VFCMacjLjNAitE7kS9ezihtgf7cfnXXnzwAueKsx3Oz/FUr3 TVcPPoRbsThHggoFcexzsZNgTU2ufq+fQUzsZfBwZ7TfS6m+3uWvSsEJNUYO1/0++6ZPWALf80Yag 79wMvCTPJf85jN380KuooBXWSvkzYiaYMraPqlr06E+luy/UP7DEoT+cD8aYgSVu98ZmpeSTptJNM FSYd93D1sHju9KLXQ+k6F51eD1kOult88Lzh3N2djL/hKFUK5ObRqjbbFZl7XIZ7kC6JmHiX80mx+ O+piuZjA==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.99.2 #2 (Red Hat Linux)) id 1wpOEh-00000006arK-0WA4; Thu, 30 Jul 2026 10:43:35 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id EFA4830095A; Thu, 30 Jul 2026 12:43:33 +0200 (CEST) Date: Thu, 30 Jul 2026 12:43:33 +0200 From: Peter Zijlstra To: Mike Rapoport Cc: Dave Hansen , linux-kernel@vger.kernel.org, Andy Lutomirski , Borislav Petkov , David Hildenbrand , Ingo Molnar , Jason Gunthorpe , Juergen Gross , Kevin Tian , Kiryl Shutsemau , "Liam R. Howlett" , Lorenzo Stoakes , Lu Baolu , "H. Peter Anvin" , Shakeel Butt , Suren Baghdasaryan , Thomas Gleixner , Toshi Kani , Vlastimil Babka , Will Deacon , linux-mm@kvack.org, x86@kernel.org Subject: Re: [PATCH 3/3] x86/mm: Fix and document DEBUG_PAGEALLOC Message-ID: <20260730104333.GE751831@noisy.programming.kicks-ass.net> References: <20260729110807.797920433@infradead.org> <20260729111119.604452135@infradead.org> <20260729144838.GM651302@noisy.programming.kicks-ass.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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.