Skip to contentSkip to conversation

mm-memcontrol-update-state_local-when-flushing-nmi-stats.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Aug 5 Stable branch

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: memcontrol: update state_local when flushing NMI stats
has been removed from the -mm tree. Its filename was
mm-memcontrol-update-state_local-when-flushing-nmi-stats.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Guopeng Zhang <[email protected]>
Subject: mm: memcontrol: update state_local when flushing NMI stats
Date: Mon, 13 Jul 2026 16:50:53 +0800

flush_nmi_stats() updates state[] for kmem and slab counters but leaves the corresponding state_local[] counters unchanged. Local kmem and slab statistics therefore miss updates collected through the NMI-safe atomic path.

Update state_local[] together with state[].

Fixes 940b01fc8dc1 ("memcg: nmi safe memcg stats for specific archs")
Cc Alexandre Ghiti <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Muchun Song <[email protected]>
Cc Roman Gushchin <[email protected]>
Cc Vlastimil Babka <[email protected]>

---

 mm/memcontrol.c |    5 +++++
 1 file changed, 5 insertions(+)
mm/memcontrol.c renamed from mm/memcontrol.c~mm-memcontrol-update-state_local-when-flushing-nmi-stats +5 -0
@@ -4443,6 +4443,7 @@ static void flush_nmi_stats(struct mem_c
 		int index = memcg_stats_index(MEMCG_KMEM);
 
 		memcg->vmstats->state[index] += kmem;
+		memcg->vmstats->state_local[index] += kmem;
 		if (parent)
 			parent->vmstats->state_pending[index] += kmem;
 	}
@@ -4460,9 +4461,11 @@ static void flush_nmi_stats(struct mem_c
 			int index = memcg_stats_index(NR_SLAB_RECLAIMABLE_B);
 
 			lstats->state[index] += slab;
+			lstats->state_local[index] += slab;
 			if (plstats)
 				plstats->state_pending[index] += slab;
 			memcg->vmstats->state[index] += slab;
+			memcg->vmstats->state_local[index] += slab;
 			if (parent)
 				parent->vmstats->state_pending[index] += slab;
 		}
@@ -4471,9 +4474,11 @@ static void flush_nmi_stats(struct mem_c
 			int index = memcg_stats_index(NR_SLAB_UNRECLAIMABLE_B);
 
 			lstats->state[index] += slab;
+			lstats->state_local[index] += slab;
 			if (plstats)
 				plstats->state_pending[index] += slab;
 			memcg->vmstats->state[index] += slab;
+			memcg->vmstats->state_local[index] += slab;
 			if (parent)
 				parent->vmstats->state_pending[index] += slab;
 		}

_

Patches currently in -mm which might be from [email protected] are

mm-memcg-v1-account-vmpressure-event-allocations.patch mm-memcg-v1-fix-wrong-linux-mm-list-address-in-deprecation-warnings.patch mm-memcontrol-drop-unused-cpu-argument-from-flush_nmi_stats.patch mm-memcontrol-factor-out-memcg-kmem-uncharge-sequence.patch mm-memcg-v1-make-mem_cgroup_oom_notify_cb-return-void.patch mm-memcg-stop-reclaim-when-a-limit-update-is-superseded.patch