On 28.05.2019 18:51, Johannes Weiner wrote: > On Mon, Mar 18, 2019 at 12:27:59PM +0300, Kirill Tkhai wrote: >> @@ -1945,6 +1942,8 @@ shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec, >> count_memcg_events(lruvec_memcg(lruvec), PGSTEAL_DIRECT, >> nr_reclaimed); >> } >> + reclaim_stat->recent_rotated[0] = stat.nr_activate[0]; >> + reclaim_stat->recent_rotated[1] = stat.nr_activate[1]; > > Surely this should be +=, right? > > Otherwise we maintain essentially no history of page rotations and > that wreaks havoc on the page cache vs. swapping reclaim balance. Sure, thanks. Kirill