From nobody Mon Apr 6 23:36:05 2026 Received: from stravinsky.debian.org (stravinsky.debian.org [82.195.75.108]) (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 421CD2FFDCC for ; Tue, 17 Mar 2026 16:10:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.195.75.108 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773763855; cv=none; b=d7tPxma9mDxi78a+tgxL0V87az34GsfpyhJLokBJoQLQVWD9eFKUJaLkM+2sZhCfpWueh+M57hbfK/uaQuA2kWFD10hZ86HuBQ/zZJ0rV7mbPRxngGUhi/LdvDmiU27axVm/af8Q/Y6N+nquDGJNZrcAXhDKHki8UineSGjod38= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773763855; c=relaxed/simple; bh=ve+lNwoqDQSYspSHS5OWSYYUOfQw+Gl9hm3vxR11Gs4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HUi+ovHe1Jy2ln06kWy7+Aur2/npgetjEYzaRf+dxZ2/tOoc0L3rmIILo40gZ+STiRleRFVj1AOcM1/o3qFhWGnYoTeFZPcsXUv57+MB1CU/FpPFZGcozXzHQrSzmQwnyY/8CE9SbpAvBAlZzkybcrmcX5Ds+OHsx3ze/JxM/0A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org; spf=none smtp.mailfrom=debian.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b=b5eay61N; arc=none smtp.client-ip=82.195.75.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=debian.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b="b5eay61N" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description; bh=Nzuz22HJlpi5hM3GMMNGDuF/FPshFhM/ibIt8PNUdHM=; b=b5eay61NUmMmAob36DsZbL+iTZ 1yKb/qHzVdFH4UP8cL02l++bSWo35OlEvu4H26fErlyaH6lrNIVdK7ypxj4rNCPgAA2WL0TqPXWsk QJxtwgId2C8tDRmn6CgQibs4FsggS+yo6VJ1tHZqy4Dub73T4wy7rlbhnKHaOAU8iqD7IxPD5IIx9 wTSSf8ZDoFOzkLn3zlU9+YwrdwBBvCA+zarShmQ8YWxuPj2lxlnzWz3W3a7HRTrC8GWK6JkQyUybB hJkxMvsLJT79+2WND/bvgvgU2cHwlCKceiCGiJcPZM9PiwkJFQbIU/cxW2lUHNzpSrEmcmTPo+/V2 PIcTzANw==; Received: from authenticated user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2) (envelope-from ) id 1w2X0M-0030DI-MU; Tue, 17 Mar 2026 16:10:49 +0000 From: Breno Leitao Date: Tue, 17 Mar 2026 08:33:59 -0700 Subject: [PATCH v7 4/4] mm: ratelimit min_free_kbytes adjustment messages 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: quoted-printable Message-Id: <20260317-thp_logs-v7-4-31eb98fa5a8b@debian.org> References: <20260317-thp_logs-v7-0-31eb98fa5a8b@debian.org> In-Reply-To: <20260317-thp_logs-v7-0-31eb98fa5a8b@debian.org> To: Andrew Morton , David Hildenbrand , Lorenzo Stoakes , Zi Yan , Baolin Wang , "Liam R. Howlett" , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Lance Yang , Vlastimil Babka , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , Mike Rapoport Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, usamaarif642@gmail.com, kas@kernel.org, kernel-team@meta.com, "Lorenzo Stoakes (Oracle)" , Breno Leitao X-Mailer: b4 0.15-dev-363b9 X-Developer-Signature: v=1; a=openpgp-sha256; l=2046; i=leitao@debian.org; h=from:subject:message-id; bh=ve+lNwoqDQSYspSHS5OWSYYUOfQw+Gl9hm3vxR11Gs4=; b=owEBbQKS/ZANAwAIATWjk5/8eHdtAcsmYgBpuXzroH5aB8XBfzM5dWLCNGjcXcgYnmHfGDSMH 3PTPikV4bqJAjMEAAEIAB0WIQSshTmm6PRnAspKQ5s1o5Of/Hh3bQUCabl86wAKCRA1o5Of/Hh3 bQ7ZD/9ZwqiZ3XSJ7Pw+NydgDOfCXjfOGMORk3H+U3xVFmlgowPcozGIvatUbinks9si7c8WJWd +Ucth2ssTs+9xbhK0mR8ybsc5Cy6309+JNiqm74LBDfFIfGZ0lipVIAkR2Gajs2tswPyvBPx3YJ SMMVHwqVLki6JZgomnsspKgCBQY5sOYwZ1BdAy3Dw8XLKM1cmlexbenH2SdieiWw7WDzfJrUTrI kRA5AySY9vKUoM8uCDaiRIIInwKQiP3y4cI/+1UXkQ4IUPaZ7IrkfZoxBXfn/uEwarpdEN2mRbE 9CahN7R3+gcQNIEbK5ln0njHGVK1AYqTsTvae7DJTktWX3VI6asrUOzsZXt455bsQvCc671tIZV 23OFigoFASibsguFSG0JJHDPnYuuBbKKr/j6XskJd4hr0yo4UzzLHPq/zNmLQ7j8mXifLt0zR1k vej9TWsFiEtCvBMFAwOYZgDaejpckfZEpw/hpeg6EItdNOLol1sIdAz/5GZG7yfKeROiKonmec6 qC9GTp4zKPgcLYKTFO0JI8eG7BAuKih7eSGMOpubX2KZ59+WGSmRVI1CZgC/veHdbwi54D5lnT5 aPhd/YUVvMcwkM47s6POfyWO5k0SrsALvDtOXb0d9z3D4c9zq7SRDRYI2CWq84K52rAZGMB7Bt+ Jy1k4o/zDV3pEzg== X-Developer-Key: i=leitao@debian.org; a=openpgp; fpr=AC8539A6E8F46702CA4A439B35A3939FFC78776D X-Debian-User: leitao The "raising min_free_kbytes" pr_info message in set_recommended_min_free_kbytes() and the "min_free_kbytes is not updated to" pr_warn in calculate_min_free_kbytes() can spam the kernel log when called repeatedly. Switch the pr_info in set_recommended_min_free_kbytes() and the pr_warn in calculate_min_free_kbytes() to their _ratelimited variants to prevent the log spam for this message. Reviewed-by: Lorenzo Stoakes (Oracle) Acked-by: David Hildenbrand (Arm) Reviewed-by: Baolin Wang Acked-by: Zi Yan Signed-off-by: Breno Leitao --- mm/khugepaged.c | 4 ++-- mm/page_alloc.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mm/khugepaged.c b/mm/khugepaged.c index 56a41c21b44c9..d44d463ccfd3e 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -2671,8 +2671,8 @@ void set_recommended_min_free_kbytes(void) =20 if (recommended_min > min_free_kbytes) { if (user_min_free_kbytes >=3D 0) - pr_info("raising min_free_kbytes from %d to %lu to help transparent hug= epage allocations\n", - min_free_kbytes, recommended_min); + pr_info_ratelimited("raising min_free_kbytes from %d to %lu to help tra= nsparent hugepage allocations\n", + min_free_kbytes, recommended_min); =20 min_free_kbytes =3D recommended_min; } diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 2d4b6f1a554ed..c840c886807bf 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -6553,8 +6553,8 @@ void calculate_min_free_kbytes(void) if (new_min_free_kbytes > user_min_free_kbytes) min_free_kbytes =3D clamp(new_min_free_kbytes, 128, 262144); else - pr_warn("min_free_kbytes is not updated to %d because user defined value= %d is preferred\n", - new_min_free_kbytes, user_min_free_kbytes); + pr_warn_ratelimited("min_free_kbytes is not updated to %d because user d= efined value %d is preferred\n", + new_min_free_kbytes, user_min_free_kbytes); =20 } =20 --=20 2.52.0