Merge "sched: Fix new task accounting bug in transfer_busy_time()"

This commit is contained in:
Linux Build Service Account 2017-01-05 02:08:58 -08:00 committed by Gerrit - the friendly Code Review server
commit dbbac4f76f

View file

@ -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 *