From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-171.mta1.migadu.com (out-171.mta1.migadu.com [95.215.58.171]) (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 690353B841C for ; Thu, 9 Jul 2026 12:36:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783600574; cv=none; b=scXHHSj854xqC7bfacGRTFwCLNBKoj8VuVo49Z/qo4xkytVk3TO6x5nPvExrjg0MuzV8eNHZHiV267JmFW1Q+SDDsKJs1tZQJOhrCJQVvfI1smj2QEmy/vHESHGwYuVd3X9IKPnsp0STQVrDdtfBLL9HIg17Kii6/YwMd0wvVvU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783600574; c=relaxed/simple; bh=uI7QPxYMApmNPjLHgR9RhJlAjXF2Ra94v0+vYD/XEr8=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To; b=DFiaWLJxCQ0VLEQ9d1Jj4kuyvHVBmhmRDo7LUP/q7YLTCQuEMi6YIVYMzDZSp4g5jzWFMIwewLHjtWXOlRs1859hQLCmwBqNrzl4VtKlOW/kaOFvW00q0AqCid42mPUelbJBTwMAEvOL8XWo2ZZ3StuXTpbv4HNBU8qpUM5//y0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=CsCRiN26; arc=none smtp.client-ip=95.215.58.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="CsCRiN26" Content-Type: text/plain; charset=us-ascii DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1783600570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uajAih/cRQEi5P07GjUh87AJGEuGYoUB7sEFHa8VKYA=; b=CsCRiN26DZyAILMKmd9IZQ0q2FK7WjXXpQjfSXMZbkuZSkAVVu/0giYKRI1nB6wYgl69FW xB9e6mE0czdXxJGOC+QhdTcFxIi6Ox/RZZvACqPluvfwn0/HDVia/wIoIBcrj8xT6/wNfJ HiviROy7X9Lv/cQVWxhM6qOhCc9wrJ0= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.600.51.1.1\)) Subject: Re: [PATCH 08/17] mm/sparse: mark memory sections present earlier X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: Date: Thu, 9 Jul 2026 20:35:13 +0800 Cc: Muchun Song , Andrew Morton , Oscar Salvador , David Hildenbrand , linux-mm@kvack.org, Vlastimil Babka , Lorenzo Stoakes , Michal Hocko , linux-kernel@vger.kernel.org Content-Transfer-Encoding: 7bit Message-Id: <8F2B957E-B99A-46ED-B3A3-CB3C932851DF@linux.dev> References: <20260702093821.2740183-1-songmuchun@bytedance.com> <20260702093821.2740183-9-songmuchun@bytedance.com> To: Mike Rapoport X-Migadu-Flow: FLOW_OUT > On Jul 9, 2026, at 18:54, Mike Rapoport wrote: > > 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 ... Right. > >> 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()? Make sense. This name really captures the function's purpose well. I'll go ahead and use it. Muchun, Thanks. > >> 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.