summaryrefslogtreecommitdiff
path: root/kernel/sched/hmp.c
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2017-01-05 02:08:58 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-01-05 02:08:58 -0800
commitdbbac4f76f8f5c4c06f4be4624a5456b52d18870 (patch)
treea01f48c21571ef601b0909f9cce132dcc22a08a5 /kernel/sched/hmp.c
parent24df0afae936f9710453ba679fdd8178af2e3db0 (diff)
parent3997e768ac8a807af810e038af0ae1f0712a066b (diff)
Merge "sched: Fix new task accounting bug in transfer_busy_time()"
Diffstat (limited to 'kernel/sched/hmp.c')
-rw-r--r--kernel/sched/hmp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/sched/hmp.c b/kernel/sched/hmp.c
index ab5587309760..f96ac736b452 100644
--- a/kernel/sched/hmp.c
+++ b/kernel/sched/hmp.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -3908,7 +3908,7 @@ static void transfer_busy_time(struct rq *rq, struct related_thread_group *grp,
struct migration_sum_data d;
int migrate_type;
int cpu = cpu_of(rq);
- bool new_task = is_new_task(p);
+ bool new_task;
int i;
if (!sched_freq_aggregate)
@@ -3918,6 +3918,7 @@ static void transfer_busy_time(struct rq *rq, struct related_thread_group *grp,
update_task_ravg(rq->curr, rq, TASK_UPDATE, wallclock, 0);
update_task_ravg(p, rq, TASK_UPDATE, wallclock, 0);
+ new_task = is_new_task(p);
/* cpu_time protected by related_thread_group_lock, grp->lock rq_lock */
cpu_time = _group_cpu_time(grp, cpu);
@@ -4012,6 +4013,8 @@ static void transfer_busy_time(struct rq *rq, struct related_thread_group *grp,
BUG_ON((s64)*src_curr_runnable_sum < 0);
BUG_ON((s64)*src_prev_runnable_sum < 0);
+ BUG_ON((s64)*src_nt_curr_runnable_sum < 0);
+ BUG_ON((s64)*src_nt_prev_runnable_sum < 0);
}
static inline struct group_cpu_time *