v5.16-rc5-rt10
Subsystems (7)
Dear RT folks!
I'm pleased to announce the v5.16-rc5-rt10 patch set.
Changes since v5.16-rc5-rt9:
- Redo add_interrupt_randomness() handling on PREEMPT_RT.
- Cosmetic changes to "u64_stats".
- Cosmetic changes to how busylock is acquired in __dev_xmit_skb().
- Cosmetic changes to one i915 patch.
- The random oops_id has been replaced by 0.
Known issues
- netconsole triggers WARN.
- The "Memory controller" (CONFIG_MEMCG) has been disabled.
- Valentin Schneider reported a few splats on ARM64, see
https://lkml.kernel.org/r/[email protected]
The delta patch against v5.16-rc5-rt9 is appended below and can be found here:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.16/incr/patch-5.16-rc5-rt9-rt10.patch.xz
You can get this release via the git tree at:
git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git v5.16-rc5-rt10
The RT patch against v5.16-rc5 can be found here:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.16/older/patch-5.16-rc5-rt10.patch.xz
The split quilt queue is available at:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.16/older/patches-5.16-rc5-rt10.tar.xz
Sebastian
arch/x86/kernel/cpu/mshyperv.c +1 -2
@@ -75,12 +75,11 @@ void hv_remove_vmbus_handler(void)DEFINE_IDTENTRY_SYSVEC (sysvec_hyperv_stimer0) {struct pt_regs *old_regs =set_irq_regs (regs); -u64 ip = regs ?instruction_pointer (regs) :0 ;inc_irq_stat (hyperv_stimer0_count);if (hv_stimer0_handler)hv_stimer0_handler (); -add_interrupt_randomness (HYPERV_STIMER0_VECTOR ,0 , ip); +add_interrupt_randomness (HYPERV_STIMER0_VECTOR );ack_APIC_irq ();set_irq_regs (old_regs);
drivers/char/random.c +71 -29
133 lines not on this page · raw message
drivers/gpu/drm/i915/gt/intel_context.h +1 -1
@@ -212,7 +212,7 @@ static inline void intel_context_enter(struct intel_context *ce)static inline void intel_context_mark_active (struct intel_context *ce) {lockdep_assert (lockdep_is_held (&ce->timeline->mutex) || -test_bit (CONTEXT_IS_PARKED , &ce->flags)); +test_bit (CONTEXT_IS_PARKING , &ce->flags)); ++ce->active_count; }
drivers/gpu/drm/i915/gt/intel_context_types.h +1 -1
@@ -118,7 +118,7 @@ struct intel_context {#define CONTEXT_LRCA_DIRTY 9#define CONTEXT_GUC_INIT 10#define CONTEXT_PERMA_PIN 11 -#define CONTEXT_IS_PARKED 12 +#define CONTEXT_IS_PARKING 12struct {u64 timeout_us;
drivers/gpu/drm/i915/gt/intel_engine_pm.c +2 -2
@@ -180,7 +180,7 @@ static bool switch_to_kernel_context(struct intel_engine_cs *engine)* engine->wakeref.count, we may see the request completion and retire * it causing an underflow of the engine->wakeref. */ -set_bit (CONTEXT_IS_PARKED , &ce->flags); +set_bit (CONTEXT_IS_PARKING , &ce->flags);GEM_BUG_ON (atomic_read (&ce->timeline->active_count) <0 ); rq =__i915_request_create (ce,GFP_NOWAIT );
@@ -212,7 +212,7 @@ static bool switch_to_kernel_context(struct intel_engine_cs *engine) result = false; out_unlock: -clear_bit (CONTEXT_IS_PARKED , &ce->flags); +clear_bit (CONTEXT_IS_PARKING , &ce->flags);return result; }
drivers/gpu/drm/i915/i915_request.h +1 -1
@@ -643,7 +643,7 @@ i915_request_timeline(const struct i915_request *rq)/* Valid only while the request is being constructed (or retired). */ return rcu_dereference_protected (rq->timeline,lockdep_is_held (&rcu_access_pointer (rq->timeline)->mutex) || -test_bit (CONTEXT_IS_PARKED , &rq->context->flags)); +test_bit (CONTEXT_IS_PARKING , &rq->context->flags)); } static inline struct i915_gem_context *
drivers/hv/hyperv_vmbus.h +0 -1
@@ -19,7 +19,6 @@#include <linux/atomic.h> #include <linux/hyperv.h> #include <linux/interrupt.h> -#include <linux/irq.h> #include "hv_trace.h"
drivers/hv/vmbus_drv.c +1 -4
@@ -22,7 +22,6 @@#include <linux/clockchips.h> #include <linux/cpu.h> #include <linux/sched/task_stack.h> -#include <linux/irq.h> #include <linux/delay.h> #include <linux/notifier.h>
@@ -1338,8 +1337,6 @@ static void vmbus_isr(void)void *page_addr = hv_cpu->synic_event_page;struct hv_message *msg;union hv_synic_event_flags *event; -struct pt_regs *regs =get_irq_regs (); -u64 ip = regs ?instruction_pointer (regs) :0 ;bool handled = false;if (unlikely (page_addr ==NULL ))
@@ -1384,7 +1381,7 @@ static void vmbus_isr(void)tasklet_schedule (&hv_cpu->msg_dpc); } -add_interrupt_randomness (vmbus_interrupt,0 , ip); +add_interrupt_randomness (vmbus_interrupt); }static irqreturn_t vmbus_percpu_isr (int irq,void *dev_id)
include/linux/irqdesc.h +0 -1
@@ -68,7 +68,6 @@ struct irq_desc {unsigned int irqs_unhandled;atomic_t threads_handled;int threads_handled_last; -u64 random_ip;raw_spinlock_t lock;struct cpumask *percpu_enabled;const struct cpumask *percpu_affinity;
include/linux/random.h +2 -1
@@ -35,7 +35,8 @@ static inline void add_latent_entropy(void) {} extern void add_input_randomness(unsigned int type, unsigned int code, unsigned int value) __latent_entropy; -extern void add_interrupt_randomness(int irq, int irq_flags, __u64 ip) __latent_entropy; +extern void add_interrupt_randomness(int irq) __latent_entropy; +extern void process_interrupt_randomness (void );extern void get_random_bytes (void *buf,int nbytes);extern int wait_for_random_bytes (void );
include/linux/u64_stats_sync.h +1 -1
@@ -66,7 +66,7 @@#include <linux/seqlock.h> struct u64_stats_sync { -#if BITS_PER_LONG ==32 && (defined(CONFIG_SMP ) || defined(CONFIG_PREEMPT_RT )) +#if BITS_PER_LONG ==32 && (defined(CONFIG_SMP ) || defined(CONFIG_PREEMPT_RT ))seqcount_t seq;#endif };
kernel/irq/chip.c +1 -3
@@ -575,8 +575,6 @@ EXPORT_SYMBOL_GPL(handle_simple_irq);*/ void handle_untracked_irq (struct irq_desc *desc) { -unsigned int flags =0 ; -raw_spin_lock (&desc->lock);if (!irq_may_run (desc))
@@ -593,7 +591,7 @@ void handle_untracked_irq(struct irq_desc *desc)irqd_set (&desc->irq_data,IRQD_IRQ_INPROGRESS );raw_spin_unlock (&desc->lock); -__handle_irq_event_percpu (desc, &flags); +__handle_irq_event_percpu (desc);raw_spin_lock (&desc->lock);irqd_clear (&desc->irq_data,IRQD_IRQ_INPROGRESS );
kernel/irq/handle.c +3 -14
@@ -136,7 +136,7 @@ void __irq_wake_thread(struct irq_desc *desc, struct irqaction *action)wake_up_process (action->thread); } -irqreturn_t __handle_irq_event_percpu (struct irq_desc *desc,unsigned int *flags) +irqreturn_t __handle_irq_event_percpu (struct irq_desc *desc) {irqreturn_t retval =IRQ_NONE ;unsigned int irq = desc->irq_data.irq;
@@ -174,10 +174,6 @@ irqreturn_t __handle_irq_event_percpu(struct irq_desc *desc, unsigned int *flags }__irq_wake_thread (desc, action); - - fallthrough;/* to add to randomness */ -case IRQ_HANDLED : - *flags |= action->flags;break ;default :
@@ -192,18 +188,11 @@ irqreturn_t __handle_irq_event_percpu(struct irq_desc *desc, unsigned int *flagsirqreturn_t handle_irq_event_percpu (struct irq_desc *desc) { -struct pt_regs *regs =get_irq_regs (); -u64 ip = regs ?instruction_pointer (regs) :0 ; -unsigned int flags =0 ;irqreturn_t retval; - retval =__handle_irq_event_percpu (desc, &flags); + retval =__handle_irq_event_percpu (desc); -#ifdef CONFIG_PREEMPT_RT - desc->random_ip = ip; -#else -add_interrupt_randomness (desc->irq_data.irq, flags, ip); -#endif +add_interrupt_randomness (desc->irq_data.irq);if (!irq_settings_no_debug (desc))note_interrupt (desc, retval);
kernel/irq/internals.h +1 -1
@@ -103,7 +103,7 @@ extern int __irq_get_irqchip_state(struct irq_data *data,extern void init_kstat_irqs (struct irq_desc *desc,int node,int nr); -irqreturn_t __handle_irq_event_percpu (struct irq_desc *desc,unsigned int *flags); +irqreturn_t __handle_irq_event_percpu (struct irq_desc *desc);irqreturn_t handle_irq_event_percpu (struct irq_desc *desc);irqreturn_t handle_irq_event (struct irq_desc *desc);
kernel/irq/manage.c +3 -6
@@ -1281,12 +1281,9 @@ static int irq_thread(void *data)if (action_ret ==IRQ_WAKE_THREAD )irq_wake_secondary (desc, action); -if (IS_ENABLED (CONFIG_PREEMPT_RT )) { -migrate_disable (); -add_interrupt_randomness (action->irq,0 , - desc->random_ip ^ (unsigned long ) action); -migrate_enable (); - } +if (IS_ENABLED (CONFIG_PREEMPT_RT )) +process_interrupt_randomness (); +wake_threads_waitq (desc); }
kernel/panic.c +1 -20
@@ -538,28 +538,9 @@ void oops_enter(void)trigger_all_cpu_backtrace (); } -/* -* 64-bit random ID for oopses: -*/ -static u64 oops_id; - -static int init_oops_id (void ) -{ -#ifndef CONFIG_PREEMPT_RT -if (!oops_id) -get_random_bytes (&oops_id,sizeof (oops_id)); - else -#endif - oops_id++; - -return 0 ; -} -late_initcall (init_oops_id); -static void print_oops_end_marker (void ) { -init_oops_id (); -pr_warn ("---[ end trace %016llx ]---\n" , (unsigned long long )oops_id); +pr_warn ("---[ end trace %016llx ]---\n" ,0ULL );pr_flush (1000 , true); }
localversion-rt +1 -1
@@ -1 +1 @@ --rt9 +-rt10
net/core/dev.c +5 -5
@@ -3838,12 +3838,12 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,* separate lock before trying to get qdisc main lock. * This permits qdisc->running owner to get the lock more * often and dequeue packets faster. +* On PREEMPT_RT it is possible to preempt the qdisc owner during xmit +* and then other tasks will only enqueue packets. The packets will be +* sent after the qdisc owner is scheduled again. To prevent this +* scenario the task always serialize on the lock. */ -#ifdef CONFIG_PREEMPT_RT - contended = true; -#else - contended =qdisc_is_running (q); -#endif + contended =IS_ENABLED (CONFIG_PREEMPT_RT ) ||qdisc_is_running (q);if (unlikely (contended))spin_lock (&q->busylock);