From: wujing <realwujing@qq.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Vlastimil Babka <vbabka@suse.cz>
Cc: Matthew Wilcox <willy@infradead.org>,
Lance Yang <lance.yang@linux.dev>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>,
Brendan Jackman <jackmanb@google.com>,
Johannes Weiner <hannes@cmpxchg.org>, Zi Yan <ziy@nvidia.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, Qiliang Yuan <yuanql9@chinatelecom.cn>,
wujing <realwujing@qq.com>
Subject: [PATCH v2 0/1] mm/page_alloc: dynamic min_free_kbytes adjustment
Date: Mon, 5 Jan 2026 16:17:19 +0800 [thread overview]
Message-ID: <tencent_D4B501852276CE87F53409B3B5F3C9E1AD05@qq.com> (raw)
In-Reply-To: <tencent_C5AD9528AAB1853E24A7DC98A19D700E3808@qq.com>
This is v2 of the auto-tuning patch, addressing feedback from Andrew Morton
and Matthew Wilcox.
## Responses to Andrew Morton's feedback:
> "But no attempt to reduce it again after the load spike has gone away."
v2 implements a decay mechanism: min_free_kbytes automatically reduces by 5%
every 5 minutes after being increased. However, it stops at 1.2x the initial
value rather than returning to baseline, ensuring the system "remembers"
previous pressure patterns.
> "Probably this should be selectable and tunable via a kernel boot parameter
> or a procfs tunable."
Per Matthew Wilcox's preference to avoid new tunables, v2 implements an
algorithm designed to work automatically without configuration. The parameters
(50% increase, 5% decay, 10s debounce) are chosen to be responsive yet stable.
> "Can I suggest that you engage with [the networking people]? netdev@"
Done - netdev@ is now CC'd on this v2 submission.
## Responses to Matthew Wilcox's feedback:
> "Is doubling too aggressive? Would an increase of, say, 10% or 20% be more
> appropriate?"
v2 uses a 50% increase (compromise between responsiveness and conservatism).
20% felt too slow for burst traffic scenarios based on our observations.
> "Do we have to wait for failure before increasing? Could we schedule the
> increase for when we get to within, say, 10% of the current limit?"
We considered proactive monitoring but concluded it would add overhead and
complexity. The debounce mechanism (10s) ensures we don't thrash while still
being reactive.
> "Hm, how would we do that? Automatically decay by 5%, 300 seconds after
> increasing; then schedule another decay for 300 seconds after that..."
Exactly as you suggested! v2 implements this decay chain. The only addition
is stopping at 1.2x baseline to preserve learning.
> "Ugh, please, no new tunables. Let's just implement an algorithm that works."
Agreed - v2 has zero new tunables.
## Changes in v2:
- Reduced aggressiveness: +50% increase instead of doubling
- Added debounce: Only trigger once per 10 seconds to prevent storms
- Added decay: Automatically reduce by 5% every 5 minutes
- Preserve learning: Decay stops at 1.2x initial value, not baseline
- Engaged networking community (netdev@)
Thanks for the thoughtful reviews!
wujing (1):
mm/page_alloc: auto-tune min_free_kbytes on atomic allocation failure
mm/page_alloc.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 85 insertions(+)
--
2.39.5
next prev parent reply other threads:[~2026-01-05 8:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-04 12:23 [PATCH " wujing
2026-01-04 12:26 ` [PATCH 1/1] mm/page_alloc: auto-tune min_free_kbytes on atomic allocation failure wujing
2026-01-04 18:14 ` Andrew Morton
2026-01-05 2:32 ` Matthew Wilcox
2026-01-05 6:38 ` Lance Yang
2026-01-05 7:29 ` wujing
2026-01-05 16:47 ` Michal Hocko
2026-01-05 8:17 ` wujing [this message]
2026-01-05 11:59 ` [PATCH v3 0/1] mm/page_alloc: dynamic watermark boosting wujing
[not found] ` <20260105115943.1361645-1-realwujing@qq.com>
2026-01-05 11:59 ` [PATCH v3 1/1] mm/page_alloc: auto-tune watermarks on atomic allocation failure wujing
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tencent_D4B501852276CE87F53409B3B5F3C9E1AD05@qq.com \
--to=realwujing@qq.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=jackmanb@google.com \
--cc=lance.yang@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=netdev@vger.kernel.org \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
--cc=yuanql9@chinatelecom.cn \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox