Re: [PATCH v2 1/2] mm/compaction: count pages and stop correctly during page isolation.

2020-10-30 Thread Zi Yan
On 30 Oct 2020, at 14:12, Matthew Wilcox wrote: > On Fri, Oct 30, 2020 at 11:57:15AM -0400, Zi Yan wrote: >> In isolate_migratepages_block, when cc->alloc_contig is true, we are >> able to isolate compound pages, nr_migratepages and nr_isolated did not >> count compound pages correctly, causing

Re: [PATCH v2 1/2] mm/compaction: count pages and stop correctly during page isolation.

2020-10-30 Thread Matthew Wilcox
On Fri, Oct 30, 2020 at 11:57:15AM -0400, Zi Yan wrote: > In isolate_migratepages_block, when cc->alloc_contig is true, we are > able to isolate compound pages, nr_migratepages and nr_isolated did not > count compound pages correctly, causing us to isolate more pages than we > thought. Use

[PATCH v2 1/2] mm/compaction: count pages and stop correctly during page isolation.

2020-10-30 Thread Zi Yan
From: Zi Yan In isolate_migratepages_block, when cc->alloc_contig is true, we are able to isolate compound pages, nr_migratepages and nr_isolated did not count compound pages correctly, causing us to isolate more pages than we thought. Use thp_nr_pages to count pages. Otherwise, we might be