From c5ad4d4de3148e92ed2efe795ee46124aa84d2dc Mon Sep 17 00:00:00 2001 From: Daeyeong Lee Date: Tue, 27 Mar 2018 17:25:24 +0900 Subject: [PATCH] [COMMON] sched: ems: Fix bug of ontime_task_wakeup Despite not finding target_cpu, there was a hole to include the task in ontime. The code to defenc it is added. Change-Id: Ibf6aec93eedd2d7f8c9f45e2e4acc26705733838 Signed-off-by: Daeyeong Lee --- kernel/sched/ehmp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kernel/sched/ehmp.c b/kernel/sched/ehmp.c index 65ea1d745382..52f30b2b13cf 100644 --- a/kernel/sched/ehmp.c +++ b/kernel/sched/ehmp.c @@ -1435,6 +1435,10 @@ static int ontime_task_wakeup(struct task_struct *p) u64 delta; int target_cpu = -1; + /* When wakeup task is on ontime migrating, do not ontime wakeup */ + if (ontime_flag(p) == ONTIME_MIGRATING) + return -1; + /* * When wakeup task satisfies ontime condition to up migration, * check there is a possible target cpu. @@ -1495,6 +1499,9 @@ static int ontime_task_wakeup(struct task_struct *p) goto ontime_out; } + if (!cpu_selected(target_cpu)) + goto ontime_out; + ontime_up: include_ontime_task(p, target_cpu); -- 2.20.1