Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] lib/sort: Clean up sort_nonatomic() and sort_r_nonatomic()
@ 2026-07-30 18:12 Kuan-Wei Chiu
  2026-07-30 18:12 ` [PATCH 1/2] iommu/arm-smmu-v3: Replace sort_nonatomic() with sort() Kuan-Wei Chiu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kuan-Wei Chiu @ 2026-07-30 18:12 UTC (permalink / raw)
  To: will, joro, akpm
  Cc: robin.murphy, nicolinc, cychu, hhchung, amitamishra, marscheng,
	linux-arm-kernel, iommu, linux-kernel, jserv, eleanor15x,
	Kuan-Wei Chiu

Remove the sort_nonatomic() and sort_r_nonatomic() APIs from the kernel
library.

Currently, the arm-smmu-v3 driver is the sole in-tree user of 
sort_nonatomic(). Because the array size being sorted is small in
practice, there is no real risk of triggering a soft lockup. Therefore,
the periodic cond_resched() calls provided by the _nonatomic variant
are unnecessary.

With the only in-tree user updated, the _nonatomic APIs are no longer
needed anywhere in the kernel. Removing them effectively drops the
wrapper function and eliminates the may_schedule branch from the
innermost loop of the core sorting logic, slightly simplifying the code.

Kuan-Wei Chiu (2):
  iommu/arm-smmu-v3: Replace sort_nonatomic() with sort()
  Revert "lib/sort.c: add _nonatomic() variants with cond_resched()"

 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c |   6 +-
 include/linux/sort.h                        |  11 --
 lib/sort.c                                  | 110 ++++++--------------
 3 files changed, 34 insertions(+), 93 deletions(-)

-- 
2.55.0.508.g3f0d502094-goog



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

end of thread, other threads:[~2026-07-30 19:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-30 18:12 [PATCH 0/2] lib/sort: Clean up sort_nonatomic() and sort_r_nonatomic() Kuan-Wei Chiu
2026-07-30 18:12 ` [PATCH 1/2] iommu/arm-smmu-v3: Replace sort_nonatomic() with sort() Kuan-Wei Chiu
2026-07-30 18:12 ` [PATCH 2/2] Revert "lib/sort.c: add _nonatomic() variants with cond_resched()" Kuan-Wei Chiu
2026-07-30 19:32 ` [PATCH 0/2] lib/sort: Clean up sort_nonatomic() and sort_r_nonatomic() 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