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

Huang, Ying
2020-09-16T01:40:16Z

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.

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

Best Regards,
Huang, Ying