[PATCH v2 0/2] lib/sort: Clean up sort_nonatomic() and sort_r_nonatomic()

Kuan-Wei Chiu posted 2 patches 2 weeks ago
include/linux/sort.h     |  11 ----
kernel/trace/bpf_trace.c |   2 +-
lib/sort.c               | 110 +++++++++++----------------------------
3 files changed, 32 insertions(+), 91 deletions(-)
[PATCH v2 0/2] lib/sort: Clean up sort_nonatomic() and sort_r_nonatomic()
Posted by Kuan-Wei Chiu 2 weeks ago
kernel/trace/bpf_trace.c is the sole remaining user of
sort_r_nonatomic(). Switch check_dup_ids() to sort_r() to match
bpf_kprobe_multi_link_attach() in the same file, which has safely
used sort_r() under the same limit (1U << 20) for 4 years.

With no users left in the tree, remove the unused sort_nonatomic() and
sort_r_nonatomic() APIs. This drops the __sort_r() wrapper and
eliminates the may_schedule branch and cond_resched() from the inner
sorting loop.
---
Changes in v2:
- Drop the already accepted arm-smmu-v3 patch.
- Convert bpf_trace.c to sort_r() instead.

Kuan-Wei Chiu (2):
  bpf: Replace sort_r_nonatomic() with sort_r() in check_dup_ids()
  Revert "lib/sort.c: add _nonatomic() variants with cond_resched()"

 include/linux/sort.h     |  11 ----
 kernel/trace/bpf_trace.c |   2 +-
 lib/sort.c               | 110 +++++++++++----------------------------
 3 files changed, 32 insertions(+), 91 deletions(-)

-- 
2.55.0.1003.g10538fe699-goog