diff options
author | Kuan-Wei Chiu <[email protected]> | 2024-05-24 23:29:58 +0800 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2024-06-24 22:25:00 -0700 |
commit | 1fcce6b8a768b7fc0bc788abd79658cbf9b21536 (patch) | |
tree | fd5e06ab92f715cbb0a6ceec7e7a27c35befe91d /tools/perf/scripts/python/task-analyzer.py | |
parent | 866898efbb25bb44fd42848318e46db9e785973a (diff) |
bcachefs: remove heap-related macros and switch to generic min_heap
Drop the heap-related macros from bcachefs and replacing them with the
generic min_heap implementation from include/linux. By doing so, code
readability is improved by using functions instead of macros. Moreover,
the min_heap implementation in include/linux adopts a bottom-up variation
compared to the textbook version currently used in bcachefs. This
bottom-up variation allows for approximately 50% reduction in the number
of comparison operations during heap siftdown, without changing the number
of swaps, thus making it more efficient.
[[email protected]: fix missing assignment of minimum element]
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/ioyfizrzq7w7mjrqcadtzsfgpuntowtjdw5pgn4qhvsdp4mqqg@nrlek5vmisbu
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Kuan-Wei Chiu <[email protected]>
Reviewed-by: Ian Rogers <[email protected]>
Acked-by: Kent Overstreet <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Bagas Sanjaya <[email protected]>
Cc: Brian Foster <[email protected]>
Cc: Ching-Chun (Jim) Huang <[email protected]>
Cc: Coly Li <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Matthew Sakai <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Randy Dunlap <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions