All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/2] tools/mm: slabinfo: fix inverted sorting and totals
@ 2026-11-18  6:03 Xuewen Wang
  2026-11-18  6:03 ` [PATCH v1 1/2] tools/mm: slabinfo: fix inverted numeric sorting Xuewen Wang
  2026-11-18  6:03 ` [PATCH v1 2/2] tools/mm: slabinfo: preserve the average partial object count Xuewen Wang
  0 siblings, 2 replies; 5+ messages in thread
From: Xuewen Wang @ 2026-11-18  6:03 UTC (permalink / raw)
  To: vbabka, harry, hao.li, cl, rientjes, akpm, david, rppt, mhocko,
	surenb, sj
  Cc: linux-mm, linux-kernel, Xuewen Wang

From: Xuewen Wang <wangxuewen@kylinos.cn>

This series fixes two independent bugs in slabinfo:

  1. Return signed comparison results for unequal numeric sort keys so
     that -i correctly reverses size, activity, loss and partial sorting.
  2. Keep the per-cache partial-object average instead of overwriting it
     with a percentage before printing the PartObjs row.

Validation:

The sorting and totals fixes were additionally verified on live kernels
(v5.10 and v6.6) with root access: "slabinfo -l -S -i" is unsorted before
the sorting fix and ascending after it, with descending output unchanged;
"slabinfo -B -T" reports the PartObjs Average as a percentage (8 and 67)
before the totals fix and as the correct per-cache average
(2362 = 262202/111 and 48867 = 10897410/223) after it. No kernel slab
settings were modified.

Xuewen Wang (2):
  tools/mm: slabinfo: fix inverted numeric sorting
  tools/mm: slabinfo: preserve the average partial object count

 tools/mm/slabinfo.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

-- 
2.25.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-12-02 18:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18  6:03 [PATCH v1 0/2] tools/mm: slabinfo: fix inverted sorting and totals Xuewen Wang
2026-11-18  6:03 ` [PATCH v1 1/2] tools/mm: slabinfo: fix inverted numeric sorting Xuewen Wang
2026-12-02 18:24   ` Harry Yoo
2026-11-18  6:03 ` [PATCH v1 2/2] tools/mm: slabinfo: preserve the average partial object count Xuewen Wang
2026-12-02 18:25   ` Harry Yoo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.