]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm: add max swappiness arg to lru_gen for anonymous memory only
authorZhongkun He <hezhongkun.hzk@bytedance.com>
Mon, 21 Apr 2025 09:13:30 +0000 (17:13 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 13 May 2025 06:50:36 +0000 (23:50 -0700)
commitb40599930f001b651cc3e1863e268dd35cbbf806
tree07dff05986fe8d743e40325e59a11e6157222432
parentaded729f64d3eb1543abc7e6a3a20069716efb7d
mm: add max swappiness arg to lru_gen for anonymous memory only

The MGLRU already supports reclaiming only from anonymous memory via the
/sys/kernel/debug/lru_gen interface.  Now, memory.reclaim also supports
the swappiness=max parameter to enable reclaiming solely from anonymous
memory.  To unify the semantics of proactive reclaiming from anonymous
folios, the max parameter is introduced.

[hezhongkun.hzk@bytedance.com: use strcmp instead of strncmp, if swappiness is not set, use the default value]
Link: https://lkml.kernel.org/r/20250507071057.3184240-1-hezhongkun.hzk@bytedance.com
[akpm@linux-foundation.org: tweak coding style]
Link: https://lkml.kernel.org/r/65181f7745d657d664d833c26d8a94cae40538b9.1745225696.git.hezhongkun.hzk@bytedance.com
Signed-off-by: Zhongkun He <hezhongkun.hzk@bytedance.com>
Acked-by: Muchun Song <muchun.song@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Yosry Ahmed <yosry.ahmed@linux.dev>
Cc: Yu Zhao <yuzhao@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Documentation/admin-guide/mm/multigen_lru.rst
mm/vmscan.c