From nobody Tue Apr 7 23:42:41 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 196F23CAE85 for ; Wed, 11 Mar 2026 10:19:49 +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=1773224391; cv=none; b=o5vJuKQ0MLhU8Exd3i2SXuPUx1I5UClwLwwo9cw6N2qaLlVUUIQXbPS5XbuVw4iSaEuUgy9gRBHTJyQLx3Pv4YZvETctknakfbmQMDeaYJRiC7YmhwMNG8JEP0zQrwQe5ayxt/whMTKuU0oENjeNDhBTYlc0Ox9JieSFar2EXqk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773224391; c=relaxed/simple; bh=ve+lNwoqDQSYspSHS5OWSYYUOfQw+Gl9hm3vxR11Gs4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gi1q4RAzPCWZ2NGACliZwIROexKk4kZ2iDzXsc9fefbP59UR1cIWHA3IbzJCRojuEf4pVKZh3VxLDP9A0gV3/ik6B1DxRT5zqYpBOH6EnlqCt8OKb1geuLGAA5xQ/R/Le/NpBoyIKPBfEGWH3P9wtJm2x6sELATao9qQ3+9huoY= 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=nLqrnyWI; 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="nLqrnyWI" 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=nLqrnyWIY5Gt6JYWgBUsYihjFY hdw0cy8bACMvdua+Tql1P+JXMhjamBK/aK3XFYH0byntLap0XWuz1jffXbzyRihdcGDtbNtJUsNTe lDVeTwAjbToRt7JqZCMNYWVrA468Cf5SRcyeqggASKhXpf7aifctdclJr+b5gHWmBmy/wnkRoUXsM 1vjxDbG4TwpAS56tgzteOULaP0JPSmIn2Yu1WY1eQSdtBAZhWimUJa5mfJT/85lGIuZVNOFoe3IKI NUjlZn+xIzuHX4EHq33htHk6qwRSgWHLIzMO3/F7SAxz4EBBqhNzk59ngFGVWcv+ksSH5xG14cglo xsyDuoMA==; 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 1w0Gf8-003hL0-Kk; Wed, 11 Mar 2026 10:19:34 +0000 From: Breno Leitao Date: Wed, 11 Mar 2026 03:17:50 -0700 Subject: [PATCH v6 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: <20260311-thp_logs-v6-4-421e30d881e0@debian.org> References: <20260311-thp_logs-v6-0-421e30d881e0@debian.org> In-Reply-To: <20260311-thp_logs-v6-0-421e30d881e0@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/8eHdtAcsmYgBpsUGZ9Y4BNiKt+ejJ6EMTJmA/lbLn4yECsyMFI LTlvTztlpaJAjMEAAEIAB0WIQSshTmm6PRnAspKQ5s1o5Of/Hh3bQUCabFBmQAKCRA1o5Of/Hh3 bYzMD/0akGeFFa5euLxXr0SCDjKxo8ulEvSsFBx2OMOnL6EQo2KXe5BgztyMFjVLE8HjzwDUGTj dp9feCbl0fs+3m5ZEkzje96BhZi7PT3qiPM7HUgd8vPXPUQLk0TD4q+RBW1XWBsaMBmsliMkOlP xISpP3b4fczP318KfRxlAjMDelhLNrZogrVL5xpepce4tFRoD+XOpOH5hCdL7gm0muNqH+riHdX OTjW9kaM62YDgGttxZKYuXs20ejLt/0Xg54LndX2j8ZGQnZ3zSaE7bAziO4v3KN1ulWDwj2Wi/z qZAVXm9kRrK7iu0LI4GUXK5YxdwI4P36HtZ2410v9YBcM/jUsOMjcYwXiIDHykjA49odpJ/v61m j7TC7VPeMkYjA0k+4e/QAJ5RlBUcifKoXIAyTTTRcymsjYRgDr7Uuuj9hQSwAtdcN25ULfl2WQY 82CLgV0aWtfIfU+HSghYt0Mp8uO5YOyyaiOXUT1/pSG24r8atmuaSDqeRQwSFE+3F5E3t7hOuOd qfFRzmzMug6pDB1cejHUOa95cjWl8K8JvQqC4Lxm9eg/SYSwciQB1DMg2vzBk5WUb29c7MzDZ7o yYLOGBySG8m4qu3QjBrdeEKT0HUOGwRZRiFtZsq0wXXUnPYIqQ6UDF8E1CbKceERo3s98bV6O/B nBp0pW3oRj5sMTQ== 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