Thread (13 messages) 13 messages, 3 authors, 2026-01-13

Re: [PATCH v13 2/3] mm: Fix OOM killer inaccuracy on large many-core systems

From: Shakeel Butt <shakeel.butt@linux.dev>
Date: 2026-01-12 17:29:30
Also in: linux-mm, lkml

On Sun, Jan 11, 2026 at 02:49:57PM -0500, Mathieu Desnoyers wrote:
[...]
quoted hunk ↗ jump to hunk
@@ -626,14 +631,12 @@ static void check_mm(struct mm_struct *mm)
 			 "Please make sure 'struct resident_page_types[]' is updated as well");
 
 	for (i = 0; i < NR_MM_COUNTERS; i++) {
-		long x = percpu_counter_sum(&mm->rss_stat[i]);
-
-		if (unlikely(x)) {
-			pr_alert("BUG: Bad rss-counter state mm:%p type:%s val:%ld Comm:%s Pid:%d\n",
-				 mm, resident_page_types[i], x,
+		if (unlikely(percpu_counter_tree_precise_compare_value(&mm->rss_stat[i], 0) != 0))
+			pr_alert("BUG: Bad rss-counter state mm:%p type:%s val:%d Comm:%s Pid:%d\n",
+				 mm, resident_page_types[i],
+				 percpu_counter_tree_precise_sum(&mm->rss_stat[i]),
I haven't gone through the whole series yet but this "val:%ld" to
"val:%d" conversion seems like unintended. Next patch fixed it but it
should be fixed here.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help