Re: [PATCH v1 1/4] mm/compaction: enable compacting >0 order folios.

From: Matthew Wilcox
Date: Mon Nov 13 2023 - 13:30:57 EST


On Mon, Nov 13, 2023 at 12:01:54PM -0500, Zi Yan wrote:
> + /* this makes migrate_pages() split the source page and retry */
> + if (folio_order(src) > 0)
> + return NULL;

Nit: folio_test_large() is more efficient than folio_order() > 0.
The former simply tests the bit, while the second tests the bit, then
loads folio->_order to check it's >0. We know it will be, but there's
no way to tell gcc that if the bit is set, this value is definitely not 0.