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 EB8A8C2FD for ; Sun, 14 Jun 2026 09:46:49 +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=1781430410; cv=none; b=SDznZAsyFXvu6uL4FLP3LDeuIbK/By5rQ24pzbP/o5TsLbij98/lga8H/UAhQTg/sE15Ga+7McrZPtHJ/767xua4hCmEEXYeZOor5rX+2y0mc47UNFmes4GvKbl9ezGfrkhmuaCFhRcvak56rvH/BGJoxkxs/85rVV7et9F7fRw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781430410; c=relaxed/simple; bh=gLhg99pJsq65FNasKgQJVeSt9JPVFPKrXAqXdCxSA6Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LfQsBVm2Hbi07/aSDuHUP6q9bm8/+v7rQH6sn/sjFFXfWje2V67Lu6/s4na53owsqVp3hAXtqtLboM0Fh7FV+9RRDg1C51OHsFLSqtCyrp4XkQ/ci82Np4GOn3KyO9o+F2BaHG4AbXtaPqVNOR/UDyuoLT0ptmojlD/kMHpWzhM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KNgHT95Q; 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="KNgHT95Q" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B7CE1F000E9; Sun, 14 Jun 2026 09:46:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781430409; bh=ch/CpHvya+lx1cR9vxabGOo27V2BdvD/1TKGk2c7iog=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=KNgHT95QFrNdcW7kXu8SpsK/TzlVvtt1gCIIOnXjMZ8/IL3FZj1I3CrwYfsoutIgP ezvgDaG/R127cAIpHzGSfltsz8/Tp/0PfIlgqfVs1sac/yxN+AhwJXzW43iOufqj3N B1U8fzT5n/iT0rBYRXK5gAf+oCaBLx+1l8UQlVao2NcNob5cLRLK/7gT5tFSMAgbAu Y4dEFiA5gThYLkiKhQBi1T9LLLLSqSfzOyUtLij608bEgiIYMJrcnvCVdyZnkhB9az Pz/IUY6477nPvxa2soQp2RulQ5CEvn1xRddj8Qo/I0Ho6ZP9XaLXvUfvNzABlmoXD1 Gntrp3/2TlVlA== Date: Sun, 14 Jun 2026 12:46:40 +0300 From: Mike Rapoport To: Muchun Song Cc: Oscar Salvador , David Hildenbrand , Andrew Morton , Madhavan Srinivasan , Michael Ellerman , Muchun Song , Lorenzo Stoakes , "Liam R . Howlett" , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Nicholas Piggin , Christophe Leroy , Ritesh Harjani , "Aneesh Kumar K . V" , linuxppc-dev@lists.ozlabs.org, Mike Kravetz Subject: Re: [PATCH v4 14/19] mm/hugetlb: Free cross-zone bootmem gigantic pages after allocation Message-ID: References: <20260612035903.2468601-1-songmuchun@bytedance.com> <20260612035903.2468601-15-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: <20260612035903.2468601-15-songmuchun@bytedance.com> On Fri, Jun 12, 2026 at 11:58:58AM +0800, Muchun Song wrote: > Now that hugetlb reservation runs after zone initialization, bootmem > gigantic page allocation can detect pages that span multiple zones. > > Keep those cross-zone pages separate during allocation and free them > after allocation completes, so later hugetlb initialization only sees > zone-valid gigantic pages. > > This chooses to free cross-zone gigantic pages directly instead of > retrying allocation. In practice, such cross-zone cases are expected to > be very rare, so adding retry logic does not seem justified at this > point. Keeping the handling simple also preserves the previous behavior. > If similar real-world reports show up later, retry support can be > reconsidered then. > > Signed-off-by: Muchun Song Acked-by: Mike Rapoport (Microsoft) > --- > mm/hugetlb.c | 75 ++++++++++++++++++++++++++++++++++++++++++++-------- > 1 file changed, 64 insertions(+), 11 deletions(-) -- Sincerely yours, Mike.