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

Matthew Wilcox
2020-09-15T12:52:23Z

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.