diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2018-09-11 11:02:49 +0200 |
---|---|---|
committer | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2018-09-11 11:02:49 +0200 |
commit | 90219467126d0db69d146b589cf9e1f3cf02b3ad (patch) | |
tree | e49ab0f0f2af4db73daeb9aa05d7308f4ab76e70 | |
parent | 081834c311f2a7e54949e24e5c83fee5567e3823 (diff) | |
download | linux-rt-90219467126d0db69d146b589cf9e1f3cf02b3ad.tar.gz |
[ANNOUNCE] v4.18.7-rt5v4.18.7-rt5-patches
Dear RT folks!
I'm pleased to announce the v4.18.7-rt5 patch set.
Changes since v4.18.7-rt4:
- Avoid a memory allocation with disabled interrupts in the "cached
device tree" code
- Avoid queuing a work item with disabled preemption in the "srcu"
code.
- The simple-work queue code used a constant shifted by zero. This is
reported by smack as an error because it should have been a plain
number (in function it is used). Reported by Dan Carpenter.
Known issues
- A warning triggered in "rcu_note_context_switch" originated from
SyS_timer_gettime(). The issue was always there, it is now
visible. Reported by Grygorii Strashko and Daniel Wagner.
The delta patch against v4.18.7-rt4 is appended below and can be found here:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/4.18/incr/patch-4.18.7-rt4-rt5.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 v4.18.7-rt5
The RT patch against v4.18.7 can be found here:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patch-4.18.7-rt5.patch.xz
The split quilt queue is available at:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz
Sebastian
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
10 files changed, 170 insertions, 6 deletions
diff --git a/patches/efi-Allow-efi-runtime.patch b/patches/efi-Allow-efi-runtime.patch index a7ec961bd4b8..a700ca2dbb67 100644 --- a/patches/efi-Allow-efi-runtime.patch +++ b/patches/efi-Allow-efi-runtime.patch @@ -1,4 +1,3 @@ -From 667af2f3d8ccf947fe7c9dac0b59b175963163ba Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 26 Jul 2018 15:06:10 +0200 Subject: [PATCH] efi: Allow efi=runtime diff --git a/patches/fscache-initialize-cookie-hash-table-raw-spinlocks.patch b/patches/fscache-initialize-cookie-hash-table-raw-spinlocks.patch index a47b6ee7cabd..e9fe577eb752 100644 --- a/patches/fscache-initialize-cookie-hash-table-raw-spinlocks.patch +++ b/patches/fscache-initialize-cookie-hash-table-raw-spinlocks.patch @@ -1,4 +1,3 @@ -From 0277aff2b41aef9e2a6bd716ee0076036881334d Mon Sep 17 00:00:00 2001 From: Clark Williams <williams@redhat.com> Date: Tue, 3 Jul 2018 13:34:30 -0500 Subject: [PATCH] fscache: initialize cookie hash table raw spinlocks diff --git a/patches/irqchip-gic-v3-its-Move-pending-table-allocation-to-.patch b/patches/irqchip-gic-v3-its-Move-pending-table-allocation-to-.patch index f68f93c5512c..20b2bab359bf 100644 --- a/patches/irqchip-gic-v3-its-Move-pending-table-allocation-to-.patch +++ b/patches/irqchip-gic-v3-its-Move-pending-table-allocation-to-.patch @@ -1,4 +1,3 @@ -From 111e6bab739e34e1af72a6248e452ad85f2d216d Mon Sep 17 00:00:00 2001 From: Marc Zyngier <marc.zyngier@arm.com> Date: Fri, 27 Jul 2018 13:38:54 +0100 Subject: [PATCH] irqchip/gic-v3-its: Move pending table allocation to init diff --git a/patches/localversion.patch b/patches/localversion.patch index 03a80b8b0e80..72cdd2b3c760 100644 --- a/patches/localversion.patch +++ b/patches/localversion.patch @@ -10,4 +10,4 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- /dev/null +++ b/localversion-rt @@ -0,0 +1 @@ -+-rt4 ++-rt5 diff --git a/patches/of-allocate-free-phandle-cache-outside-of-the-devtre.patch b/patches/of-allocate-free-phandle-cache-outside-of-the-devtre.patch new file mode 100644 index 000000000000..2a477a101630 --- /dev/null +++ b/patches/of-allocate-free-phandle-cache-outside-of-the-devtre.patch @@ -0,0 +1,77 @@ +From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Fri, 31 Aug 2018 14:16:30 +0200 +Subject: [PATCH] of: allocate / free phandle cache outside of the devtree_lock + +The phandle cache code allocates memory while holding devtree_lock which +is a raw_spinlock_t. Memory allocation (and free()) is not possible on +RT while a raw_spinlock_t is held. +Invoke the kfree() and kcalloc() while the lock is dropped. + +Cc: Rob Herring <robh+dt@kernel.org> +Cc: Frank Rowand <frowand.list@gmail.com> +Cc: devicetree@vger.kernel.org +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + drivers/of/base.c | 22 ++++++++++++++-------- + 1 file changed, 14 insertions(+), 8 deletions(-) + +--- a/drivers/of/base.c ++++ b/drivers/of/base.c +@@ -108,43 +108,49 @@ void of_populate_phandle_cache(void) + u32 cache_entries; + struct device_node *np; + u32 phandles = 0; ++ struct device_node **shadow; + + raw_spin_lock_irqsave(&devtree_lock, flags); +- +- kfree(phandle_cache); ++ shadow = phandle_cache; + phandle_cache = NULL; + + for_each_of_allnodes(np) + if (np->phandle && np->phandle != OF_PHANDLE_ILLEGAL) + phandles++; + ++ raw_spin_unlock_irqrestore(&devtree_lock, flags); ++ + cache_entries = roundup_pow_of_two(phandles); + phandle_cache_mask = cache_entries - 1; + +- phandle_cache = kcalloc(cache_entries, sizeof(*phandle_cache), +- GFP_ATOMIC); +- if (!phandle_cache) +- goto out; ++ kfree(shadow); ++ shadow = kcalloc(cache_entries, sizeof(*phandle_cache), GFP_KERNEL); ++ ++ if (!shadow) ++ return; ++ raw_spin_lock_irqsave(&devtree_lock, flags); ++ phandle_cache = shadow; + + for_each_of_allnodes(np) + if (np->phandle && np->phandle != OF_PHANDLE_ILLEGAL) + phandle_cache[np->phandle & phandle_cache_mask] = np; + +-out: + raw_spin_unlock_irqrestore(&devtree_lock, flags); + } + + int of_free_phandle_cache(void) + { + unsigned long flags; ++ struct device_node **shadow; + + raw_spin_lock_irqsave(&devtree_lock, flags); + +- kfree(phandle_cache); ++ shadow = phandle_cache; + phandle_cache = NULL; + + raw_spin_unlock_irqrestore(&devtree_lock, flags); + ++ kfree(shadow); + return 0; + } + #if !defined(CONFIG_MODULES) diff --git a/patches/random-Remove-preempt-disabled-region.patch b/patches/random-Remove-preempt-disabled-region.patch index 03f604723c69..31d91dfc3fcb 100644 --- a/patches/random-Remove-preempt-disabled-region.patch +++ b/patches/random-Remove-preempt-disabled-region.patch @@ -1,4 +1,3 @@ -From 20690515ca3fd9baa92a3c915c74b14290fef13c Mon Sep 17 00:00:00 2001 From: Ingo Molnar <mingo@elte.hu> Date: Fri, 3 Jul 2009 08:29:30 -0500 Subject: [PATCH] random: Remove preempt disabled region diff --git a/patches/rcu-Use-cpus_read_lock-while-looking-at-cpu_online_m.patch b/patches/rcu-Use-cpus_read_lock-while-looking-at-cpu_online_m.patch new file mode 100644 index 000000000000..9401234fd536 --- /dev/null +++ b/patches/rcu-Use-cpus_read_lock-while-looking-at-cpu_online_m.patch @@ -0,0 +1,60 @@ +From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Mon, 10 Sep 2018 14:58:37 +0200 +Subject: [PATCH] rcu: Use cpus_read_lock() while looking at cpu_online_mask + +It was possible that sync_rcu_exp_select_cpus() enqueued something on +CPU0 while CPU0 was offline. Such a work item wouldn't be processed +until CPU0 gets back online. This problem was addressed in commit +fcc6354365015 ("rcu: Make expedited GPs handle CPU 0 being offline"). I +don't think the issue fully addressed. + +Assume grplo = 0 and grphi = 7 and sync_rcu_exp_select_cpus() is invoked +on CPU1. The preempt_disable() section on CPU1 won't ensure that CPU0 +remains online between looking at cpu_online_mask and invoking +queue_work_on() on CPU1. + +Use cpus_read_lock() to ensure that `cpu' is not going down between +looking at cpu_online_mask at invoking queue_work_on() and waiting for +its completion. It is added around the loop + flush_work() which is +similar to work_on_cpu_safe() (and we can have multiple jobs running on +NUMA systems). + +Fixes: fcc6354365015 ("rcu: Make expedited GPs handle CPU 0 being + offline") +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + kernel/rcu/tree_exp.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/kernel/rcu/tree_exp.h ++++ b/kernel/rcu/tree_exp.h +@@ -479,6 +479,7 @@ static void sync_rcu_exp_select_cpus(str + sync_exp_reset_tree(rsp); + trace_rcu_exp_grace_period(rsp->name, rcu_exp_gp_seq_endval(rsp), TPS("select")); + ++ cpus_read_lock(); + /* Schedule work for each leaf rcu_node structure. */ + rcu_for_each_leaf_node(rsp, rnp) { + rnp->exp_need_flush = false; +@@ -493,13 +494,11 @@ static void sync_rcu_exp_select_cpus(str + continue; + } + INIT_WORK(&rnp->rew.rew_work, sync_rcu_exp_select_node_cpus); +- preempt_disable(); + cpu = cpumask_next(rnp->grplo - 1, cpu_online_mask); + /* If all offline, queue the work on an unbound CPU. */ + if (unlikely(cpu > rnp->grphi)) + cpu = WORK_CPU_UNBOUND; + queue_work_on(cpu, rcu_par_gp_wq, &rnp->rew.rew_work); +- preempt_enable(); + rnp->exp_need_flush = true; + } + +@@ -507,6 +506,7 @@ static void sync_rcu_exp_select_cpus(str + rcu_for_each_leaf_node(rsp, rnp) + if (rnp->exp_need_flush) + flush_work(&rnp->rew.rew_work); ++ cpus_read_unlock(); + } + + static void synchronize_sched_expedited_wait(struct rcu_state *rsp) diff --git a/patches/sched-Allow-pinned-user-tasks-to-be-awakened-to-the-.patch b/patches/sched-Allow-pinned-user-tasks-to-be-awakened-to-the-.patch index d5fb1f398d04..070b32a3a09c 100644 --- a/patches/sched-Allow-pinned-user-tasks-to-be-awakened-to-the-.patch +++ b/patches/sched-Allow-pinned-user-tasks-to-be-awakened-to-the-.patch @@ -1,4 +1,3 @@ -From b3dac61f924ec6d4cc4c1e08498f80a88e6a6c69 Mon Sep 17 00:00:00 2001 From: Mike Galbraith <efault@gmx.de> Date: Sun, 19 Aug 2018 08:28:35 +0200 Subject: [PATCH] sched: Allow pinned user tasks to be awakened to the CPU they diff --git a/patches/series b/patches/series index 56d092ccbb98..41df8ad05f43 100644 --- a/patches/series +++ b/patches/series @@ -56,6 +56,7 @@ arm-unwind-use_raw_lock.patch cgroup-use-irqsave-in-cgroup_rstat_flush_locked.patch fscache-initialize-cookie-hash-table-raw-spinlocks.patch Drivers-hv-vmbus-include-header-for-get_irq_regs.patch +rcu-Use-cpus_read_lock-while-looking-at-cpu_online_m.patch ############################################################ # Ready for posting @@ -71,6 +72,7 @@ efi-Allow-efi-runtime.patch ############################################################ x86-efi-drop-task_lock-from-efi_switch_mm.patch arm64-KVM-compute_layout-before-altenates-are-applie.patch +of-allocate-free-phandle-cache-outside-of-the-devtre.patch ############################################################### # Stuff broken upstream and upstream wants something different @@ -193,6 +195,7 @@ x86-kvm-require-const-tsc-for-rt.patch pci-switchtec-Don-t-use-completion-s-wait-queue.patch wait.h-include-atomic.h.patch work-simple-Simple-work-queue-implemenation.patch +work-simple-drop-a-shit-statement-in-SWORK_EVENT_PEN.patch completion-use-simple-wait-queues.patch fs-aio-simple-simple-work.patch genirq-do-not-invoke-the-affinity-callback-via-a-wor.patch diff --git a/patches/work-simple-drop-a-shit-statement-in-SWORK_EVENT_PEN.patch b/patches/work-simple-drop-a-shit-statement-in-SWORK_EVENT_PEN.patch new file mode 100644 index 000000000000..28dcceea5c58 --- /dev/null +++ b/patches/work-simple-drop-a-shit-statement-in-SWORK_EVENT_PEN.patch @@ -0,0 +1,29 @@ +From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Mon, 10 Sep 2018 18:00:31 +0200 +Subject: [PATCH] work-simple: drop a shit statement in SWORK_EVENT_PENDING + +Dan Carpenter reported +| smatch warnings: +|kernel/sched/swork.c:63 swork_kthread() warn: test_bit() takes a bit number + +This is not a bug because we shift by zero (and use the same value in +both places). +Nevertheless I'm dropping that shift by zero to keep smatch quiet. + +Cc: Daniel Wagner <daniel.wagner@siemens.com> +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + kernel/sched/swork.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/kernel/sched/swork.c ++++ b/kernel/sched/swork.c +@@ -12,7 +12,7 @@ + #include <linux/spinlock.h> + #include <linux/export.h> + +-#define SWORK_EVENT_PENDING (1 << 0) ++#define SWORK_EVENT_PENDING 1 + + static DEFINE_MUTEX(worker_mutex); + static struct sworker *glob_worker; |