diff options
| author | Andrew Morton <akpm@linux-foundation.org> | 2026-10-30 12:10:46 -0400 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-11-09 22:44:27 -0800 |
| commit | d7e3ce464470d0ff90b4a0ac87df9b3b7d8258da (patch) | |
| tree | 129bfd42d683a5615e8c42f871cefcd33659e057 /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | 9378306c5d3db7e733d60a8b85a22b2b143ecffd (diff) | |
mm/mempolicy: use one node set for interleave weights
Switching weighted interleave back to automatic mode while memory is being
onlined can cause a kernel divide error on x86, and a panic if
panic_on_oops is set.
reduce_interleave_weights() scans N_MEMORY three times, but hotplug can
cause N_MEMORY to change at runtime - and torn reads on that nodemask can
cause a total sum of zero bandwidth. A node that was hot-unplugged and
then hotplugged back can then cause this loop to generate a div/0.
Record the nodes visited while summing their bandwidth, then use that same
set when scaling and reducing the weights. This gives us a consistent
state even if N_MEMORY changes.
Link: https://lore.kernel.org/20261030161046.1497894-1-gourry@gourry.net
Fixes: e341f9c3c841 ("mm/mempolicy: Weighted Interleave Auto-tuning")
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Gregory Price (Meta) <gourry@gourry.net>
Reviewed-by: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: David Hildenbrand <david@kernel.org>
Cc: Zi Yan <ziy@nvidia.com>
Cc: Rakie Kim <rakie.kim@sk.com>
Cc: Ying Huang <ying.huang@linux.alibaba.com>
Cc: Harry Yoo <harry@kernel.org>
Cc: <stable@vger.kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
