lkml.org 
[lkml]   [2023]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v1 1/4] mm/compaction: enable compacting >0 order folios.
Date
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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-11-20 13:58    [W:0.072 / U:0.660 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site