From: Xuewen Wang totals() calculates avg_partobj as total_partobj / used_slabs, but then overwrites it with total_partobj * 100 / total_objects. Consequently, the PartObjs Average column of -T and -X reports a percentage instead of an object count per cache. Remove the second assignment. The aggregate partial-object percentage is already calculated where it is printed, and avg_ppartobj separately holds the average per-cache percentage. Fixes: c09d87517298 ("slub: add slabinfo tool") Signed-off-by: Xuewen Wang --- tools/mm/slabinfo.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/mm/slabinfo.c b/tools/mm/slabinfo.c index 3e62a2fccaeb..116625bd1110 100644 --- a/tools/mm/slabinfo.c +++ b/tools/mm/slabinfo.c @@ -973,7 +973,6 @@ static void totals(void) /* Per object object sizes */ avg_objsize = total_used / total_objects; avg_objwaste = total_objwaste / total_objects; - avg_partobj = total_partobj * 100 / total_objects; avg_memobj = total_objsize / total_objects; printf("Slabcache Totals\n"); -- 2.25.1