HMP: Avoid using the cpu stopper to stop runnable tasks
authorMathieu Poirier <mathieu.poirier@linaro.org>
Wed, 4 Feb 2015 02:39:05 +0000 (11:39 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 14 Dec 2016 04:41:51 +0000 (13:41 +0900)
commit1d251fe372e6e99da68b36d8e78b416f10da7487
treeee4ea2378b04475fc59e37f3aa9c3e4c474bc01e
parente382726a6ab04181adfe63c9ddbe9c75fabeb981
HMP: Avoid using the cpu stopper to stop runnable tasks

When migrating a runnable task, we use the CPU stopper on
the source CPU to ensure that the task to be moved is not
currently running. Before this patch, all forced migrations
(up, offload, idle pull) use the stopper for every migration.

Using the CPU stopper is mandatory only when a task is currently
running on a CPU.  Otherwise tasks can be moved by locking the
source and destination run queues.

This patch checks to see if the task to be moved are currently
running.  If not the task is moved directly without using the
stopper thread.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
[k.kozlowski: rebased on 4.1, no signed-off-by of previous committer]
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
include/trace/events/sched.h
kernel/sched/fair.c