From nobody Wed Apr 8 04:46:31 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 8F6903A3E8E for ; Tue, 10 Mar 2026 17:58:18 +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=1773165504; cv=none; b=M6CWuW62jxkJpRx965jvfuv+xTJqoJ+mz8oAgwdnLdZvQU+377BnnL52kbI2MfZWtCA1oka2rTt6QSCKAIieUKbVSEjh+kuJ7mbMvJPpJjoJ49OHXqiQQm6W/1Xys954QdsXJG26CBYsKeY/Bik0KZZ5q7lcyhPSw7cK/p3EoXc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773165504; c=relaxed/simple; bh=oMoTCYuZFb1fOm1lw/KHx/Ut4gfjGFHilENByzx/t8Q=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GbHSwdtxhb9uzYogU9lw10pQ3GUL1TeI47b7CErzdkFx/sD9IfxIq9wacZ2XcjzHaBXUCP5J2ZJEFMKRxJhllCjFmewSKwqBxVMvgplacVPJsh+3rrb5DJlI9tglZwyZauBbeQ1dfIgsjOmXqzWk97awzsJWDV0DosnFMLP/k1w= 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=HwiXYvpW; 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="HwiXYvpW" 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=L+KNhzYEf7Z4qnoEfyB0FBqnVQ+fhLYoQUFp4aL3UqE=; b=HwiXYvpWdxpdbwI5HJ9b11pre4 +NDoDJOm53K24FNAinCfnf2gIk+eMe/Wy/ou3POGGIooEU7pxvdaTlCrksgaFjrupNYeeckABfa3Z B3FeTwEVy5ntcZW4SGCJAsAFUw1fyfJO4URWOXbPSiG0LyDF3MICokXdXhpccQJNu9WMlcyaSfkwH yDKssVbXjNHFBagSXd5xXoeB+4UG1U/iyE1XSl3cmj0iOx4WcRB5o/oEHZnVXGvYpvVhc1ALllxSW u3YLbjVAklqutdA0Xsq1GHIRO8jTrpyVjWyZmnVWySL04DOz/knNhZXXrtsOcfZjIiJcVunZ0jOFY /5dKr4iQ==; 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 1w01LF-003AZV-4G; Tue, 10 Mar 2026 17:58:01 +0000 From: Breno Leitao Date: Tue, 10 Mar 2026 10:57:07 -0700 Subject: [PATCH v5 1/4] mm: khugepaged: export set_recommended_min_free_kbytes() 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: <20260310-thp_logs-v5-1-686099175bf6@debian.org> References: <20260310-thp_logs-v5-0-686099175bf6@debian.org> In-Reply-To: <20260310-thp_logs-v5-0-686099175bf6@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=1360; i=leitao@debian.org; h=from:subject:message-id; bh=oMoTCYuZFb1fOm1lw/KHx/Ut4gfjGFHilENByzx/t8Q=; b=owEBbQKS/ZANAwAIATWjk5/8eHdtAcsmYgBpsFubfa0/+t5o1gsfjniqKSZmIl1lGskKQPYKo rsp8i2E69WJAjMEAAEIAB0WIQSshTmm6PRnAspKQ5s1o5Of/Hh3bQUCabBbmwAKCRA1o5Of/Hh3 bS2sD/9DQ4RPUfDCgzs0t0hPuxsUFuVQapY+aiPHNBci/XBsV53TnhPvX9ZBN2Uu6hmQujs7syl 9P6PshEqr9nF/c9+bRe3OlcN4P1MVTvi6sOg2JNiEIpQCyggAqnJa8VAEcgEA+ozTSk8hRxskuD 2dFFIMTQx8sVIrwwWlIZ9MhvAr/1Q7L0qgha72EwglARazkuGpjqCoKRrFZ7+IEofM3Mzyd87KP E6fbdoKm41IkJjZHZd0qsbmWNyoh3shI9OtPgZq+JqwhRGT2Hy5f0sdY831EOIZSSSmg4BjjwPB E6fXqZ13B5QM4gTURNLSaqccEfMVYpX3lABxLLaYKDVQMTVP9IYjTL+oDudvhK6evJgIuBDfXsV wYQEViNHFd9ZNbqz0qi84tpQG4uXD8h/1g0qoHx+gcLpHeV9M4b72nVFV3SjjFsjwVB3ODJ7/1B at1ffDTThmtSc3Q1p5EyoeHz6ZFUXLU/bVMDnQzc7VnEXBqLd5Fvte0hudP5vJnybS7cJrDlKl6 G2YdYBBkdMyItjvBX5tFXqXK1UKJGzWHwEp2Gi3zbsO9rUoYoRUoy2+LXtvwVaqfiUG5QheHX2S fXy3AAQRJCypzxmgerTnxg18m3cLiK3gtzR6GKPo6VGG7H7mLWaqlHoheIR2G3vUS06lQY0hDTl Wvre2iBFY9NiCmA== X-Developer-Key: i=leitao@debian.org; a=openpgp; fpr=AC8539A6E8F46702CA4A439B35A3939FFC78776D X-Debian-User: leitao Make set_recommended_min_free_kbytes() callable from outside khugepaged.c by removing the static qualifier and adding a declaration in mm/internal.h. This allows callers that change THP settings to recalculate watermarks without going through start_stop_khugepaged(). Suggested-by: Lorenzo Stoakes (Oracle) Reviewed-by: Lorenzo Stoakes (Oracle) Acked-by: David Hildenbrand (Arm) Signed-off-by: Breno Leitao Reviewed-by: Zi Yan --- mm/internal.h | 5 +++++ mm/khugepaged.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mm/internal.h b/mm/internal.h index cb0af847d7d99..7bd768e367793 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -623,6 +623,11 @@ int user_proactive_reclaim(char *buf, */ pmd_t *mm_find_pmd(struct mm_struct *mm, unsigned long address); =20 +/* + * in mm/khugepaged.c + */ +void set_recommended_min_free_kbytes(void); + /* * in mm/page_alloc.c */ diff --git a/mm/khugepaged.c b/mm/khugepaged.c index 1dd3cfca610db..56a41c21b44c9 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -2630,7 +2630,7 @@ static int khugepaged(void *none) return 0; } =20 -static void set_recommended_min_free_kbytes(void) +void set_recommended_min_free_kbytes(void) { struct zone *zone; int nr_zones =3D 0; --=20 2.52.0