Re: [PATCH] mm: vmscan : pgdemote vmstat is not getting updated when MGLRU is enabled.

Li Zhijian
2025-01-11T02:10:14Z

Great minds think alike, It's excatly same with mine[0] :)

There is another bug[1] as well.

[0] https://lore.kernel.org/linux-mm/20250110122133.423481-2-lizhijian@fujitsu.com/

[1] https://lore.kernel.org/linux-mm/20250110122133.423481-1-lizhijian@fujitsu.com/

Feel free to add vvv if your patch is accepted at last.

Tested-by: Li Zhijian <lizhijian@fujitsu.com>

Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>

> ---
> mm/vmscan.c <https://lore.kernel.org/lkml/20250109060540.451261-1-donettom@linux.ibm.com/#Z31mm:vmscan.c> | 3 +++
> 1 filechanged <https://lore.kernel.org/lkml/20250109060540.451261-1-donettom@linux.ibm.com/#related>, 3 insertions(+)
> diff <https://lore.kernel.org/lkml/20250109060540.451261-1-donettom@linux.ibm.com/#iZ31mm:vmscan.c> --git a/mm/vmscan.c b/mm/vmscan.c index 9a859b7d18d7..b1ec5ece067e 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -4642,6 +4642,9 @@ static int evict_folios(struct lruvec *lruvec, struct scan_control *sc, int swap reset_batch_size(walk);
> }
> + __mod_lruvec_state(lruvec, PGDEMOTE_KSWAPD + reclaimer_offset(), + stat.nr_demoted); + item = PGSTEAL_KSWAPD + reclaimer_offset();
> if (!cgroup_reclaim(sc))
> __count_vm_events(item, reclaimed);
> --