linux-yocto/tools/mm
Kaushlendra Kumar 4df537e247 tools/mm/page_owner_sort: fix timestamp comparison for stable sorting
commit 7013803444dd3bbbe28fd3360c084cec3057c554 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-01-08 10:17:11 +01:00
..
.gitignore
Makefile
page_owner_sort.c tools/mm/page_owner_sort: fix timestamp comparison for stable sorting 2026-01-08 10:17:11 +01:00
page-types.c
show_page_info.py
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
thpmaps