From: Don Zickus on gitlab.com Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2963 NOTE: Truncated patchset since committer email 'bigeasy@linutronix.de' does not match the submitter's GitLab public email address 'dzickus@redhat.com'. ksoftirqd is statically boosted to the priority level right above the one of rcu_torture_boost() so that timers, which torture readers rely on, get a chance to run while rcu_torture_boost() is polling.
However timers processing got split from ksoftirqd into their own kthread (timersd) that isn't boosted. It has the same SCHED_FIFO low prio as rcu_torture_boost() and therefore timers can't preempt it and may starve.
The issue can be triggered in practice on v5.17.1-rt17 using:
./kvm.sh --allcpus --configs TREE04 --duration 10m --kconfig "CONFIG_EXPERT=y CONFIG_PREEMPT_RT=y"
Fix this with statically boosting timersd just like is done with ksoftirqd in commit ea6d962e80b61 ("rcutorture: Judge RCU priority boosting on grace periods, not callbacks")
Suggested-by: Mel Gorman mgorman@suse.de Cc: Sebastian Andrzej Siewior bigeasy@linutronix.de Cc: Thomas Gleixner tglx@linutronix.de Signed-off-by: Frederic Weisbecker frederic@kernel.org Link: https://lkml.kernel.org/r/20220405010752.1347437-1-frederic@kernel.org Signed-off-by: Sebastian Andrzej Siewior bigeasy@linutronix.de
--- Documentation/admin-guide/kernel-parameters.txt | 12 + arch/arm/mm/fault.c | 6 + arch/arm/vfp/vfpmodule.c | 74 +- arch/arm/Kconfig | 6 +- arch/arm64/Kconfig | 1 + arch/powerpc/include/asm/stackprotector.h | 7 +- arch/powerpc/kernel/traps.c | 7 +- arch/powerpc/kvm/Kconfig | 1 + arch/powerpc/platforms/pseries/Kconfig | 1 + arch/powerpc/platforms/pseries/iommu.c | 31 +- arch/powerpc/Kconfig | 2 + arch/riscv/include/asm/thread_info.h | 2 + arch/riscv/Kconfig | 2 + arch/x86/include/asm/thread_info.h | 6 +- arch/x86/Kconfig | 3 + drivers/acpi/processor_idle.c | 2 +- drivers/block/zram/zram_drv.c | 37 + drivers/block/zram/zram_drv.h | 3 + drivers/gpu/drm/i915/display/intel_crtc.c | 15 +- drivers/gpu/drm/i915/display/intel_vblank.c | 38 +- drivers/gpu/drm/i915/gt/uc/intel_guc.h | 2 +- drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 5 +- drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 17 +- drivers/gpu/drm/i915/Kconfig | 1 - drivers/gpu/drm/i915/i915_request.c | 2 - drivers/gpu/drm/i915/i915_trace.h | 6 +- drivers/gpu/drm/i915/i915_utils.h | 2 +- drivers/tty/serial/8250/8250_core.c | 42 +- drivers/tty/serial/8250/8250_port.c | 160 +++- drivers/tty/serial/amba-pl011.c | 12 +- drivers/tty/serial/omap-serial.c | 12 +- drivers/tty/tty_io.c | 9 +- fs/proc/consoles.c | 14 +- include/linux/sched/idle.h | 8 +- include/linux/bottom_half.h | 2 + include/linux/console.h | 127 ++- include/linux/entry-common.h | 2 +- include/linux/entry-kvm.h | 2 +- include/linux/interrupt.h | 29 + include/linux/netdevice.h | 4 + include/linux/printk.h | 32 +- include/linux/sched.h | 13 +- include/linux/serial_8250.h | 6 + include/linux/serial_core.h | 31 +- include/linux/thread_info.h | 24 + include/linux/trace_events.h | 8 +- kernel/entry/common.c | 4 +- kernel/entry/kvm.c | 2 +- kernel/locking/lockdep.c | 5 + kernel/printk/internal.h | 98 + kernel/printk/nbcon.c | 732 +++++++++++++- kernel/printk/printk.c | 675 ++++++++++-- kernel/printk/printk_ringbuffer.c | 335 +++++- kernel/printk/printk_ringbuffer.h | 54 +- kernel/printk/printk_safe.c | 12 + kernel/rcu/rcutorture.c | 6 + kernel/rcu/tree_stall.h | 5 + kernel/sched/core.c | 65 +- kernel/sched/debug.c | 19 + kernel/sched/fair.c | 46 +- kernel/sched/features.h | 2 + kernel/sched/idle.c | 3 +- kernel/sched/rt.c | 5 +- kernel/sched/sched.h | 1 + kernel/time/hrtimer.c | 4 +- kernel/time/tick-sched.c | 2 +- kernel/time/timer.c | 11 +- kernel/trace/trace.c | 2 + kernel/trace/trace_output.c | 16 +- kernel/Kconfig.preempt | 17 +- kernel/ksysfs.c | 12 + kernel/panic.c | 17 + kernel/softirq.c | 95 +- lib/dump_stack.c | 16 +- net/core/dev.c | 39 +- net/core/skbuff.c | 7 +- redhat/configs/pending-fedora/generic/CONFIG_PREEMPT_AUTO | 15 + redhat/configs/pending-fedora/generic/CONFIG_PREEMPT_RT | 15 + redhat/configs/rhel/generic/CONFIG_PREEMPT_AUTO | 1 + redhat/configs/rhel/generic/CONFIG_PREEMPT_RT | 1 + redhat/configs/rhel/rt/debug/CONFIG_PREEMPT_VOLUNTARY | 1 - redhat/configs/rhel/rt/generic/CONFIG_PREEMPT_DYNAMIC | 2 +- redhat/configs/rhel/rt/generic/CONFIG_PREEMPT_RT | 2 +- redhat/configs/rhel/rt/generic/CONFIG_PREEMPT_VOLUNTARY | 2 +- localversion-rt | 1 + 85 files changed, 2740 insertions(+), 435 deletions(-)
From: Tony Camuso on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2963#note_1793397...
After looking at the upstream conversation, I feel comfortable about approving this.
kernel@lists.fedoraproject.org