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

Oscar Salvador
2020-10-29T08:15:10Z

On Wed, Oct 07, 2020 at 09:17:49AM -0700, Dave Hansen wrote:
>
> From: Keith Busch <kbusch@kernel.org>
>
> Age and reclaim anonymous pages if a migration path is available. The
> node has other recourses for inactive anonymous pages beyond swap,
>
> #Signed-off-by: Keith Busch <keith.busch@intel.com>
> Cc: Keith Busch <kbusch@kernel.org>
> [vishal: fixup the migration->demotion rename]
> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Yang Shi <yang.shi@linux.alibaba.com>
> Cc: David Rientjes <rientjes@google.com>
> Cc: Huang Ying <ying.huang@intel.com>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: David Hildenbrand <david@redhat.com>

I have a question regarding this one.

It seems that we do have places where we read total_swap_pages directly and other
places where we use get_nr_swap_pages.
One seems to give the total number of swap pages, while the other gives
the number of free swap pages.

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?

E.g: age_active_anon seems to base one of its decisions on whether we have
swap (it seems it does not care if swap space is available).

--
Oscar Salvador
SUSE L3