Yes. But one thing that is still unanswered, that I think you can
answer, is: even if the compiler *did* re-read the mt variable, what
problems could that cause? I claim "no problems", because there is
no combination of 0, _CMA, _ISOLATE, _CMA|ISOLATE that will cause
problems here.
What scenario I am concerning with __READ_ONCE so compiler
inlining get_pageblock_migratetype two times are
CPU 0 CPU 1
alloc_contig_range
is_pinnable_page start_isolate_page_range
set_pageblock_migratetype(MIGRATE_ISOLATE)
if (get_pageeblock_migratetype(page) == MIGRATE_CMA)
so it's false
undo:
set_pageblock_migratetype(MIGRATE_CMA)
if (get_pageeblock_migratetype(page) == MIGRATE_ISOLATE)
so it's false
In the end, CMA memory would be pinned by CPU 0 process
so CMA allocation keep failed until the process release the
refcount.