Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1348205 > unrolled thread
| Started by | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| First post | 2016-03-02 16:50 +0100 |
| Last post | 2016-03-02 16:50 +0100 |
| Articles | 5 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH RT 00/20] Linux 3.18.27-rt27-rc1 Steven Rostedt <rostedt@goodmis.org> - 2016-03-02 16:50 +0100
[PATCH RT 12/20] tick/broadcast: Make broadcast hrtimer irqsafe Steven Rostedt <rostedt@goodmis.org> - 2016-03-02 16:50 +0100
[PATCH RT 01/20] sched: reset tasks lockless wake-queues on fork() Steven Rostedt <rostedt@goodmis.org> - 2016-03-02 16:50 +0100
[PATCH RT 04/20] preempt-lazy: Add the lazy-preemption check to preempt_schedule() Steven Rostedt <rostedt@goodmis.org> - 2016-03-02 16:50 +0100
[PATCH RT 09/20] kernel: migrate_disable() do fastpath in atomic & irqs-off Steven Rostedt <rostedt@goodmis.org> - 2016-03-02 16:50 +0100
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Date | 2016-03-02 16:50 +0100 |
| Subject | [PATCH RT 00/20] Linux 3.18.27-rt27-rc1 |
| Message-ID | <r8h2y-18n-7@gated-at.bofh.it> |
Dear RT Folks,
This is the RT stable review cycle of patch 3.18.27-rt27-rc1.
Please scream at me if I messed something up. Please test the patches too.
The -rc release will be uploaded to kernel.org and will be deleted when
the final release is out. This is just a review release (or release candidate).
The pre-releases will not be pushed to the git repository, only the
final release is.
If all goes well, this patch will be converted to the next main release
on 3/7/2016.
Enjoy,
-- Steve
To build 3.18.27-rt27-rc1 directly, the following patches should be applied:
http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.18.tar.xz
http://www.kernel.org/pub/linux/kernel/v3.x/patch-3.18.27.xz
http://www.kernel.org/pub/linux/kernel/projects/rt/3.18/patch-3.18.27-rt27-rc1.patch.xz
You can also build from 3.18.27-rt26 by applying the incremental patch:
http://www.kernel.org/pub/linux/kernel/projects/rt/3.18/incr/patch-3.18.27-rt26-rt27-rc1.patch.xz
Changes from 3.18.27-rt26:
---
Clark Williams (1):
rcu/torture: Comment out rcu_bh ops on PREEMPT_RT_FULL
Mike Galbraith (3):
sched,rt: __always_inline preemptible_lazy()
drm,radeon,i915: Use preempt_disable/enable_rt() where recommended
drm,i915: Use local_lock/unlock_irq() in intel_pipe_update_start/end()
Sebastian Andrzej Siewior (11):
sched: reset task's lockless wake-queues on fork()
ptrace: don't open IRQs in ptrace_freeze_traced() too early
net: move xmit_recursion to per-task variable on -RT
preempt-lazy: Add the lazy-preemption check to preempt_schedule()
softirq: split timer softirqs out of ksoftirqd
net: provide a way to delegate processing a softirq to ksoftirqd
latencyhist: disable jump-labels
kernel: migrate_disable() do fastpath in atomic & irqs-off
kernel: softirq: unlock with irqs on
kernel/stop_machine: partly revert "stop_machine: Use raw spinlocks"
kernel: sched: Fix preempt_disable_ip recodring for preempt_disable()
Steven Rostedt (Red Hat) (1):
Linux 3.18.27-rt27-rc1
Thomas Gleixner (1):
tick/broadcast: Make broadcast hrtimer irqsafe
Yang Shi (3):
arm64: replace read_lock to rcu lock in call_step_hook
trace: Use rcuidle version for preemptoff_hist trace point
f2fs: Mutex can't be used by down_write_nest_lock()
----
arch/Kconfig | 1 +
arch/arm64/kernel/debug-monitors.c | 21 +++---
drivers/gpu/drm/i915/i915_irq.c | 2 +
drivers/gpu/drm/i915/intel_sprite.c | 11 ++--
drivers/gpu/drm/radeon/radeon_display.c | 2 +
fs/f2fs/f2fs.h | 4 +-
include/linux/ftrace.h | 12 ++++
include/linux/interrupt.h | 8 +++
include/linux/netdevice.h | 9 +++
include/linux/sched.h | 3 +-
include/trace/events/hist.h | 1 +
kernel/fork.c | 1 +
kernel/ptrace.c | 6 +-
kernel/rcu/rcutorture.c | 7 ++
kernel/sched/core.c | 52 ++++++++-------
kernel/softirq.c | 112 ++++++++++++++++++++++++++++----
kernel/stop_machine.c | 40 +++---------
kernel/time/tick-broadcast-hrtimer.c | 1 +
kernel/trace/trace_irqsoff.c | 8 +--
localversion-rt | 2 +-
net/core/dev.c | 43 ++++++++++--
21 files changed, 249 insertions(+), 97 deletions(-)
[toc] | [next] | [standalone]
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Date | 2016-03-02 16:50 +0100 |
| Subject | [PATCH RT 12/20] tick/broadcast: Make broadcast hrtimer irqsafe |
| Message-ID | <r8hcg-1c4-57@gated-at.bofh.it> |
| In reply to | #1348205 |
3.18.27-rt27-rc1 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Thomas Gleixner <tglx@linutronix.de>
Otherwise we end up with the following:
|=================================
|[ INFO: inconsistent lock state ]
|4.4.2-rt7+ #5 Not tainted
|---------------------------------
|inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage.
|ktimersoftd/0/4 [HC0[0]:SC0[0]:HE1:SE1] takes:
| (tick_broadcast_lock){?.....}, at: [<ffffffc000150db4>] tick_handle_oneshot_broadcast+0x58/0x27c
|{IN-HARDIRQ-W} state was registered at:
| [<ffffffc000118198>] mark_lock+0x19c/0x6a0
| [<ffffffc000119728>] __lock_acquire+0xb1c/0x2100
| [<ffffffc00011b560>] lock_acquire+0xf8/0x230
| [<ffffffc00061bf08>] _raw_spin_lock_irqsave+0x50/0x68
| [<ffffffc000152188>] tick_broadcast_switch_to_oneshot+0x20/0x60
| [<ffffffc0001529f4>] tick_switch_to_oneshot+0x64/0xd8
| [<ffffffc000152b00>] tick_init_highres+0x1c/0x24
| [<ffffffc000141e58>] hrtimer_run_queues+0x78/0x100
| [<ffffffc00013f804>] update_process_times+0x38/0x74
| [<ffffffc00014fc5c>] tick_periodic+0x60/0x140
| [<ffffffc00014fd68>] tick_handle_periodic+0x2c/0x94
| [<ffffffc00052b878>] arch_timer_handler_phys+0x3c/0x48
| [<ffffffc00012d078>] handle_percpu_devid_irq+0x100/0x390
| [<ffffffc000127f34>] generic_handle_irq+0x34/0x4c
| [<ffffffc000128300>] __handle_domain_irq+0x90/0xf8
| [<ffffffc000082554>] gic_handle_irq+0x5c/0xa4
| [<ffffffc0000855ac>] el1_irq+0x6c/0xec
| [<ffffffc000112bec>] default_idle_call+0x2c/0x44
| [<ffffffc000113058>] cpu_startup_entry+0x3cc/0x410
| [<ffffffc0006169f8>] rest_init+0x158/0x168
| [<ffffffc000888954>] start_kernel+0x3a0/0x3b4
| [<0000000080621000>] 0x80621000
|irq event stamp: 18723
|hardirqs last enabled at (18723): [<ffffffc00061c188>] _raw_spin_unlock_irq+0x38/0x80
|hardirqs last disabled at (18722): [<ffffffc000140a4c>] run_hrtimer_softirq+0x2c/0x2f4
|softirqs last enabled at (0): [<ffffffc0000c4744>] copy_process.isra.50+0x300/0x16d4
|softirqs last disabled at (0): [< (null)>] (null)
Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/time/tick-broadcast-hrtimer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/time/tick-broadcast-hrtimer.c b/kernel/time/tick-broadcast-hrtimer.c
index 6aac4beedbbe..943c03395e46 100644
--- a/kernel/time/tick-broadcast-hrtimer.c
+++ b/kernel/time/tick-broadcast-hrtimer.c
@@ -109,5 +109,6 @@ void tick_setup_hrtimer_broadcast(void)
{
hrtimer_init(&bctimer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
bctimer.function = bc_handler;
+ bctimer.irqsafe = true;
clockevents_register_device(&ce_broadcast_hrtimer);
}
--
2.7.0
[toc] | [prev] | [next] | [standalone]
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Date | 2016-03-02 16:50 +0100 |
| Subject | [PATCH RT 01/20] sched: reset tasks lockless wake-queues on fork() |
| Message-ID | <r8hch-1c4-65@gated-at.bofh.it> |
| In reply to | #1348205 |
3.18.27-rt27-rc1 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
In 7675104990ed ("sched: Implement lockless wake-queues") we gained
lockless wake-queues. -RT managed to lockup itself with those. There
could be multiple attempts for task X to enqueue it for a wakeup
_even_ if task X is already running.
The reason is that task X could be runnable but not yet on CPU. The the
task performing the wakeup did not leave the CPU it could performe
multiple wakeups.
With the proper timming task X could be running and enqueued for a
wakeup. If this happens while X is performing a fork() then its its
child will have a !NULL `wake_q` member copied.
This is not a problem as long as the child task does not participate in
lockless wakeups :)
Fixes: 7675104990ed ("sched: Implement lockless wake-queues")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/fork.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/fork.c b/kernel/fork.c
index 3a8ecfb38831..1c4edaf4ec36 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -364,6 +364,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
#endif
tsk->splice_pipe = NULL;
tsk->task_frag.page = NULL;
+ tsk->wake_q.next = NULL;
account_kernel_stack(ti, 1);
--
2.7.0
[toc] | [prev] | [next] | [standalone]
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Date | 2016-03-02 16:50 +0100 |
| Subject | [PATCH RT 04/20] preempt-lazy: Add the lazy-preemption check to preempt_schedule() |
| Message-ID | <r8hch-1c4-77@gated-at.bofh.it> |
| In reply to | #1348205 |
3.18.27-rt27-rc1 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Probably in the rebase onto v4.1 this check got moved into less commonly used
preempt_schedule_notrace(). This patch ensures that both functions use it.
Reported-by: Mike Galbraith <umgwanakikbuti@gmail.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/sched/core.c | 34 ++++++++++++++++++++++++++--------
1 file changed, 26 insertions(+), 8 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 9e01a8f358f8..8214206817f2 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3164,6 +3164,30 @@ void __sched schedule_preempt_disabled(void)
preempt_disable();
}
+#ifdef CONFIG_PREEMPT_LAZY
+/*
+ * If TIF_NEED_RESCHED is then we allow to be scheduled away since this is
+ * set by a RT task. Oterwise we try to avoid beeing scheduled out as long as
+ * preempt_lazy_count counter >0.
+ */
+static int preemptible_lazy(void)
+{
+ if (test_thread_flag(TIF_NEED_RESCHED))
+ return 1;
+ if (current_thread_info()->preempt_lazy_count)
+ return 0;
+ return 1;
+}
+
+#else
+
+static int preemptible_lazy(void)
+{
+ return 1;
+}
+
+#endif
+
#ifdef CONFIG_PREEMPT
/*
* this is the entry point to schedule() from in-kernel preemption
@@ -3178,15 +3202,9 @@ asmlinkage __visible void __sched notrace preempt_schedule(void)
*/
if (likely(!preemptible()))
return;
-
-#ifdef CONFIG_PREEMPT_LAZY
- /*
- * Check for lazy preemption
- */
- if (current_thread_info()->preempt_lazy_count &&
- !test_thread_flag(TIF_NEED_RESCHED))
+ if (!preemptible_lazy())
return;
-#endif
+
do {
__preempt_count_add(PREEMPT_ACTIVE);
/*
--
2.7.0
[toc] | [prev] | [next] | [standalone]
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Date | 2016-03-02 16:50 +0100 |
| Subject | [PATCH RT 09/20] kernel: migrate_disable() do fastpath in atomic & irqs-off |
| Message-ID | <r8hch-1c4-79@gated-at.bofh.it> |
| In reply to | #1348205 |
3.18.27-rt27-rc1 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
With interrupts off it makes no sense to do the long path since we can't
leave the CPU anyway. Also we might end up in a recursion with lockdep.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/sched/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 8214206817f2..24c7ced53555 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2859,7 +2859,7 @@ void migrate_disable(void)
{
struct task_struct *p = current;
- if (in_atomic()) {
+ if (in_atomic() || irqs_disabled()) {
#ifdef CONFIG_SCHED_DEBUG
p->migrate_disable_atomic++;
#endif
@@ -2893,7 +2893,7 @@ void migrate_enable(void)
unsigned long flags;
struct rq *rq;
- if (in_atomic()) {
+ if (in_atomic() || irqs_disabled()) {
#ifdef CONFIG_SCHED_DEBUG
p->migrate_disable_atomic--;
#endif
--
2.7.0
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web