summaryrefslogtreecommitdiff
path: root/rust/zerocopy-derive/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorGregory Price <gourry@gourry.net>2026-06-27 16:22:43 -0400
committerAndrew Morton <akpm@linux-foundation.org>2026-07-20 17:41:25 -0700
commitea3034b2b00fa50c8d2518d0804c9d427bbafa86 (patch)
treec29b96b0cff251cf2dd70169af79132aa785a1f0 /rust/zerocopy-derive/git@git.tavy.me:linux.git
parentb95f03f04d475aa6719d15a636ddf32222d55657 (diff)
mm/vmstat: fold stranded per-cpu node stats when a node comes online
A per-node vmstat counter is pgdat->vm_stat[] plus per-cpu deltas. A balanced counter can sit split as global=+N / per-cpu=-N. The folds reconciling the split only walk online nodes, so when try_offline_node() marks a node offline the per-cpu deltas are stranded. A subsequent online resets the per-cpu area but not pgdat->vm_stat[], orphaning the +N permanently. All NR_VM_NODE_STAT_ITEMS are affected. The existing code zeroes the per-cpu counters and causes a permanent skew. Fold the stranded deltas instead, before the node rejoins the online set. The node is not online yet and the hotplug lock is held, so the remote access to per-cpu values is safe. Discovered when node compaction hung for a nearly empty node, as the math to determine throttling broke. Reproduced by repeated memory hotplug/unplug cycles on a node under pressure: NR_ISOLATED_ANON ratchets up and never returns to zero. Link: https://lore.kernel.org/20260627202243.758289-1-gourry@gourry.net Fixes: 75ef71840539 ("mm, vmstat: add infrastructure for per-node vmstats") Signed-off-by: Gregory Price <gourry@gourry.net> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Mike Rapoport <rppt@kernel.org> Cc: Vlastimil Babka <vbabka@kernel.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'rust/zerocopy-derive/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions