From nobody Sat Apr 11 08:55:19 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 2C9F41531C1 for ; Sat, 7 Mar 2026 16:08:57 +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=1772899738; cv=none; b=YOXrhPXh0KZXrye916ecw5FHR0zmgUQ45BI6CuanW7+BU23zNDbR26cdCZM5xfpAbK50WDtEyx/BPy/GFtCs5hX1wPDnkIIiLjsJCf1xRAfVvLpZiPzdKfe8WPY0S72owXjVjpPC/Xa4S8XRfp9Ti6P9FUJbvVLvqiqbNJ5bSJ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772899738; c=relaxed/simple; bh=gxJOAYW1B4QBpNiriL+Xya3ATpxserwPiuGqRjqavaM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TBpFsHvhU22Kmi2svrqD/0V/jPpHrTnP6GQrT1IUbjIOO3pN6DM2xnJFtWGCf9bWTWyUwK1Mz2XGu8em1RzucqIMkW4y/YOfcRGuRcqpdgCxwTf/K20WiOw87ThxswJ5sJVWKrtRKaTnJUDNSuLuEqynRiw+9xDZ4c65v6W0WD8= 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=vLA57anC; 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="vLA57anC" 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=wMsK7bM5B63ETngSFYeak+wzJyKrL8AAUXzgpqkd3S8=; b=vLA57anCPTfZr3sKp6F/baWHvv UC8qxxbtwcpSbW2dIyqgABteJ42mbwZq20K7uOdmbaEsqEG0UPEdndunEGCAKfzzc/uuZn2xlPR/w 5FaCcRdUr+XmJF1YFsXfcfr7zOCzDiGEGkWn1vS+DgP5QqyWzujBNv8cZyY0BBdPvxDFS81Kd25fw C3o12YPxGWW+we/xYV/8tD3hKR9uWaMSaE0/Aze6r+xZkXrcnvOKIEPg9Wb3cIfXQl50trHNpxiQh Dj8No0gKpNLBCt2z9GyJxf7TDwa2oJ4jWP/uHC991mJGvi7EGsdSChDKQyWPtNMU/VVudBEPgXtSb uruz+YDw==; 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 1vyuD1-000nKY-3F; Sat, 07 Mar 2026 16:08:55 +0000 From: Breno Leitao Date: Sat, 07 Mar 2026 08:08:08 -0800 Subject: [PATCH v3 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: <20260307-thp_logs-v3-4-a45d2c8f3685@debian.org> References: <20260307-thp_logs-v3-0-a45d2c8f3685@debian.org> In-Reply-To: <20260307-thp_logs-v3-0-a45d2c8f3685@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, Breno Leitao X-Mailer: b4 0.15-dev-363b9 X-Developer-Signature: v=1; a=openpgp-sha256; l=1843; i=leitao@debian.org; h=from:subject:message-id; bh=gxJOAYW1B4QBpNiriL+Xya3ATpxserwPiuGqRjqavaM=; b=owEBbQKS/ZANAwAIATWjk5/8eHdtAcsmYgBprE146M/jYBIhqmoonwG80+PQZnFGxW0TpZfU5 7lPztdMst2JAjMEAAEIAB0WIQSshTmm6PRnAspKQ5s1o5Of/Hh3bQUCaaxNeAAKCRA1o5Of/Hh3 bWFdD/4muGHfgN3wEPB53oBk6T1XmgcYkTs113p09NYp6EbEkvPg848y/LKpsID16FKtBpcN/yl yXRE+EAEkew22gpyYrrNTns/e97pk2IDSlwvxNfqspVAyjRumZTirq8VRY6Z1EDr9ESiiJ59OaS cNJjYp6vaoZ6Czi6t44GkZVXZVXYIbOa68SSVThtLQ/FHZB4rWdooHHiBw43GtI4jyQNMqUGmNU PWnlmBXy0yUPwTGxdQG6uN5i72AuKnUr3+MrWjYhfx8/ru9NRmma2Jz+5FuLIDvTTD06RUd/RvE BAqPsV2M7LtZKOlbUUM9a90zBhJhQgYBtbPiUxyU2hDjwGCZwDJTBaRDjq6QqMkcQiougXXHkmd 23hfObnpY68ckXphaNlzCEMTbd3GXNeQ1Jt5VmmeLCCHswD8KCj3Sun2iYHnGzTDl3KAD03tAH3 etNUHV7aGSqmJxrcGn9nGM3132zJOECmXKH9GIxHeRTb2OjNW/VpiUC/ZivbsQ16zqQfw4RRdG+ 6CdbnHFG4/+Zouyf1i4G4CJqvVSURmYk31tfpiN2xiva8GYBcprtUyUaifyHGN7hA+KyfURpWDk EH+DfWrjQ6OypnUnUnpK9C8Jj4cHUhNHt5EIPEY8NtzNawYNTCBknbxrQVc0fn6WGA5NclJK+QM JodNgpZytCZSvaQ== 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. 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.47.3