From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta0.migadu.com (out-43.mta0.migadu.com [91.218.175.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1AA50473C8C for ; Tue, 25 Aug 2026 13:39:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787665161; cv=none; b=s4ggIXYIESYeEWHaij8awjBLL51Y6mgI2nG/i1YSVYx3EoLAth6Y7Y+T7t8oSuIYiuAdA66RNNKycUh4a1bO44e14Lawkqd0pXdCWYHfEclMsbAg+jdbkZy2kqYjt92wsH5eRihp/7nrWHy2qkewNwqwZYZcjMT60aCrkr9P6Jc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787665161; c=relaxed/simple; bh=hP+K8Ebe2kc9ztciYZ4PaIPMJflSO6fNgvlSGw26+I0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ViKs3CCwJc9ClEzAbtusoQPRMto6eJcGqca87Ppeh/xcv0IeUV8ACFGGjWwzWU7FxSCx3DjgroYLkw+K+t+aDytu0VVAvVvlXupClcW31fJyqq0J+tQpIKmbgOTrwQxY6WWxb7F6WNcNEma7EvBWD6xLdW1GElPuiUbnWblwA/8= 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=eYEU2Vl3; arc=none smtp.client-ip=91.218.175.43 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="eYEU2Vl3" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=hP+K8Ebe2kc9ztciYZ4PaIPMJflSO6fNgvlSGw26+I0=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1787665157; v=1; x=1788269957; b=eYEU2Vl33X93zUlQ1rBRk0oVLlE3UuL0lfoP2YE3+iD+zF03jaClyqPbGMvx8Fer5wRLzmr7 tqqhClXz3QKEGr62BfyEWewt1+exyGRpSmPVX6qw37bEPny9M5WkLDkJZne25NxC/fHKAZ0g2qq azhQNBl0ckbe4ByfyXz8tRRk= X-Envelope-To: linux-kernel@vger.kernel.org Received: from [10.254.116.35] (101.126.56.83) by smtp.migadu.com with ESMTPS id 4d13fbc4cbc00d6c; Tue, 25 Aug 2026 13:39:06 +0000 X-Mizu-Trace-ID: 4d13fbc4cbc00d6c X-Migadu-Flow: FLOW_OUT Message-ID: Date: Tue, 25 Aug 2026 21:38:44 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 16/17] mm/hugetlb: localize struct huge_bootmem_page To: Muchun Song , Andrew Morton , Oscar Salvador , David Hildenbrand Cc: Mike Rapoport , Vlastimil Babka , Lorenzo Stoakes , Michal Hocko , David Laight , "Liam R . Howlett" , Suren Baghdasaryan , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Muchun Song References: <20260825084608.47437-1-songmuchun@bytedance.com> <20260825084608.47437-17-songmuchun@bytedance.com> From: Qi Zheng In-Reply-To: <20260825084608.47437-17-songmuchun@bytedance.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 8/25/26 4:46 PM, Muchun Song wrote: > struct huge_bootmem_page is only used by hugetlb boot-time allocation > code, but its definition currently lives in mm/internal.h because > hugetlb_vmemmap_optimize_bootmem_page() takes it as an argument. This > exposes a hugetlb-specific internal type more broadly than needed. > > Change hugetlb_vmemmap_optimize_bootmem_page() to take the information it > actually needs. With that interface, mm/hugetlb_vmemmap.h no longer needs > to include mm/internal.h, and struct huge_bootmem_page can move into > mm/hugetlb.c. > > Signed-off-by: Muchun Song > Acked-by: Mike Rapoport (Microsoft) > --- > v2: > - Pass PFN and order to hugetlb_vmemmap_optimize_bootmem_page() instead > of struct hstate and bootmem metadata to simplify the code further > - Collect Acked-by from Mike Rapoport > --- > mm/hugetlb.c | 8 +++++++- > mm/hugetlb_vmemmap.c | 8 +++----- > mm/hugetlb_vmemmap.h | 5 ++--- > mm/internal.h | 7 ------- > 4 files changed, 12 insertions(+), 16 deletions(-) > Acked-by: Qi Zheng Thanks, Qi