Skip to content

RFC softirq: Start pushing down the big softirq lock

Frederic Weisbecker lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6softirq: Turn set_softirq_pending() to reset_softirq_pending()include/linux/interrupt.h kernel/softirq.c+2 -20 replies
2/6softirq: Make softirq handling entry/exit generally availableinclude/linux/bottom_half.h kernel/softirq.c+23 -60 replies
3/6softirq: Introduce softirq disabled maskarch/Kconfig include/linux/bottom_half.h include/linux/interrupt.h +1 more+32 -40 replies
4/6x86/softirq: Support softirq disabled maskarch/x86/Kconfig arch/x86/include/asm/current.h arch/x86/include/asm/hardirq.h+3 -00 replies
5/6timers: Introduce soft-interruptible timersinclude/linux/timer.h kernel/time/timer.c+21 -20 replies
6/6timers: Make process_timeout() soft-interruptiblekernel/time/timer.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/6] softirq: Start pushing down the big softirq lock

Networking softirqs can take time, holding the execution of block, tasklets, timers and RCU callbacks.

People fight hard through this big softirq lock, proposing more and more hacks over the years to deal with the resulting fundamental unfairness that is not only a problem for RT users.

Here is a proposal for an entrypoint to dealing with that issue in the long term. The purpose is to adopt a similar journey to the one we took with the BKL push-down but with timers. Most timers are unrelated to other softirq vectors, those can simply be tagged with the new TIMER_SOFTINTERRUPTIBLE flag that makes a callback soft-interruptible. The others can carry the TIMER_SOFTINTERRUPTIBLE after they get converted to use appropriate synchronization against other vectors callbacks (using spin_lock_bh() for example).

Once all timers are dealt with after a few years (famous last words), they can be handled separately from the softirq infrastructure.

RCU could follow a similar treatment, if we manage to find room for a flag somewhere...

(Only -RT and x86 are supported for now)

git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
timers/softirq-preemptible

HEAD: c233aee141ddb78d07b2f7311be38cfc286de654

Thanks,
Frederic
---

Frederic Weisbecker (6):
softirq: Turn set_softirq_pending() to reset_softirq_pending()
softirq: Make softirq handling entry/exit generally available
softirq: Introduce softirq disabled mask x86/softirq: Support softirq disabled mask
timers: Introduce soft-interruptible timers
timers: Make process_timeout() soft-interruptible

 arch/Kconfig                   |  3 +++
 arch/x86/Kconfig               |  1 +
 arch/x86/include/asm/current.h |  1 +
 arch/x86/include/asm/hardirq.h |  1 +
 include/linux/bottom_half.h    |  9 +++++++++
 include/linux/interrupt.h      | 15 ++++++++++++---
 include/linux/timer.h          |  5 +++--
 kernel/softirq.c               | 40 ++++++++++++++++++++++++++++++++--------
 kernel/time/timer.c            | 20 +++++++++++++++++++-
 9 files changed, 81 insertions(+), 14 deletions(-)