mirror-linux/tools/mm
Kaushlendra Kumar 7013803444 tools/mm/page_owner_sort: fix timestamp comparison for stable sorting
The ternary operator in compare_ts() returns 1 when timestamps are equal,
causing unstable sorting behavior. Replace with explicit three-way
comparison that returns 0 for equal timestamps, ensuring stable qsort
ordering and consistent output.

Link: https://lkml.kernel.org/r/20251209044552.3396468-1-kaushlendra.kumar@intel.com
Fixes: 8f9c447e2e ("tools/vm/page_owner_sort.c: support sorting pid and time")
Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Cc: Chongxi Zhao <zhaochongxi2019@email.szu.edu.cn>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-12-23 11:23:14 -08:00
..
.gitignore
Makefile tools/mm: rm thp_swap_allocator_test when make clean 2024-09-09 16:47:41 -07:00
page-types.c tools/mm: fix build warnings with musl-libc 2025-02-17 22:40:02 -08:00
page_owner_sort.c tools/mm/page_owner_sort: fix timestamp comparison for stable sorting 2025-12-23 11:23:14 -08:00
show_page_info.py tools/mm: add script to display page state for a given PID and VADDR 2025-07-09 22:41:53 -07:00
slabinfo-gnuplot.sh
slabinfo.c tools/mm/slabinfo: fix access to null terminator in string boundary 2025-09-21 14:22:00 -07:00
thp_swap_allocator_test.c tools/mm: introduce a tool to assess swap entry allocation for thp_swapout 2024-07-10 12:14:51 -07:00
thpmaps tools/mm: add thpmaps script to dump THP usage info 2024-02-22 10:24:38 -08:00