Linux 6.1 Cleans Up More Code For PREEMPT_RT
The real-time "RT" mainlining effort for the Linux kernel remains ongoing. While the finish line is coming near, PREEMPT_RT support for mainline still isn't over the last hurdle -- seemingly the main blocker it's still held up by are the printk changes with threaded console printing. But for the Linux 6.1 merge window there is at least more kernel code clean-ups.
Thomas Gleixner of Linutronix, which is owned by Intel since earlier this year, sent in a set of sched/rt patches this morning for Linux 6.1. For this cycle there are more PREEMPT_RT code clean-ups:
See this pull request for the full list of RT patches for Linux 6.1. Maybe by 6.2 the rest of the RT patch series will be ready for mainlining? It sure would make for a nice way of ringing in 2023.
Thomas Gleixner of Linutronix, which is owned by Intel since earlier this year, sent in a set of sched/rt patches this morning for Linux 6.1. For this cycle there are more PREEMPT_RT code clean-ups:
Introduce preempt_[dis|enable_nested() and use it to clean up various places which have open coded PREEMPT_RT conditionals.
On PREEMPT_RT enabled kernels, spinlocks and rwlocks are neither disabling preemption nor interrupts. Though there are a few places which depend on the implicit preemption/interrupt disable of those locks, e.g. seqcount write sections, per CPU statistics updates etc.
PREEMPT_RT added open coded CONFIG_PREEMPT_RT conditionals to disable/enable preemption in the related code parts all over the place. That's hard to read and does not really explain why this is necessary.
Linus suggested to use helper functions (preempt_disable_nested() and preempt_enable_nested()) and use those in the affected places. On !RT enabled kernels these functions are NOPs, but contain a lockdep assert to validate that preemption is actually disabled to catch call sites which do not have preemption disabled.
Clean up the affected code paths in mm, dentry and lib.
See this pull request for the full list of RT patches for Linux 6.1. Maybe by 6.2 the rest of the RT patch series will be ready for mainlining? It sure would make for a nice way of ringing in 2023.
1 Comment