]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Jul 2018 16:49:02 +0000 (18:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Jul 2018 16:49:02 +0000 (18:49 +0200)
added patches:
sched-tracing-fix-trace_sched_pi_setprio-for-deboosting.patch

queue-4.14/sched-tracing-fix-trace_sched_pi_setprio-for-deboosting.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/sched-tracing-fix-trace_sched_pi_setprio-for-deboosting.patch b/queue-4.14/sched-tracing-fix-trace_sched_pi_setprio-for-deboosting.patch
new file mode 100644 (file)
index 0000000..f50fbef
--- /dev/null
@@ -0,0 +1,59 @@
+From 4ff648decf4712d39f184fc2df3163f43975575a Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Thu, 24 May 2018 15:26:48 +0200
+Subject: sched, tracing: Fix trace_sched_pi_setprio() for deboosting
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+
+commit 4ff648decf4712d39f184fc2df3163f43975575a upstream.
+
+Since the following commit:
+
+  b91473ff6e97 ("sched,tracing: Update trace_sched_pi_setprio()")
+
+the sched_pi_setprio trace point shows the "newprio" during a deboost:
+
+  |futex sched_pi_setprio: comm=futex_requeue_p pid"34 oldprio\98 newprio=3D98
+  |futex sched_switch: prev_comm=futex_requeue_p prev_pid"34 prev_prio=120
+
+This patch open codes __rt_effective_prio() in the tracepoint as the
+'newprio' to get the old behaviour back / the correct priority:
+
+  |futex sched_pi_setprio: comm=futex_requeue_p pid"20 oldprio\98 newprio=3D120
+  |futex sched_switch: prev_comm=futex_requeue_p prev_pid"20 prev_prio=120
+
+Peter suggested to open code the new priority so people using tracehook
+could get the deadline data out.
+
+Reported-by: Mansky Christian <man@keba.com>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Steven Rostedt <rostedt@goodmis.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Fixes: b91473ff6e97 ("sched,tracing: Update trace_sched_pi_setprio()")
+Link: http://lkml.kernel.org/r/20180524132647.gg6ziuogczdmjjzu@linutronix.de
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ include/trace/events/sched.h |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/include/trace/events/sched.h
++++ b/include/trace/events/sched.h
+@@ -435,7 +435,9 @@ TRACE_EVENT(sched_pi_setprio,
+               memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN);
+               __entry->pid            = tsk->pid;
+               __entry->oldprio        = tsk->prio;
+-              __entry->newprio        = pi_task ? pi_task->prio : tsk->prio;
++              __entry->newprio        = pi_task ?
++                              min(tsk->normal_prio, pi_task->prio) :
++                              tsk->normal_prio;
+               /* XXX SCHED_DEADLINE bits missing */
+       ),
index 47e4d9d463010c9ad660757e7fa4489f8b76d3c0..645c964f2b775a4387edcfbad89811486f2b3c79 100644 (file)
@@ -49,3 +49,4 @@ mtd-cfi_cmdset_0002-change-erase-functions-to-retry-for-error.patch
 mtd-cfi_cmdset_0002-change-erase-functions-to-check-chip-good-only.patch
 netfilter-nf_log-don-t-hold-nf_log_mutex-during-user-access.patch
 staging-comedi-quatech_daqp_cs-fix-no-op-loop-daqp_ao_insn_write.patch
+sched-tracing-fix-trace_sched_pi_setprio-for-deboosting.patch