Re: [RFC][PATCH 7/9] mm/vmscan: Consider anonymous pages without swap

From: Yang Shi
Date: Thu Oct 29 2020 - 11:57:48 EST


On Thu, Oct 29, 2020 at 7:33 AM Dave Hansen <dave.hansen@xxxxxxxxx> wrote:
>
> On 10/29/20 1:14 AM, Oscar Salvador wrote:
> > With this patch, we will use always the atomic version
> > get_nr_swap_pages from now on. Is that ok? I guess so, but it might
> > warrant a mention in the changelog?
>
> I _think_ it's OK. But, you're right that it's a potential behavior
> change that's not mentioned in the changelog.
>
> I'll mention it in the changelog and see if I can dream up any other
> practical implications from this change.

IMHO, we don't have to modify those two places at all. They are used
to rebalance the anon lru active/inactive ratio even if we did not try
to evict anon pages at all, so "total_swap_pages" is used instead of
checking swappiness and available swap space.

The changes may result in imbalanced anon lru.

>
> Thanks for taking a look!
>