[PATCH v3 0/3] Allow to drop the softirq-BKL lock on PREEMPT_RT

Sebastian Andrzej Siewior posted 3 patches 4 weeks ago
kernel/Kconfig.preempt |  13 ++++
kernel/softirq.c       | 145 ++++++++++++++++++++++++++++++++++-------
kernel/workqueue.c     |  50 +++++++++++---
3 files changed, 174 insertions(+), 34 deletions(-)
[PATCH v3 0/3] Allow to drop the softirq-BKL lock on PREEMPT_RT
Posted by Sebastian Andrzej Siewior 4 weeks ago
Users which rely on synchronisation within a BH-disabled section as in
- access to per-CPU data
- per-CPU timers
- synchronisation against another user within a BH-disabled section

rely on the local_lock_t lock in local_bh_disable() on PREEMPT_RT.
Almost all users dropped their dependency. The remaining (identified)
user in networking (pipapo) is in net-next.
What is left is the infrastructure as in tasklet and workqueue (for
bh-worker).
Both are part of this series. The last patch in the series adds an
option to drop the lock.

v1…v2: https://lore.kernel.org/all/20250901163811.963326-1-bigeasy@linutronix.de/
  - In workqueue, __flush_work(), replace wq_pool_mutex with RCU locking.

v1 tasklet https://lore.kernel.org/all/20250812143930.22RBn5BW@linutronix.de
v1 workqueue https://lore.kernel.org/all/20250820103657.vDuDuLx6@linutronix.de
v1 lock-drop https://lore.kernel.org/all/20250613105653.1860729-2-bigeasy@linutronix.de

Sebastian Andrzej Siewior (3):
  workqueue: Provide a handshake for canceling BH workers
  softirq: Provide a handshake for canceling tasklets via polling
  softirq: Allow to drop the softirq-BKL lock on PREEMPT_RT

 kernel/Kconfig.preempt |  13 ++++
 kernel/softirq.c       | 145 ++++++++++++++++++++++++++++++++++-------
 kernel/workqueue.c     |  50 +++++++++++---
 3 files changed, 174 insertions(+), 34 deletions(-)

-- 
2.51.0
Re: [PATCH v3 0/3] Allow to drop the softirq-BKL lock on PREEMPT_RT
Posted by Sebastian Andrzej Siewior 2 weeks, 3 days ago
On 2025-09-04 16:25:22 [+0200], To linux-rt-devel@lists.linux.dev wrote:
> Users which rely on synchronisation within a BH-disabled section as in
> - access to per-CPU data
> - per-CPU timers
> - synchronisation against another user within a BH-disabled section
> 
> rely on the local_lock_t lock in local_bh_disable() on PREEMPT_RT.
> Almost all users dropped their dependency. The remaining (identified)
> user in networking (pipapo) is in net-next.
> What is left is the infrastructure as in tasklet and workqueue (for
> bh-worker).
> Both are part of this series. The last patch in the series adds an
> option to drop the lock.

Could we please route #2 and #3 via -tip?

Sebastian