[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220712022807.44113-3-rongwei.wang@linux.alibaba.com>
Date: Tue, 12 Jul 2022 10:28:07 +0800
From: Rongwei Wang <rongwei.wang@...ux.alibaba.com>
To: akpm@...ux-foundation.org, vbabka@...e.cz, 42.hyeyoo@...il.com,
roman.gushchin@...ux.dev, iamjoonsoo.kim@....com,
rientjes@...gle.com, penberg@...nel.org, cl@...two.de
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: [PATCH v2 3/3] mm/slub: delete confusing pr_err when debugging slub
The n->nr_slabs will be updated when really to allocate or
free a slab, but this slab is unnecessarily in full list
or partial list of one node. That means the total count of
slab in node's full and partial list is unnecessarily equal
to n->nr_slabs, even though flush_all() has been called.
An example here, an error message likes below will be
printed when 'slabinfo -v' is executed:
SLUB: kmemleak_object 4157 slabs counted but counter=4161
SLUB: kmemleak_object 4072 slabs counted but counter=4077
SLUB: kmalloc-2k 19 slabs counted but counter=20
SLUB: kmalloc-2k 12 slabs counted but counter=13
SLUB: kmemleak_object 4205 slabs counted but counter=4209
Here, deleting this pr_err() directly.
Signed-off-by: Rongwei Wang <rongwei.wang@...ux.alibaba.com>
---
mm/slub.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c
index 587416e39292..cdac004f232f 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -5059,11 +5059,6 @@ static int validate_slab_node(struct kmem_cache *s,
validate_slab(s, slab, obj_map);
count++;
}
- if (count != atomic_long_read(&n->nr_slabs)) {
- pr_err("SLUB: %s %ld slabs counted but counter=%ld\n",
- s->name, count, atomic_long_read(&n->nr_slabs));
- slab_add_kunit_errors();
- }
out:
spin_unlock_irqrestore(&n->list_lock, flags);
--
2.27.0
Powered by blists - more mailing lists