Re: [PATCH] mm: vmscan: fix not scanning anonymous pages when detecting file refaults

From: Vovo Yang
Date: Fri Jun 28 2019 - 04:45:02 EST


On Fri, Jun 28, 2019 at 03:51:38PM +0900, Minchan Kim wrote:
> Hi Johannes,
>
> On Thu, Jun 27, 2019 at 02:41:23PM -0400, Johannes Weiner wrote:
> >
> > Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx>
> >
> > Your change makes sense - we should indeed not force cache trimming
> > only while the page cache is experiencing refaults.
> >
> > I can't say I fully understand the changelog, though. The problem of
>
> I guess the point of the patch is "actual_reclaim" paramter made divergency
> to balance file vs. anon LRU in get_scan_count. Thus, it ends up scanning
> file LRU active/inactive list at file thrashing state.
>
> So, Fixes: 2a2e48854d70 ("mm: vmscan: fix IO/refault regression in cache workingset transition")
> would make sense to me since it introduces the parameter.
>

Thanks for the review and explanation, I will update the changelog to
make it clear.

> > forcing cache trimming while there is enough page cache is older than
> > the commit you refer to. It could be argued that this commit is
> > incomplete - it could have added refault detection not just to
> > inactive:active file balancing, but also the file:anon balancing; but
> > it didn't *cause* this problem.
> >
> > Shouldn't this be
> >
> > Fixes: e9868505987a ("mm,vmscan: only evict file pages when we have plenty")
> > Fixes: 7c5bd705d8f9 ("mm: memcg: only evict file pages when we have plenty")
>
> That would affect, too but it would be trouble to have stable backport
> since we don't have refault machinery in there.