Re: [PATCH 11/11] mm/vmscan: Allow arbitrary sized pages to be paged out

SeongJae Park
2020-09-16T06:10:16Z

On Wed, 16 Sep 2020 09:40:10 +0800 "Huang\, Ying" <ying.huang@intel.com> wrote:

> Matthew Wilcox <willy@infradead.org> writes:
>
> > On Tue, Sep 15, 2020 at 09:40:45AM +0200, SeongJae Park wrote:
> >> On Tue, 8 Sep 2020 20:55:38 +0100 "Matthew Wilcox (Oracle)" <willy@infradead.org> wrote:
> >> > Remove the assumption that a compound page has HPAGE_PMD_NR pins from
> >> > the page cache.
> >> >
> >> > Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> >> > Cc: Huang Ying <ying.huang@intel.com>
> >
> >> > - int page_cache_pins = PageTransHuge(page) && PageSwapCache(page) ?
> >> > - HPAGE_PMD_NR : 1;
> >> > + int page_cache_pins = thp_nr_pages(page);
> >>
> >> Is it ok to remove the PageSwapCache() check?
> >
> > I think so? My understanding is that it was added in commit bd4c82c22c36
> > to catch shmem pages, but there was really no reason to only do this for
> > shmem pages.
>
> The original implementation is to write out Anonymous THP (not shmem).
> The code should work after the changing, because now any THP except
> normal Anonymous THP in swap cache will be split during reclaiming
> already.

Thanks for the kind explanation :)

>
> Acked-by: "Huang, Ying" <ying.huang@intel.com>

Reviewed-by: SeongJae Park <sjpark@amazon.de>

Thanks,
SeongJae Park