Re: [PATCH 1/1] Sched/fair: Improve the accuracy of sched_stat_wait statistics

From: Peter Zijlstra
Date: Thu Oct 15 2020 - 07:02:50 EST


On Thu, Oct 15, 2020 at 02:48:46PM +0800, qianjun.kernel@xxxxxxxxx wrote:
> From: jun qian <qianjun.kernel@xxxxxxxxx>
>
> When the sched_schedstat changes from 0 to 1, some sched se maybe
> already in the runqueue, the se->statistics.wait_start will be 0.
> So it will let the (rq_of(cfs_rq)) - se->statistics.wait_start)
> wrong. We need to avoid this scenario.
>
> Signed-off-by: jun qian <qianjun.kernel@xxxxxxxxx>
> Reviewed-by: Yafang Shao <laoar.shao@xxxxxxxxx>

Thanks!