From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-188.mta1.migadu.com (out-188.mta1.migadu.com [95.215.58.188]) (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 225A53EFFDE for ; Mon, 20 Jul 2026 11:05:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784545557; cv=none; b=HnqfhsSj8wmdkClgmAC621GGIQSd1PDoLQujMfJJko6EBQvskO3ziZjixovyUlEcBamMzWRAI5V7rw6geXTujVoQ0NT9rK5CU9a5moKdj2MsknVcSLQO7VjcfDMNK10aW7j6A8QVo5MtHfJ3B7O0A8ULbRufPumEsUDQ+itUNEE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784545557; c=relaxed/simple; bh=roQbF4OGwa7rs6sHlM7XAH9CeyRVo9dXrFlcM3vJGDw=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To; b=NOIO8cyceGWOGI6c5XMV3zXFZA7+XoJ/vWB3fwXn3eQTo24l5cHG3aLojL95AiPohykM6ntEVA9xWy55Q/kjs/cHfmTwZVveXLiGltu8a6DV12paOVyzlH8lUJD3fFhP0eatvRatRsnCE0vHlUir7M0bgEtoFjv4Ic3W5NIoxQ4= 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=e6xgDC0b; arc=none smtp.client-ip=95.215.58.188 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="e6xgDC0b" Content-Type: text/plain; charset=us-ascii DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1784545551; 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=7Rwb7HcnGB5WNSmzxd6c+y3DcrzD5W7xrtCT8bRFoPg=; b=e6xgDC0bwPSfZwUxWdBpoK9NDV1GuB4FQICPCZuU66T0ZQ5mCC3vWHv7lrGcyhZLhQfNuM D+TcvKkx0O0dfQ6SFJKnbxDAD/Puud6ORuiUd6Y8eI3Xar68e8yb9X9fsnQCjDUfXWpAli EHOReSugzodK7HhScOqtOCP2IDifXCo= 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 v2 06/17] mm/mm_init: factor out pfn_to_zone() X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: <20260720093127.540540-7-songmuchun@bytedance.com> Date: Mon, 20 Jul 2026 19:05:36 +0800 Cc: Andrew Morton , Oscar Salvador , David Hildenbrand , Mike Rapoport , Vlastimil Babka , Lorenzo Stoakes , Michal Hocko , David Laight , linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 7bit Message-Id: References: <20260720093127.540540-1-songmuchun@bytedance.com> <20260720093127.540540-7-songmuchun@bytedance.com> To: Muchun Song X-Migadu-Flow: FLOW_OUT > On Jul 20, 2026, at 17:31, Muchun Song wrote: > > pfn_to_zone() in hugetlb_vmemmap.c duplicates the zone lookup logic in > __init_deferred_page(). > > Move it to mm_init.c, declare it in mm/internal.h, and reuse it from > __init_deferred_page() and HugeTLB early vmemmap initialization instead > of open-coding the zone walk there. Sashiko said "The commit message states that pfn_to_zone() is declared in mm/internal.h, but the patch actually adds the declaration to mm/mm_init.h instead". That is indeed an issue. When I was handling the rebase, I forgot to update the commit message here due to code conflicts. I will fix this in the next version. Thanks.