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

Zi Yan
2023-11-13T19:22:39Z

[-- Attachment #1: Type: text/plain, Size: 606 bytes --]

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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 854 bytes --]