On Wed, Nov 27, 2024 at 04:07:01PM +0100, David Hildenbrand wrote: > I think we discussed in v1 or v2 that page isolation should be taught about that. > > Likely we want something like: > > diff --git a/mm/page_isolation.c b/mm/page_isolation.c > index 7e04047977cfe..7db2f79b39f0d 100644 > --- a/mm/page_isolation.c > +++ b/mm/page_isolation.c > @@ -101,6 +101,8 @@ static struct page *has_unmovable_pages(unsigned long start_pfn, unsigned long e > * because their page->_refcount is zero at all time. > */ > if (!page_ref_count(page)) { > + if (PageSlab(page)) > + return page; > if (PageBuddy(page)) > pfn += (1 << buddy_order(page)) - 1; Ah, for order 0 slabs! I got caught up thinking that slabs would be caught by the earlier PageTransCompound() check. But that's also a bit messy since we know that __folio_test_movable() can sometimes appear true on slab pages. So I'm tempted to hoist this way up to between the check for ZONE_MOVABLE and PageHuge.