Re: [PATCH v2 0/2] lib/sort: Clean up sort_nonatomic() and sort_r_nonatomic()
From: Kuan-Wei Chiu
Date: Mon Oct 05 2026 - 14:59:22 EST
On Thu, Sep 10, 2026 at 04:52:19PM +0000, Kuan-Wei Chiu wrote:
> 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.
Anything else I need to do for this patchset to land?
Regards,
Kuan-Wei
> ---
> 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
>