From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 5DA4240C5C5 for ; Wed, 12 Aug 2026 09:37:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786527429; cv=none; b=Xj4dg0/W92Pb3bnO1Cy29mPeafeiLpXzCjt6X9CN91IqgXtx4o/og20j9ClkYQJAPZt3zrIQaKZwl+Gf/aiY/pNZnGnOBLccSeoQMYHYf+hiqfKKV9pBGGLMVuC/9Zbe7DzhZ2zdcGelYEGAMg49fA61VYd7fnGX9Uo5OCKTcdE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786527429; c=relaxed/simple; bh=ZVm0I+4CnY8Kjsb/wK+YiBwR/wyOwuijfKRRaBi3qDY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aea05pc6zR7Is9/JzNs2QPT5E5XFploYN9ZR5tcXWS7o+Q0fmZCEOFCvMQx8tJ+3nbUV92Q0kwAajzrb3eralpl2LSgJ1Pxx7wjnVEdoiQZ+fOX6RPuMR06fLIC1iwF+X8W2F9tC7qjWh16H/WVMUJuGC7xu4fWV7hIIRuyQ7Lw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Mw0GXJkf; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Mw0GXJkf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AAE751F000E9; Wed, 12 Aug 2026 09:37:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786527427; bh=ZVm0I+4CnY8Kjsb/wK+YiBwR/wyOwuijfKRRaBi3qDY=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=Mw0GXJkfhxEG2wLcMT7FaBL6diGloCYSwqYBc+How1kTzqZ3Oa/hfrvLY1BZ4ju4I Ya4KR76z5bVJ4Mo6a0okb/e20xVO2Vnms503UjIFFu9nI6IfTX9PaFDmW3JndgPkFu onw1nEPS4CW1P3KiByYqzPZAc52L0olTqfJLx/ZMhYtkojsm2iwFezECR/5n4pS5WY GIyqA2ROQjCoY15xyuWNDKTj32b7IJag3X5SYkTfyniCBdc0x4roCJsQ4YSsIRh+d1 INiUxKTdHzJ8+mPlBZp+ZdON0jEBmh9ShjHNsPiSUeF1kGhOZfZAqaCCdoG9o98SOV 0Bpu4PZIfrdOA== Date: Wed, 12 Aug 2026 10:36:48 +0100 From: "Lorenzo Stoakes (ARM)" To: "David Hildenbrand (Arm)" Cc: Andrew Morton , Zi Yan , Baolin Wang , "Liam R. Howlett" , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Lance Yang , Usama Arif , Pankaj Raghav , Hannes Reinecke , Hugh Dickins , Yang Shi , Kiryl Shutsemau , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Hengbin Zhang Subject: Re: [PATCH mm-hotfixes v2 2/2] mm/huge_memory: separate out CONFIG_PERSISTENT_HUGE_ZERO_FOLIO logic Message-ID: References: <20260730-fix-refcounted-huge-zero-v2-0-c5d8a41b317f@kernel.org> <20260730-fix-refcounted-huge-zero-v2-2-c5d8a41b317f@kernel.org> <011609c5-deea-43f2-a2c2-90f64053eb3a@kernel.org> 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: <011609c5-deea-43f2-a2c2-90f64053eb3a@kernel.org> On Wed, Aug 12, 2026 at 10:05:55AM +0200, David Hildenbrand (Arm) wrote: > On 7/30/26 12:55, Lorenzo Stoakes (ARM) wrote: > > Rather than mixing the refcounted and non-refcounted > > CONFIG_PERSISTENT_HUGE_ZERO_FOLIO logic, separate the two out cleanly > > so it is clear what happens when this configuration option is set and what > > happens when it is not. > > > > Introduce HUGE_ZERO_UNSET_PFN to abstract the ~0UL assignment, only > > introduce the refcount, lock and shrinker if > > !CONFIG_PERSISTENT_HUGE_ZERO_FOLIO, abstract initialisation and teardown, > > abstract the huge zero folio allocation from refcounting. > > > > Also change a BUG_ON() to WARN_ON_ONCE() while we're at it. > > > > No functional change intended. > > Ugh. Why is this patch already upsteam with > > Fixes: 3b77e8c8cde5 ("mm/thp: make is_huge_zero_pmd() safe and quicker") > Cc: Yeah these tags weren't part of it + it was intended as a separate thing but I guess it got lost in translation. I should probably have just sent it entirely separately after the fix landed so my bad on that part. > > It's absolutely not a fix. It's a cleanup that should have been reviewed properly. > > I really wanted to review this. > > Making David grumpy in the morning, good job everyone. Sorry about that :) At least it's not schlop? ;)) > > -- > Cheers, > > David -- Cheers, Lorenzo