Re: [PATCH 1/2] mm: vmscan: Split proactive reclaim statistics from direct reclaim statistics
From: Hao Jia
Date: Tue Mar 18 2025 - 08:04:09 EST
On 2025/3/18 18:17, Michal Koutný wrote:
Hello.
On Tue, Mar 18, 2025 at 03:58:32PM +0800, Hao Jia <jiahao.kernel@xxxxxxxxx> wrote:
From: Hao Jia <jiahao1@xxxxxxxxxxx>
In proactive memory reclaim scenarios, it is necessary to
accurately track proactive reclaim statistics to dynamically
adjust the frequency and amount of memory being reclaimed
proactively. Currently, proactive reclaim is included in
direct reclaim statistics, which can make these
direct reclaim statistics misleading.
How silly is it to have multiple memory.reclaim writers?
Would it make sense to bind those statistics to each such a write(r)
instead of the aggregated totals?
I'm sorry, I didn't understand what your suggestion was conveying.
Are you suggesting that the statistics for {pgscan, pgsteal}_{kswapd,
direct, khugepaged} be merged into one?
In our current scenario, userspace proactive reclaimers trigger
proactive memory reclaim on different memory cgroups. Tracking
statistics related to proactive reclaim for each memory cgroup is very
helpful for dynamically adjusting the frequency and amount of memory
reclaimed for each cgroup.
Please correct me if I've misunderstood anything.
Thanks,
Hao