lkml.org 
[lkml]   [2023]   [Nov]   [20]   [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
>> @@ -1144,17 +1166,18 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn,
>> goto isolate_abort;
>> }
>> }
>> + }
>> - /*
>> - * folio become large since the non-locked check,
>> - * and it's on LRU.
>> - */
>> - if (unlikely(folio_test_large(folio) && !cc->alloc_contig)) {
>> - low_pfn += folio_nr_pages(folio) - 1;
>> - nr_scanned += folio_nr_pages(folio) - 1;
>> - folio_set_lru(folio);
>> - goto isolate_fail_put;
>> - }
>> + /*
>> + * Check LRU folio order under the lock
>> + */
>> + if (unlikely(skip_isolation_on_order(folio_order(folio),
>> + cc->order) &&
>> + !cc->alloc_contig)) {
>> + low_pfn += folio_nr_pages(folio) - 1;
>> + nr_scanned += folio_nr_pages(folio) - 1;
>> + folio_set_lru(folio);
>> + goto isolate_fail_put;
>> }
>
> Why was this part moved out of the 'if (lruvec != locked)' block? If we hold the lru lock, then we do not need to check again, right?

Probably I messed this up during rebase. Thank you for pointing this out.
Will fix it in the next version.

--
Best Regards,
Yan, Zi
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-11-20 15:06    [W:0.074 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site