]> git.baikalelectronics.ru Git - kernel.git/commit
sched/deadline: Fix the earliest_dl.next logic
authorWanpeng Li <kernellwp@gmail.com>
Thu, 3 Dec 2015 09:42:10 +0000 (17:42 +0800)
committerIngo Molnar <mingo@kernel.org>
Wed, 6 Jan 2016 10:05:56 +0000 (11:05 +0100)
commitdc83713a58842b39478dab80501a1411e265b1da
treed94027b610ef0795ec1f31d4148e32d7d14bcd7e
parent6521015f07f075a6a4c36252a18b23bd4f8d1bb0
sched/deadline: Fix the earliest_dl.next logic

earliest_dl.next should cache deadline of the earliest ready task that
is also enqueued in the pushable rbtree, as pull algorithm uses this
information to find candidates for migration: if the earliest_dl.next
deadline of source rq is earlier than the earliest_dl.curr deadline of
destination rq, the task from the source rq can be pulled.

However, current implementation only guarantees that earliest_dl.next is
the deadline of the next ready task instead of the next pushable task;
which will result in potentially holding both rqs' lock and find nothing
to migrate because of affinity constraints. In addition, current logic
doesn't update the next candidate for pushing in pick_next_task_dl(),
even if the running task is never eligible.

This patch fixes both problems by updating earliest_dl.next when
pushable dl task is enqueued/dequeued, similar to what we already do for
RT.

Tested-by: Luca Abeni <luca.abeni@unitn.it>
Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Juri Lelli <juri.lelli@arm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1449135730-27202-1-git-send-email-wanpeng.li@hotmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/deadline.c