From 4afe74fcfdc2b10867fb8d46e3f7c1af040ce4f2 Mon Sep 17 00:00:00 2001 From: Mel Gorman Date: Jun 30 2021 07:05:19 +0000 Subject: Merge remote-tracking branch 'origin/users/dwagner/SLE15-SP3-RT/for-next' into SLE15-SP3-RT-bsc1187834 --- diff --git a/patches.suse/net-Treat-__napi_schedule_irqoff-as-__napi_schedule-.patch b/patches.suse/net-Treat-__napi_schedule_irqoff-as-__napi_schedule-.patch new file mode 100644 index 0000000..7c6b773 --- /dev/null +++ b/patches.suse/net-Treat-__napi_schedule_irqoff-as-__napi_schedule-.patch @@ -0,0 +1,59 @@ +From: Sebastian Andrzej Siewior +Date: Wed, 12 May 2021 23:43:24 +0200 +Subject: net: Treat __napi_schedule_irqoff() as __napi_schedule() on + PREEMPT_RT +Patch-mainline: Queued in subsystem maintainer repository +Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git +Git-commit: 8380c81d5c4fced6f4397795a5ae65758272bbfd +References: bsc1187834 + +__napi_schedule_irqoff() is an optimized version of __napi_schedule() +which can be used where it is known that interrupts are disabled, +e.g. in interrupt-handlers, spin_lock_irq() sections or hrtimer +callbacks. + +On PREEMPT_RT enabled kernels this assumptions is not true. Force- +threaded interrupt handlers and spinlocks are not disabling interrupts +and the NAPI hrtimer callback is forced into softirq context which runs +with interrupts enabled as well. + +Chasing all usage sites of __napi_schedule_irqoff() is a whack-a-mole +game so make __napi_schedule_irqoff() invoke __napi_schedule() for +PREEMPT_RT kernels. + +The callers of ____napi_schedule() in the networking core have been +audited and are correct on PREEMPT_RT kernels as well. + +Reported-by: Juri Lelli +Signed-off-by: Sebastian Andrzej Siewior +Reviewed-by: Thomas Gleixner +Reviewed-by: Juri Lelli +Signed-off-by: David S. Miller +Acked-by: Daniel Wagner +--- + net/core/dev.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +--- a/net/core/dev.c ++++ b/net/core/dev.c +@@ -6355,11 +6355,18 @@ EXPORT_SYMBOL(napi_schedule_prep); + * __napi_schedule_irqoff - schedule for receive + * @n: entry to schedule + * +- * Variant of __napi_schedule() assuming hard irqs are masked ++ * Variant of __napi_schedule() assuming hard irqs are masked. ++ * ++ * On PREEMPT_RT enabled kernels this maps to __napi_schedule() ++ * because the interrupt disabled assumption might not be true ++ * due to force-threaded interrupts and spinlock substitution. + */ + void __napi_schedule_irqoff(struct napi_struct *n) + { +- ____napi_schedule(this_cpu_ptr(&softnet_data), n); ++ if (!IS_ENABLED(CONFIG_PREEMPT_RT)) ++ ____napi_schedule(this_cpu_ptr(&softnet_data), n); ++ else ++ __napi_schedule(n); + } + EXPORT_SYMBOL(__napi_schedule_irqoff); + diff --git a/series.conf b/series.conf index d29d46b..7c3fb4d 100644 --- a/series.conf +++ b/series.conf @@ -49647,6 +49647,7 @@ patches.suse/x86-fpu-prevent-state-corruption-in-_fpu__restore_sig.patch # netdev/net-next + patches.suse/net-Treat-__napi_schedule_irqoff-as-__napi_schedule-.patch patches.suse/ibmvnic-remove-default-label-from-to_string-switch.patch # jejb/scsi for-next