summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorGregory Price (Meta) <gourry@gourry.net>2026-10-31 22:13:37 -0400
committerVlastimil Babka (SUSE) <vbabka@kernel.org>2026-11-05 10:58:52 +0100
commit9f6674f842bbceda8326cf4e494af5ad3a5a05e6 (patch)
tree8baa362a68755f2586b06cb2e9b39dd0fcc8c696 /include/linux
parentbcfc8286f0cd5a74c827d502f9f1ad408d7eff30 (diff)
mm/hugetlb: retry the pool walk when the zonelist is rebuilt
Onlining the first block of a zone rebuilds every zonelist in place, shifting the slots after the new zone. dequeue_hugetlb_folio_nodemask() approves a slot by its node, then loads the zone from it, so a hugetlb fault bound to one node can take a pool page from another: CPU 0 CPU 1 dequeue_hugetlb_folio_nodemask(nodemask {2}) slot 3 (NORMAL2) approved online_pages() build_all_zonelists() [.., NORMAL1, NORMAL2] -> [.., MOVABLE1, NORMAL1, ...] zone = zonelist_zone(slot 3) /* NORMAL1 */ dequeue_hugetlb_folio_node_exact(h, 1) Check zonelist_update_seq before using each zone, and on the way out with nothing found, and restart the walk if it changed. Checking before the dequeue leaves nothing to put back. Reset the last-tried node on restart, so it is not skipped. With kprobes holding the walk across the online, a fault bound to node 2 took a node 1 page in 3 of 3 runs, and a node 2 page in 3 of 3 with this change. Fixes: 11cd8638c37f ("mm, page_alloc: remove stop_machine from build_all_zonelists") Cc: stable@vger.kernel.org Signed-off-by: Gregory Price (Meta) <gourry@gourry.net> Link: https://patch.msgid.link/20261101021340.2251928-10-gourry@gourry.net Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions