v2
2026-09-19
消除 interleave 路径状态拷贝 · v2
用 SRCU 固定加权 interleave 权重,并直接在 pol->nodes 上遍历,去掉 fault 路径中 nodemask/权重拷贝。
原始补丁链接
子 Patch(2)
1/2
mm/mempolicy: use SRCU for the weighted interleave state
weighted interleave 改用 SRCU 原地读取全局 iw_table,替代 alloc_pages_bulk_weighted_interleave 每次拷贝;退休用 call_srcu 和 kfree_rcu,写者不阻塞 synchronize_rcu。
2/2
mm/mempolicy: stop copying the nodemask in the interleave paths
interleave 选择器不再复制 pol->nodes 到栈,改为遍历时边界检查;用 weight_total==0 检测 cpuset rebind 撕裂并回退 numa_node_id,减少每 folio fault 拷贝。