From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E3C749454 for ; Sat, 11 Jan 2025 01:45:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736559943; cv=none; b=tKlT7Vyx52z62m0ewfcO2cI/o1P1Xgapmt6I2/dFwoYEDThSKSuceIp45obf4YIBMF0pK+2YUp+gBjswy17AvMmKo96day8SEIvzKC0HyRA3PZM9ClWDMSQOxuq8TpS0YE4p5N5Yv7OuJS5/elYX92b629IxUrfonSgQJZ6IZN0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736559943; c=relaxed/simple; bh=nBnDsOoHXQcYFac7WyKXVagOjHw6E4ylabSU1vqZAf4=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=Kvv3mm10VVvcBQybVxFZebG9vvIzyHSYmkNU9zvXvtvQ5ZipChNzAFoGk2M7EdIsi3fx8XOyz4xl7FA7fwGcCI6s6UDpu4zh1m3e1vTd+SsF2xc+wFk1FiyxpWKEOIOLLe8qCRBY9h3nXe1MbJxTY3jsg9UhNWG8vMW2n3B4c+0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=wDyltxgA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="wDyltxgA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F38E1C4CED6; Sat, 11 Jan 2025 01:45:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1736559942; bh=nBnDsOoHXQcYFac7WyKXVagOjHw6E4ylabSU1vqZAf4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=wDyltxgAluBWKfsJvy3vcIBZ65Hdx8jr9A+OMbO67UhDeGxIRwdBf/YcgOx1fVmUh JmGnsL2pAe6Ucwug0fuAZEN2fZBAfyfsCS7utZDpqQ3hbegAF51oNey7/y9GDzfGNu g8wHTXoUQCtAJSq1NuR7+plDwedi1bS2c+Ot4P5c= Date: Fri, 10 Jan 2025 17:45:41 -0800 From: Andrew Morton To: David Hildenbrand Cc: yangge1116@126.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, 21cnbao@gmail.com, baolin.wang@linux.alibaba.com, liuzixing@hygon.cn Subject: Re: [PATCH] mm/hugetlb: prevent reuse of isolated free hugepages Message-Id: <20250110174541.bf22caf1afa227b9a76a7e4c@linux-foundation.org> In-Reply-To: References: <1736477766-23525-1-git-send-email-yangge1116@126.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit On Fri, 10 Jan 2025 09:14:47 +0100 David Hildenbrand wrote: > > To migrate huge 0, we obtain huge x from the pool. After the migration > > is completed, we return the now-freed huge 0 back to the pool. When > > it's time to migrate huge 1, we can simply reuse the now-freed huge 0 > > from the pool. As a result, when replace_free_hugepage_folios() is > > executed, it cannot release huge 0 back to the buddy system. > > > > To slove the proble above, we should prevent reuse of isolated free > > hugepages. > > s/slove/solve/ > s/proble/problem/ > > > > > Link: https://lore.kernel.org/lkml/1734503588-16254-1-git-send-email-yangge1116@126.com/ > > Fixes: 08d312ee4c0a ("mm: replace free hugepage folios after migration") > > The commit id is not stable yet. > > $ git tag --contains 08d312ee4c0a > mm-everything-2025-01-09-06-44 > next-20250110 > > > We should squash this into the original fix. Can you resend the whole > thing and merge the patch descriptions? I queued this as replace-free-hugepage-folios-after-migration-fix-3.patch. But yes, a clean v4 with a redone changelog would be a nice thing to have.