summaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-bit.c
diff options
context:
space:
mode:
authorPavankumar Kondeti <pkondeti@codeaurora.org>2016-09-30 19:48:22 +0530
committerPavankumar Kondeti <pkondeti@codeaurora.org>2016-10-01 10:05:08 +0530
commit7c3461a6acf2b2a36657215fd410f407e33862f2 (patch)
treec51bf7aa30c13479c0a98880f4bfb00be4549fcc /lib/mpi/mpi-bit.c
parent46692be6dd06ce405cb09cf8338b1f0edbbfb295 (diff)
sched: Fix a division by zero bug in scale_exec_time()
When cycle_counter is used to estimate the frequency, calling update_task_ravg() twice on the same task without refreshing the wallclock results in a division by zero bug. Add a safety check in update_task_ravg() to prevent this. The above bug is hit from __schedule() when next == prev. There is no need to call update_task_ravg() twice for PUT_PREV_TASK and PICK_NEXT_TASK events for the same task. Calling update_task_ravg() with TASK_UPDATE event is sufficient. Change-Id: Ib3af9004f2462618c535b8195377bedb584d0261 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Diffstat (limited to 'lib/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions