mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] lib/sort: Clean up sort_nonatomic() and sort_r_nonatomic()
@ 2026-09-10 16:52 Kuan-Wei Chiu
  2026-09-10 16:52 ` [PATCH v2 1/2] bpf: Replace sort_r_nonatomic() with sort_r() in check_dup_ids() Kuan-Wei Chiu
  2026-09-10 16:52 ` [PATCH v2 2/2] Revert "lib/sort.c: add _nonatomic() variants with cond_resched()" Kuan-Wei Chiu
  0 siblings, 2 replies; 4+ messages in thread
From: Kuan-Wei Chiu @ 2026-09-10 16:52 UTC (permalink / raw)
  To: song, ast, daniel, andrii, eddyz87, memxor, kpsingh, matt,
	rostedt, mhiramat, akpm
  Cc: jolsa, ihor.solodrai, martin.lau, yonghong.song, emil,
	mathieu.desnoyers, hch, jserv, eleanor15x, marscheng,
	linux-kernel, bpf, Kuan-Wei Chiu

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-11  8:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-10 16:52 [PATCH v2 0/2] lib/sort: Clean up sort_nonatomic() and sort_r_nonatomic() Kuan-Wei Chiu
2026-09-10 16:52 ` [PATCH v2 1/2] bpf: Replace sort_r_nonatomic() with sort_r() in check_dup_ids() Kuan-Wei Chiu
2026-09-11  8:36   ` Jiri Olsa
2026-09-10 16:52 ` [PATCH v2 2/2] Revert "lib/sort.c: add _nonatomic() variants with cond_resched()" Kuan-Wei Chiu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®