diff options
author | Kuan-Wei Chiu <visitorckw@gmail.com> | 2024-05-26 01:02:06 +0200 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-06-25 07:25:04 +0200 |
commit | 6d74e1e371d43a7b378d1cb8cd1bb1007f1a8580 (patch) | |
tree | 4f8b1bd45b287d0f4de3fd17d1ccc9b5adcae429 /lib | |
parent | lib/plist.c: enforce memory ordering in plist_check_list (diff) | |
download | linux-6d74e1e371d43a7b378d1cb8cd1bb1007f1a8580.tar.xz linux-6d74e1e371d43a7b378d1cb8cd1bb1007f1a8580.zip |
tools/lib/list_sort: remove redundant code for cond_resched handling
Since cond_resched() is not called in userspace, remove the redundant code
in userspace's list_sort() implementation. This change eliminates the
unused 'count' variable and the associated logic for invoking cmp()
periodically, which was intended to trigger cond_resched() in kernel
space.
The removed code includes:
- Declaration and increment of the 'count' variable.
- Conditional invocation of cmp() based on 'count'.
This cleanup simplifies merge_final(), avoids unnecessary overhead, and
has no impact on the functionality of list_sort() in userspace.
Link: https://lkml.kernel.org/r/20240525230206.1077536-1-visitorckw@gmail.com
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ching-Chun (Jim) Huang <jserv@ccns.ncku.edu.tw>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions