Re: [PATCH V2] mm: compaction: skip memory compaction when there are not enough migratable pages

From: David Hildenbrand
Date: Mon Jan 13 2025 - 05:16:44 EST


+ /*
+ * Gup-pinned pages are non-migratable. After subtracting these pages,
+ * we need to check if the remaining pages are sufficient for memory
+ * compaction.
+ */
+ if ((sum - nr_pinned) < (1 << order))
+ return false;
+

Looks reasonable to me, but let's see if other people have any comments.


Noting that Barry had some concerns as reply to v3.

--
Cheers,

David / dhildenb