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 B2BF01917F1 for ; Mon, 9 Mar 2026 13:33:03 +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=1773063183; cv=none; b=Eu/KjX2Seh72R81gi6bHvyBSs8ZiKxK+vj0ijlL/zjqSx0C+qTMRxD1R5x9ufCezeHc2NR6EiggisstaxakwhOYN4kbSwk31h3ws8gBbHUW/Blo6AjkLaMMp8wWX4+ucR0teqsX04Mjkxl0co41g0BMIyJxndqmSDU526qQEvwI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773063183; c=relaxed/simple; bh=yhlUUqp7GAXI5ZyQFttmUdbt0W8IKo1t9jzgxe5K584=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=slkioe1h5579IEkM/E3/kwX+uo129WKGO8Kebqzx7snk3xFT8CK4awvgSiftnW8FmhVAkvShWVOewmtJvKRXF1bPsakJYlND+Sz7jGFYGVUBUzVJzVHjEJlidonSlSdDvLHA52peQmYLP7vihb+iKmFbk4NqPsFhAsZUM7KTu/s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cAYU7+mK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cAYU7+mK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB065C4CEF7; Mon, 9 Mar 2026 13:33:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1773063183; bh=yhlUUqp7GAXI5ZyQFttmUdbt0W8IKo1t9jzgxe5K584=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cAYU7+mKpl1Bsl1LY1GvQN7el0dIJRlv7INnVOEMHGdBZ1cfqAJ9K4HVxDzjSfBI1 31x17t5Sfo7r0sxTq1/jPq+L0akRrv9d8x0YuHJEMaFWCN/ru0jbo3+Y48Y3zpX7dy bjUqdxBUDLfra6v/bCwxel1DflVLspaaDYlAl50AK3w5QVQZBBnt7Ly08o/xSdyf82 +yI1FMgyxP5hYES9MyaaaELEYfMky3aWi7v9lW7kUtGAZLfCu5SmG4a8FzSnNBTeK7 3oRVJe7qrm+ysvGvb1FQ5P5hh81MevAnierES3yWbhlPEFk6zntvHSulgvpkhcGg3E FJKu8lgxWcgvg== Date: Mon, 9 Mar 2026 13:33:00 +0000 From: "Lorenzo Stoakes (Oracle)" To: Breno Leitao Cc: Andrew Morton , David Hildenbrand , "Lorenzo Stoakes (Oracle)" , 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 , linux-mm@kvack.org, linux-kernel@vger.kernel.org, usamaarif642@gmail.com, kas@kernel.org, kernel-team@meta.com Subject: Re: [PATCH v4 4/4] mm: ratelimit min_free_kbytes adjustment messages Message-ID: <10c63265-dda8-4272-bd5e-a9744390ceac@lucifer.local> References: <20260309-thp_logs-v4-0-926b9840083e@debian.org> <20260309-thp_logs-v4-4-926b9840083e@debian.org> 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=us-ascii Content-Disposition: inline In-Reply-To: <20260309-thp_logs-v4-4-926b9840083e@debian.org> -cc old mail +cc new one :) [it'll take a while for this to propagate I know] On Mon, Mar 09, 2026 at 04:07:33AM -0700, Breno Leitao wrote: > 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 LGTM, so: 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) > > if (recommended_min > min_free_kbytes) { > if (user_min_free_kbytes >= 0) > - pr_info("raising min_free_kbytes from %d to %lu to help transparent hugepage allocations\n", > - min_free_kbytes, recommended_min); > + pr_info_ratelimited("raising min_free_kbytes from %d to %lu to help transparent hugepage allocations\n", > + min_free_kbytes, recommended_min); > > min_free_kbytes = 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 = 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 defined value %d is preferred\n", > + new_min_free_kbytes, user_min_free_kbytes); > > } > > > -- > 2.47.3 >