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 523071F4611 for ; Mon, 25 May 2026 17:21:53 +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=1779729714; cv=none; b=cOEy/u5kLzhip1kzCFPCcjrKo9OGk15TKxmuh99WLvNMcPul0xYx3JZ1Z+gewNa1KvwewwKZisa3JAHoQbXH5GPwTs5o7085S8siHQYj4QrvPIcuyzF2PiMnJo5hPBmMbPwYUMfFbajKchx4+fZjzhYSNgCQMTsDA8aLPPHG14A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779729714; c=relaxed/simple; bh=j2llnXJQuKb9f98HQPDptz4JY4aJOSeITcwUkNbkttc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CZJV3lRPMq/snCcLMHXScYfSe+4+26x/EYI8ARRcEQ0ehJT8E4H0BCingEzFOy/JQSjJ2FIBSTuwIpmlo+QvQfcii+IYEKQSFkm3BU3J3zQseXVGVUYmzNMG5CHPpRLPkFOuPPHhjUT9w6ghYqkviVVK2IWq26ha/ekKfnt4afk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=G23nJ4o+; 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="G23nJ4o+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 178DA1F000E9; Mon, 25 May 2026 17:21:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779729713; bh=Ns+vixeNuP37BFGrljacUY/E2Axl/BTJ39BV75ZKyzI=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=G23nJ4o+2EDnvWDsMORaOOW4c+DbVz4GQFo63SKudkw36GZc409Y/KHX9j9sdpy1X dtYIfPGIXKXzYsbdLoVyS1FSy6fc5MtMqEsmtKaYm7ES6N0MlgA1/b/T9FczvPqXgK po0e00lCrGIDwP9ffxrC5auvv+hWIJ7e43jdfSwoZWBTRX6UYDG6HHL+v8ZHl0CnEg A5AlUJZ2rmuV1hlKn50tXvZD/te5/GqwEJxM9LvUTGbFanLfC18GUYMXdpsAhDZOKC 9JMXC4yCAkbly3wYc+PWjltnBdtSzNJGDvDObXep3a2gg+KR4gfgFmGKlpYYqs964n jxzaijAYQGGRw== Date: Mon, 25 May 2026 19:21:45 +0200 From: "Oscar Salvador (SUSE)" To: Muchun Song Cc: Andrew Morton , David Hildenbrand , Muchun Song , Oscar Salvador , Michael Ellerman , Madhavan Srinivasan , Lorenzo Stoakes , "Liam R . Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Nicholas Piggin , Christophe Leroy , Ackerley Tng , Frank van der Linden , aneesh.kumar@linux.ibm.com, joao.m.martins@oracle.com, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 13/69] mm/hugetlb: Refactor early boot gigantic hugepage allocation Message-ID: References: <20260513130542.35604-1-songmuchun@bytedance.com> <20260513130542.35604-14-songmuchun@bytedance.com> 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: <20260513130542.35604-14-songmuchun@bytedance.com> On Wed, May 13, 2026 at 09:04:41PM +0800, Muchun Song wrote: > The early boot gigantic hugepage allocation helpers currently mix > allocation with huge_bootmem_page setup, and leave part of the > initialization flow in architecture code. > > Refactor the interface to return the allocated huge page pointer and > move the huge_bootmem_page setup into the generic hugetlb code. This > makes the architecture-specific paths focus only on finding memory, > while the common code handles node placement and early page metadata > setup in one place. > > This also lets powerpc benefit from memblock_reserved_mark_noinit(), > which it did not enable before. > > In addition, upcoming cross-zone validation for boot-time gigantic > hugetlb reservation is common logic. With this refactoring, that logic > can stay in the generic code instead of being duplicated in > architecture-specific paths. > > Signed-off-by: Muchun Song Same comment as Mike: Reviewed-by: Oscar Salvador (SUSE) -- Oscar Salvador SUSE Labs