summaryrefslogtreecommitdiff
path: root/kernel/sched/completion.c
diff options
context:
space:
mode:
authorSyed Rameez Mustafa <rameezmustafa@codeaurora.org>2017-01-03 15:29:14 -0800
committerSyed Rameez Mustafa <rameezmustafa@codeaurora.org>2017-01-03 19:22:23 -0800
commit3997e768ac8a807af810e038af0ae1f0712a066b (patch)
tree2725a24a4b4cc77c1e6b16b0df7b1dee70d78944 /kernel/sched/completion.c
parent2f817b68f06ed866aa2c4cc35b2e4293aeb1ef99 (diff)
sched: Fix new task accounting bug in transfer_busy_time()
In transfer_busy_time(), the new_task flag is set based on the active window count prior to the call to update_task_ravg(). update_task_ravg() however, can then increment the active window count and consequently the new_task flag above becomes stale. This is turn leads to inaccurate accounting whereby update_task_ravg() does accounting based on the fact that the task is not new whereas transfer_busy_time() then continues to do further accounting assuming that the task is new. The accounting discrepancies are sometimes caught by some of the scheduler BUGs. Fix the described problem by moving the check is_new_task() after the call to update_task_ravg(). Also add two missing BUGs that would catch the problem sooner rather than later. Change-Id: I8dc4822e97cc03ebf2ca1ee2de95eb4e5851f459 Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Diffstat (limited to 'kernel/sched/completion.c')
0 files changed, 0 insertions, 0 deletions