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

From: Zi Yan
Date: Mon Nov 13 2023 - 14:22:39 EST


On 13 Nov 2023, at 13:30, Matthew Wilcox wrote:

> 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.

Got it. Make sense. Will change it in next version. Thanks.

--
Best Regards,
Yan, Zi

Attachment: signature.asc
Description: OpenPGP digital signature