sched: fix prev_stime calculation
Srivatsa Vaddagiri noticed occasionally incorrect CPU usage values in top and tracked it down to stime going below 0 in task_stime(). Negative values are possible there due to the sampled nature of stime/utime. Fix suggested by Balbir Singh. Signed-off-by: NIngo Molnar <mingo@elte.hu> Tested-by: NSrivatsa Vaddagiri <vatsa@linux.vnet.ibm.com> Reviewed-by: NBalbir Singh <balbir@linux.vnet.ibm.com>
Showing
想要评论请 注册 或 登录