mm: use SWAPPINESS_ANON_ONLY in MGLRU
authorZhongkun He <hezhongkun.hzk@bytedance.com>
Mon, 21 Apr 2025 09:13:31 +0000 (17:13 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 13 May 2025 06:50:36 +0000 (23:50 -0700)
commita73dbc851cbc5aed70477cfbfbdae7ea2d3fcea4
treeee3ef3fc49853d99965e10d643b0b0e277641e50
parentb40599930f001b651cc3e1863e268dd35cbbf806
mm: use SWAPPINESS_ANON_ONLY in MGLRU

Using SWAPPINESS_ANON_ONLY instead of MAX_SWAPPINESS + 1 to indicate
reclaiming only from anonymous pages makes the code more readable and
explicit.

Add some comment in the SWAPPINESS_ANON_ONLY context.

Link: https://lkml.kernel.org/r/529db7ae6098ee712b81e4df290622e4e64ac50c.1745225696.git.hezhongkun.hzk@bytedance.com
Signed-off-by: Zhongkun He <hezhongkun.hzk@bytedance.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Yosry Ahmed <yosry.ahmed@linux.dev>
Cc: Yu Zhao <yuzhao@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmscan.c