sched/rtmutex: Refactor rt_mutex_setprio()
authorPeter Zijlstra <peterz@infradead.org>
Thu, 23 Mar 2017 14:56:11 +0000 (15:56 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 4 Apr 2017 09:44:06 +0000 (11:44 +0200)
commitacd58620e415aee4a43a808d7d2fd87259ee0001
treeb0971a53edac32523a6b99b4bd5f15200041634e
parentaa2bfe55366552cb7e93e8709d66e698d79ccc47
sched/rtmutex: Refactor rt_mutex_setprio()

With the introduction of SCHED_DEADLINE the whole notion that priority
is a single number is gone, therefore the @prio argument to
rt_mutex_setprio() doesn't make sense anymore.

So rework the code to pass a pi_task instead.

Note this also fixes a problem with pi_top_task caching; previously we
would not set the pointer (call rt_mutex_update_top_task) if the
priority didn't change, this could lead to a stale pointer.

As for the XXX, I think its fine to use pi_task->prio, because if it
differs from waiter->prio, a PI chain update is immenent.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: juri.lelli@arm.com
Cc: bigeasy@linutronix.de
Cc: xlpang@redhat.com
Cc: rostedt@goodmis.org
Cc: mathieu.desnoyers@efficios.com
Cc: jdesfossez@efficios.com
Cc: bristot@redhat.com
Link: http://lkml.kernel.org/r/20170323150216.303827095@infradead.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/linux/sched/rt.h
kernel/locking/rtmutex.c
kernel/sched/core.c