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 DC9A640BCBC for ; Thu, 9 Jul 2026 10:54:43 +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=1783594486; cv=none; b=LZB1Xe4PEzSmFcAchj71XGGypItEkUCfKpRhoVASby2o/irSvoDUuPtqAPHwa3q1OfSrVIsEhadZ5DDYd/vmCa+9vcwQeZmT24Q0CudhrELYuHplgicfzLKwb17RUkUHlDolrwbMrxqe6F5f/VltbTj7zh2Dy25P9Odx/mlnRyg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783594486; c=relaxed/simple; bh=WmUG0VIXITgUDgEiY4YYSQjgozDjLwWD7pOht9c9sK8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AVOVio0jXDdbkR6bGN2VlIainUQgwOpctt+k6WWByeqWan8jRFGoqZSf2n8mOC1t9CNMArc8Cb8PbXANAnRZvuiDdgeh9RpiJuLVGUVoGQXe3I9TUnFiXnmVty9XUH1dJU5b91ZAQG33RDBb1Sg5YPB1nZrnj85S8btIYxQEQAk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=djg6eWwF; 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="djg6eWwF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8EE41F000E9; Thu, 9 Jul 2026 10:54:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783594482; bh=5IFQMzrskUD7Q0K8lx1GZRyHsORgTiSpQss7AS85z8Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=djg6eWwFC+6+N4DPJiLg8s9Is4gODHSnj3M5xQ1v0i1w+hmeZNK7PwkhWrhIjWf2/ CH0pQWNcuemtfyMtkDGcXlblhUbv+mjc67+sAI2oYAXbGbneZb98akSoZWp4z7MbAA MYCJParZCDiX5lgd1V2qmQibMC1LM3lVUBOl2pq+NKbT1WI11q/Zi4JkVaBsLLiBHz p6OdgEEPn/Pwqs7Kqos0FerkgrbibOSK7z0fC+xurQI2IZJZV4ECmDO+tiK3gFMCeg 5YslZiOiXJxROUWILWcI/6ykfLhwIb7A7zzUuDHWxVPRT4iC9mwmMlK1cQY+TJN9jD VpGM7SKbTbfyg== Date: Thu, 9 Jul 2026 13:54:35 +0300 From: Mike Rapoport To: Muchun Song Cc: Andrew Morton , Oscar Salvador , David Hildenbrand , linux-mm@kvack.org, Vlastimil Babka , Lorenzo Stoakes , Michal Hocko , linux-kernel@vger.kernel.org, muchun.song@linux.dev Subject: Re: [PATCH 08/17] mm/sparse: mark memory sections present earlier Message-ID: References: <20260702093821.2740183-1-songmuchun@bytedance.com> <20260702093821.2740183-9-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: <20260702093821.2740183-9-songmuchun@bytedance.com> On Thu, Jul 02, 2026 at 05:38:12PM +0800, Muchun Song wrote: > Upcoming HugeTLB bootmem changes need sparsemem section metadata before > the HugeTLB bootmem allocation path runs. The memblock ranges are marked > present from sparse_init(), which is called too late for that setup. It's not only that memblock regions are marked present, but it actually initializes mem_section's for the present memory ... > Move the code that marks memblock ranges present into > mm_core_init_early(), before free_area_init() and the HugeTLB bootmem > setup. Rename the helper to sparse_memblock_present() to make the new ... so let's name this function to reflect that. How about sparse_sections_init()? > caller describe the sparsemem-specific initialization step. > > This is a preparatory change. > > Signed-off-by: Muchun Song > --- > mm/internal.h | 2 ++ > mm/mm_init.c | 1 + > mm/sparse.c | 4 +--- > 3 files changed, 4 insertions(+), 3 deletions(-) -- Sincerely yours, Mike.