From nobody Thu Apr 9 12:54:02 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 47F2339901B for ; Mon, 9 Mar 2026 11:08:33 +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=1773054514; cv=none; b=VvSYqLWd8n8w0L/mV6MqZWY6a5AprjTKjAr5CBU3ja12M+p/Jl0s7xX56mQGi5ehyvCvNKQtGpa0kUxqebt6UsI9aAGLLxIOBgbLkkKcCbl1TFo6plkRSBtI4LrCaWU0Lz6nA7oumWByK3iSfZMYX3SraKQjNCz5CnQ1z0kC+/M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773054514; c=relaxed/simple; bh=gxJOAYW1B4QBpNiriL+Xya3ATpxserwPiuGqRjqavaM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TnQoPhqFCdI3ZmeDHWlGKyLN/E5lEmvX3cQEpOQFwyHY1Z2w3QKUglvvFPZrSF6GjyEprZp2YAwmBexGZsbnSecPxF0vAbz4SsKwcphTNHESEfp9j3wcwg/iI/mVJ/vDixM2NAbJxaYyTElHPOnssibEmlDKS1czaNL23xjfQ/Y= 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=W0AP1pLS; 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="W0AP1pLS" 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=W0AP1pLSww6cUu+rrjh4ETPJwA 7fmvpRIRwDnYQ3jD/oVEQjEIFsC0EZlkImak0GRbIiJlmpmBVR3EZ1AGgoLq/TOsMtNfLtz6fKtGy QNNcuwP8HP6taKLkawDmsztAF1QzJ0jY2Fl0jqy5NNKulgPxt9yhFYu2V9Jd6ow+DTfyl3vqdYW7I tgGs37g2JwHx1zSJ/BZuTO5SOXZr7LKsbqY2CLnyp93/0GGdW4zM8FnBog0wyWrhcpfX0fjF/d44/ HJqZjxGqOijUNpZKDvBRfPQLQectFx4V2TTDJPMuy4nqg4ncmYsOkEBGRD0+adFIzbHciOJ9HZ9lg 1meto49w==; 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 1vzYT8-002AxC-8p; Mon, 09 Mar 2026 11:08:14 +0000 From: Breno Leitao Date: Mon, 09 Mar 2026 04:07:33 -0700 Subject: [PATCH v4 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: <20260309-thp_logs-v4-4-926b9840083e@debian.org> References: <20260309-thp_logs-v4-0-926b9840083e@debian.org> In-Reply-To: <20260309-thp_logs-v4-0-926b9840083e@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/8eHdtAcsmYgBprqn/cxp7hkynlnePb5KD/sJsCZvmL33WAN9yK uvcpPlFbEaJAjMEAAEIAB0WIQSshTmm6PRnAspKQ5s1o5Of/Hh3bQUCaa6p/wAKCRA1o5Of/Hh3 bdxkD/9G1F8AwU1+LXl8P7LYZ+zg2h0RX17IxPHAYVheiq2a7IAMka1Xc1ncXPdpiXwXNLPovRv zHXUst0HCXECjf9tizl0PrN6N4If7gf7ylD2nQp0IIHrsgAOn8UDooarDGynEKYIB3ighYgtblA nJNXRDbF3YVyDubRuGCc+BTp22R+Jt2zAC7MY4KdeO/H8F6qZeCAIxjNvwTPYe3ViBMlmmist5I KCVEF5BTXGYW/1ouPDGmKHYgxd0BF7UG6IJ+EFOCCZ6fGqMdApOLNmOvzzlBx1yi3jSiKHpEG4t xJD8Vp4UMignNto/EFkgBWXHzHLhIEOnEg17W10GPm0OROlm9G2QR8WjlKuPpLfMhnZg3YviiVs l63queiiAvrMmS8PQDLLM3LkuiPb56CfRJAOP5ubnCuZ171y1oILAZLiF9KavKmlHi6dGYRI1UV ahA4OUdVtlbmIUjD4dpZ9TPC+ZggirIRF45Th546T0THBGRRRj2R8S+l4sFEjkXmwiIO1aYEXli 5jldlW+cHWAVOlNG8o5mT2NWLjam7O1b9YBJKPSEpCSFlz4Z1ii1z+XxOn03cOqANyAmyTfZgi7 wYVdgTylK/6zN1pLykNNEeNQ4I0gUpQZoKw0dEYHezMcTAwOJKmKfV75OdX2Z39OdV/aiRP5VP9 1J6bsGKQR2q+ZhQ== 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 Acked-by: David Hildenbrand (Arm) Reviewed-by: Baolin Wang Reviewed-by: Lorenzo Stoakes (Oracle) --- 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