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 01103226CEB for ; Sun, 28 Dec 2025 21:44:55 +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=1766958296; cv=none; b=akrZui7KTpBGf3zXm9mjfTtGznPJyhPiuX9pGQYU97fS6O0IEEdW1qrhrVuTrt6bJrShi7sbn6McvTYveZEy097GlVi8xf5lUNLXLuUNe4wh8l1VNAtO1x1Yf2ONTQim/PiZEmijmDnbqJIMTQTN9l2/3pbxg7vBwzQY9nhiZFI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766958296; c=relaxed/simple; bh=e67iq+2uXCVlGPGtPOqLPN1L9vPHUvzEDKlvyVreJyE=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=c/S3tiz7ShLHJWglXo5gB0oB+4S+12OSPNpNoJjlwKpoBuRvhrFEPpSbrg5CTERcyCMvCVeYeMIXLPrKeSXGYvClBRoHiBR1W4flUOGjUFCPqNRgim0LTP4xpUMaETQj5y0GMjRc5bHrliLEEHr0JCr0GcUv7ej/bpn1fDNqvvw= 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=RbLb3us1; 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="RbLb3us1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7BAD4C4CEFB; Sun, 28 Dec 2025 21:44:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1766958295; bh=e67iq+2uXCVlGPGtPOqLPN1L9vPHUvzEDKlvyVreJyE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RbLb3us1ZyOjJ0CP+Z/fauHY/A+rUNDs6T9GG4UJLDJMw9kfEbLSjhb/1Oh3/8i+J FaCIe39c2PkI0FI5GXpxVFQGYSpkBPkro8hZbitrymAJjuqndW5p6bcxJ1lUCdc2SX zWHPemSO5B2MGtl/BJ0HXd8GMgL6YTyQRYqjp9pk= Date: Sun, 28 Dec 2025 13:44:54 -0800 From: Andrew Morton To: =?UTF-8?B?5p2O5ZaG?= Cc: , , , , , , Ankur Arora Subject: Re: [PATCH 0/8] Introduce a huge-page pre-zeroing mechanism Message-Id: <20251228134454.89617c004a6625556f7ca9f3@linux-foundation.org> In-Reply-To: <20251225082059.1632-1-lizhe.67@bytedance.com> References: <20251225082059.1632-1-lizhe.67@bytedance.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=UTF-8 Content-Transfer-Encoding: 8bit On Thu, 25 Dec 2025 16:20:51 +0800 李喆 wrote: > This patchset is based on this commit[1]("mm/hugetlb: optionally > pre-zero hugetlb pages"). > > Fresh hugetlb pages are zeroed out when they are faulted in, > just like with all other page types. This can take up a good > amount of time for larger page sizes (e.g. around 40 > milliseconds for a 1G page on a recent AMD-based system). > > This normally isn't a problem, since hugetlb pages are typically > mapped by the application for a long time, and the initial > delay when touching them isn't much of an issue. > > However, there are some use cases where a large number of hugetlb > pages are touched when an application (such as a VM backed by these > pages) starts. For 256 1G pages and 40ms per page, this would take > 10 seconds, a noticeable delay. Ankur's contiguous page clearing work (https://lkml.kernel.org/r/20251215204922.475324-1-ankur.a.arora@oracle.com) will hopefully result in significant changes to the timing observations in your changelogs?