v1
2026-08-31
消除 interleave 路径状态拷贝 · v1
消除interleave路径的nodemask和权重拷贝:权重用SRCU固定,nodemask直接操作并检查边界。
原始补丁链接
子 Patch(2)
1/2
mm/mempolicy: use SRCU for the weighted interleave state
alloc_pages_bulk_weighted_interleave() copies iw_table into a scratch array on every call so it can walk the weights outside of RCU. The copy exists only because the loop may sleep in the page alloca
2/2
mm/mempolicy: stop copying the nodemask in the interleave paths
The interleave node selectors copy pol->nodes onto the stack so the mask cannot change while they walk it. nodemask_t is 128 bytes at MAX_NUMNODES=1024, and two of the three run per folio fault. The