linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] mm/slub: Fix debugfs stack trace sorting and simplify sort call
@ 2025-08-25  1:34 Kuan-Wei Chiu
  2025-08-25  1:34 ` [PATCH 1/2] mm/slub: Fix cmp_loc_by_count() to return 0 when counts are equal Kuan-Wei Chiu
  2025-08-25  1:34 ` [PATCH 2/2] mm/slub: Replace sort_r() with sort() for debugfs stack trace sorting Kuan-Wei Chiu
  0 siblings, 2 replies; 12+ messages in thread
From: Kuan-Wei Chiu @ 2025-08-25  1:34 UTC (permalink / raw)
  To: vbabka, akpm
  Cc: cl, rientjes, roman.gushchin, harry.yoo, glittao, jserv,
	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().

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 | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

-- 
2.34.1



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

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

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-25  1:34 [PATCH 0/2] mm/slub: Fix debugfs stack trace sorting and simplify sort call Kuan-Wei Chiu
2025-08-25  1:34 ` [PATCH 1/2] mm/slub: Fix cmp_loc_by_count() to return 0 when counts are equal Kuan-Wei Chiu
2025-08-25 14:48   ` Joshua Hahn
2025-08-25 16:18     ` Kuan-Wei Chiu
2025-08-25 17:12       ` Joshua Hahn
2025-08-25 17:28   ` Vlastimil Babka
2025-08-25 17:54     ` Kuan-Wei Chiu
2025-08-26  7:53       ` Harry Yoo
2025-08-28 17:13         ` Kuan-Wei Chiu
2025-08-29  2:06           ` Harry Yoo
2025-08-25  1:34 ` [PATCH 2/2] mm/slub: Replace sort_r() with sort() for debugfs stack trace sorting Kuan-Wei Chiu
2025-08-25 17:31   ` Vlastimil Babka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox