linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] mm/slub: Fix debugfs stack trace sorting and simplify sort call
@ 2025-08-26  6:23 Kuan-Wei Chiu
  2025-08-26  6:23 ` [PATCH v2 1/2] mm/slub: Fix cmp_loc_by_count() to return 0 when counts are equal Kuan-Wei Chiu
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Kuan-Wei Chiu @ 2025-08-26  6:23 UTC (permalink / raw)
  To: vbabka, akpm
  Cc: cl, rientjes, roman.gushchin, harry.yoo, glittao, jserv, chuang,
	cfmc.cs13, jhcheng.cs13, c.yuanhaur, linux-mm, linux-kernel,
	Kuan-Wei Chiu

Fix the comparison function used for sorting stack trace locations in
the slub debugfs interface. The original implementation violated the
antisymmetry property required by sort(), which could lead to
unreliable ordering of the output. The patches correct the comparison
function to return 0 when counts are equal and replace the unnecessary
use of sort_r() with the simpler sort().
---
Changes in v2:
* Use cmp_int().
* Drop Cc stable. 

v1: https://lore.kernel.org/lkml/20250825013419.240278-1-visitorckw@gmail.com/

Kuan-Wei Chiu (2):
  mm/slub: Fix cmp_loc_by_count() to return 0 when counts are equal
  mm/slub: Replace sort_r() with sort() for debugfs stack trace sorting

 mm/slub.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

-- 
2.34.1



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

end of thread, other threads:[~2025-08-29  2:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-26  6:23 [PATCH v2 0/2] mm/slub: Fix debugfs stack trace sorting and simplify sort call Kuan-Wei Chiu
2025-08-26  6:23 ` [PATCH v2 1/2] mm/slub: Fix cmp_loc_by_count() to return 0 when counts are equal Kuan-Wei Chiu
2025-08-29  2:13   ` Harry Yoo
2025-08-26  6:23 ` [PATCH v2 2/2] mm/slub: Replace sort_r() with sort() for debugfs stack trace sorting Kuan-Wei Chiu
2025-08-29  2:14   ` Harry Yoo
2025-08-27  9:55 ` [PATCH v2 0/2] mm/slub: Fix debugfs stack trace sorting and simplify sort call Vlastimil Babka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).