v5.15-rc3-rt6
Subsystems (7)
Dear RT folks!
I'm pleased to announce the v5.15-rc3-rt6 patch set.
Changes since v5.15-rc3-rt5:
- A sequence counter in networking's bridge code was not annotated properly. Reported by Mike Galbraith patch by Thomas Gleixner.
- Temporary export force_irqthreads_key so the i915 driver compiles as a module.
- Dropped all need-resched checks from irq_poll and added a BH off/on section around the place that may raise softirqs in the CPU hotplug notifier. This is an equivalent replacement for the former checks.
- Synchronize various patches (irq_work, sched, zsmalloc) with what has been posted upstream.
Known issues
- netconsole triggers WARN.
- The "Memory controller" (CONFIG_MEMCG) has been disabled.
- Valentin Schneider reported a few splats on ARM64, see
https://https://lkml.kernel.org/r/.kernel.org/lkml/[email protected]/
The delta patch against v5.15-rc3-rt5 is appended below and can be found here:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.15/incr/patch-5.15-rc3-rt5-rt6.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.15-rc3-rt6
The RT patch against v5.15-rc3 can be found here:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patch-5.15-rc3-rt6.patch.xz
The split quilt queue is available at:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15-rc3-rt6.tar.xz
Sebastian
include/linux/irq_work.h +1 -1
@@ -51,7 +51,7 @@ static inline bool irq_work_is_busy(struct irq_work *work)static inline bool irq_work_is_hard (struct irq_work *work) { -return atomic_read (&work->node.a_flags) &IRQ_WORK_HARD_IRQ ; +return atomic_read (&work->node.a_flags) &IRQ_WORK_HARD_IRQ ; }bool irq_work_queue (struct irq_work *work);
kernel/exit.c +1 -1
@@ -60,11 +60,11 @@#include <linux/writeback.h> #include <linux/shm.h> #include <linux/kcov.h> -#include <linux/kprobes.h> #include <linux/random.h> #include <linux/rcuwait.h> #include <linux/compat.h> #include <linux/io_uring.h> +#include <linux/kprobes.h> #include <linux/uaccess.h> #include <asm/unistd.h>
kernel/irq/manage.c +1 -0
@@ -26,6 +26,7 @@#if defined(CONFIG_IRQ_FORCED_THREADING ) && !defined(CONFIG_PREEMPT_RT )DEFINE_STATIC_KEY_FALSE (force_irqthreads_key); +EXPORT_SYMBOL_GPL (force_irqthreads_key);static int __init setup_forced_irqthreads (char *arg) {
kernel/irq_work.c +12 -19
@@ -61,8 +61,8 @@ static void __irq_work_queue_local(struct irq_work *work)if (work_flags &IRQ_WORK_LAZY ) lazy_work = true;else if (IS_ENABLED (CONFIG_PREEMPT_RT ) && - !(work_flags &IRQ_WORK_HARD_IRQ )) - lazy_work = true; + !(work_flags &IRQ_WORK_HARD_IRQ )) + lazy_work = true;else lazy_work = false;
@@ -122,7 +122,6 @@ bool irq_work_queue_on(struct irq_work *work, int cpu)if (IS_ENABLED (CONFIG_PREEMPT_RT ) && !(atomic_read (&work->node.a_flags) &IRQ_WORK_HARD_IRQ )) {if (llist_add (&work->node.llist, &per_cpu (lazy_list, cpu))) -/* && tick_nohz_tick_stopped_cpu(cpu) */ arch_send_call_function_single_ipi (cpu); }else {__smp_call_single_queue (cpu, &work->node.llist);
@@ -143,9 +142,9 @@ bool irq_work_needs_cpu(void) raised =this_cpu_ptr (&raised_list); lazy =this_cpu_ptr (&lazy_list); - -if (llist_empty (raised) &&llist_empty (lazy)) -return false; +if (llist_empty (raised) ||arch_irq_work_has_interrupt ()) +if (llist_empty (lazy)) +return false;/* All work should have been flushed before going offline */ WARN_ON_ONCE (cpu_is_offline (smp_processor_id ()));
@@ -192,12 +191,12 @@ static void irq_work_run_list(struct llist_head *list)struct irq_work *work, *tmp;struct llist_node *llnode; -#ifndef CONFIG_PREEMPT_RT /* -* nort: On RT IRQ-work may run in SOFTIRQ context. +* On PREEMPT_RT IRQ-work may run in SOFTIRQ context if it is not marked +* explicitly that it needs to run in hardirq context. */ -BUG_ON (!irqs_disabled ()); -#endif +BUG_ON (!in_hardirq () && !IS_ENABLED (CONFIG_PREEMPT_RT )); +if (llist_empty (list))return ;
@@ -213,16 +212,10 @@ static void irq_work_run_list(struct llist_head *list)void irq_work_run (void ) {irq_work_run_list (this_cpu_ptr (&raised_list)); -if (IS_ENABLED (CONFIG_PREEMPT_RT )) { -/* -* NOTE: we raise softirq via IPI for safety, -* and execute in irq_work_tick() to move the -* overhead from hard to soft irq context. -*/ -if (!llist_empty (this_cpu_ptr (&lazy_list))) -raise_softirq (TIMER_SOFTIRQ ); - }else +if (!IS_ENABLED (CONFIG_PREEMPT_RT ))irq_work_run_list (this_cpu_ptr (&lazy_list)); +else if (!llist_empty (this_cpu_ptr (&lazy_list))) +raise_softirq (TIMER_SOFTIRQ ); }EXPORT_SYMBOL_GPL (irq_work_run);
kernel/sched/core.c +0 -1
@@ -4884,7 +4884,6 @@ static struct rq *finish_task_switch(struct task_struct *prev)* provided by mmdrop(), * - a sync_core for SYNC_CORE. */ -if (mm) {membarrier_mm_sync_core_before_usermode (mm);mmdrop_sched (mm);
kernel/sched/topology.c +0 -1
@@ -526,7 +526,6 @@ static int init_rootdomain(struct root_domain *rd)#ifdef HAVE_RT_PUSH_IPI rd->rto_cpu =-1 ;raw_spin_lock_init (&rd->rto_lock); -// init_irq_work(&rd->rto_push_work, rto_push_irq_work_func); rd->rto_push_work =IRQ_WORK_INIT_HARD (rto_push_irq_work_func);#endif
kernel/smp.c +0 -1
@@ -695,7 +695,6 @@ void flush_smp_call_function_from_idle(void)flush_smp_call_function_queue (true);if (local_softirq_pending ()) { -if (!IS_ENABLED (CONFIG_PREEMPT_RT )) {do_softirq (); }else {
lib/irq_poll.c +2 -5
@@ -37,7 +37,6 @@ void irq_poll_sched(struct irq_poll *iop)list_add_tail (&iop->list,this_cpu_ptr (&blk_cpu_iopoll));raise_softirq_irqoff (IRQ_POLL_SOFTIRQ );local_irq_restore (flags); -preempt_check_resched_rt (); }EXPORT_SYMBOL (irq_poll_sched);
@@ -73,7 +72,6 @@ void irq_poll_complete(struct irq_poll *iop)local_irq_save (flags);__irq_poll_complete (iop);local_irq_restore (flags); -preempt_check_resched_rt (); }EXPORT_SYMBOL (irq_poll_complete);
@@ -98,7 +96,6 @@ static void __latent_entropy irq_poll_softirq(struct softirq_action *h) }local_irq_enable (); -preempt_check_resched_rt ();/* Even though interrupts have been re-enabled, this * access is safe because interrupts can only add new
@@ -136,7 +133,6 @@ static void __latent_entropy irq_poll_softirq(struct softirq_action *h)__raise_softirq_irqoff (IRQ_POLL_SOFTIRQ );local_irq_enable (); -preempt_check_resched_rt (); }/**
@@ -195,12 +191,13 @@ static int irq_poll_cpu_dead(unsigned int cpu)* If a CPU goes away, splice its entries to the current CPU * and trigger a run of the softirq */ +local_bh_disable ();local_irq_disable ();list_splice_init (&per_cpu (blk_cpu_iopoll, cpu),this_cpu_ptr (&blk_cpu_iopoll));__raise_softirq_irqoff (IRQ_POLL_SOFTIRQ );local_irq_enable (); -preempt_check_resched_rt (); +local_bh_enable ();return 0 ; }
lib/scatterlist.c +3 -6
@@ -828,8 +828,7 @@ static bool sg_miter_get_next_page(struct sg_mapping_iter *miter)* stops @miter. * * Context: -* Don't care if @miter is stopped, or not proceeded yet. -* Otherwise, preemption disabled if the SG_MITER_ATOMIC is set. +* Don't care. * * Returns: * true if @miter contains the valid mapping. false if end of sg
@@ -865,8 +864,7 @@ EXPORT_SYMBOL(sg_miter_skip);* @miter->addr and @miter->length point to the current mapping. * * Context: -* Preemption disabled if SG_MITER_ATOMIC. Preemption must stay disabled -* till @miter is stopped. May sleep if !SG_MITER_ATOMIC. +* May sleep if !SG_MITER_ATOMIC. * * Returns: * true if @miter contains the next mapping. false if end of sg
@@ -906,8 +904,7 @@ EXPORT_SYMBOL(sg_miter_next);* need to be released during iteration. * * Context: -* Preemption disabled if the SG_MITER_ATOMIC is set. Don't care -* otherwise. +* Don't care otherwise. */ void sg_miter_stop (struct sg_mapping_iter *miter) {
localversion-rt +1 -1
@@ -1 +1 @@ --rt5 +-rt6
mm/zsmalloc.c +1 -2
@@ -379,7 +379,7 @@ static unsigned long cache_alloc_handle(struct zs_pool *pool, gfp_t gfp)#ifdef CONFIG_PREEMPT_RT static struct zsmalloc_handle *zs_get_pure_handle (unsigned long handle) { -return (void *)(handle &~((1 <<OBJ_TAG_BITS ) -1 )); +return (void *)(handle & ~((1 <<OBJ_TAG_BITS ) -1 )); }#endif
@@ -495,7 +495,6 @@ MODULE_ALIAS("zpool-zsmalloc");/* per-cpu VM mapping areas for zspage accesses that cross page boundaries */ static DEFINE_PER_CPU(struct mapping_area, zs_map_area) = { -/* XXX remove this and use a spin_lock_t in pin_tag() */ .lock =INIT_LOCAL_LOCK (lock), };
net/bridge/br_multicast.c +2 -4
@@ -1677,8 +1677,6 @@ static void br_multicast_update_querier(struct net_bridge_mcast *brmctx,int ifindex, struct br_ip *saddr) { - lockdep_assert_held_once(&brmctx->br->multicast_lock); - write_seqcount_begin(&querier->seq); querier->port_ifidx = ifindex;memcpy (&querier->addr, saddr,sizeof (*saddr));
@@ -3867,13 +3865,13 @@ void br_multicast_ctx_init(struct net_bridge *br, brmctx->ip4_other_query.delay_time =0 ; brmctx->ip4_querier.port_ifidx =0 ; -seqcount_init (&brmctx->ip4_querier.seq); +seqcount_spinlock_init (&brmctx->ip4_querier.seq, &br->multicast_lock); brmctx->multicast_igmp_version =2 ;#if IS_ENABLED (CONFIG_IPV6 ) brmctx->multicast_mld_version =1 ; brmctx->ip6_other_query.delay_time =0 ; brmctx->ip6_querier.port_ifidx =0 ; -seqcount_init (&brmctx->ip6_querier.seq); +seqcount_spinlock_init (&brmctx->ip6_querier.seq, &br->multicast_lock);#endif timer_setup(&brmctx->ip4_mc_router_timer,
net/bridge/br_private.h +1 -1
@@ -82,7 +82,7 @@ struct bridge_mcast_other_query {struct bridge_mcast_querier {struct br_ip addr;int port_ifidx; -seqcount_t seq; +seqcount_spinlock_t seq; };/* IGMP/MLD statistics */