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

SeongJae Park
2020-09-15T07:41:07Z

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>
> ---
> mm/vmscan.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 99e1796eb833..91b787fff71a 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -722,8 +722,7 @@ static inline int is_page_cache_freeable(struct page *page)
> * that isolated the page, the page cache and optional buffer
> * heads at page->private.
> */
> - 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?

Thanks,
SeongJae Park