So then:set_pfnblock_flags_mask would be better?
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 0e42038382c1..b404f87e2682 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -482,7 +482,12 @@ unsigned long __get_pfnblock_flags_mask(const struct page *page,
word_bitidx = bitidx / BITS_PER_LONG;
bitidx &= (BITS_PER_LONG-1);
- word = bitmap[word_bitidx];
+ /*
+ * This races, without locks, with set_pageblock_migratetype(). Ensure
+ * a consistent (non-tearing) read of the memory array, so that results,
Thanks for proceeding and suggestion, John.
IIUC, the load tearing wouldn't be an issue since [1] fixed the issue.
The concern in our dicussion was aggressive compiler(e.g., LTO) or code refactoring
to make the code inline in *future* could potentially cause forcing refetching(i.e.,
re-read) tie bitmap[word_bitidx].
If so, shouldn't the comment be the one you helped before?