Re: [PATCH v3] mm: compaction: update the cc->nr_migratepages when allocating or freeing the freepages

2024-02-19 Thread Vlastimil Babka
On 2/20/24 07:16, Baolin Wang wrote: > Currently we will use 'cc->nr_freepages >= cc->nr_migratepages' comparison > to ensure that enough freepages are isolated in isolate_freepages(), however > it just decreases the cc->nr_freepages without updating cc->nr_migratepages > in compaction_alloc(),

[PATCH v3] mm: compaction: update the cc->nr_migratepages when allocating or freeing the freepages

2024-02-19 Thread Baolin Wang
Currently we will use 'cc->nr_freepages >= cc->nr_migratepages' comparison to ensure that enough freepages are isolated in isolate_freepages(), however it just decreases the cc->nr_freepages without updating cc->nr_migratepages in compaction_alloc(), which will waste more CPU cycles and cause too