Commit a2dcb276 authored by Yafang Shao's avatar Yafang Shao Committed by Peter Zijlstra

sched/fair: Use __schedstat_set() in set_next_entity()

schedstat_enabled() has been already checked, so we can use
__schedstat_set() directly.
Signed-off-by: default avatarYafang Shao <laoar.shao@gmail.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: default avatarMel Gorman <mgorman@suse.de>
Link: https://lore.kernel.org/r/20210905143547.4668-2-laoar.shao@gmail.com
parent 1c36432b
...@@ -4530,8 +4530,8 @@ set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se) ...@@ -4530,8 +4530,8 @@ set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
*/ */
if (schedstat_enabled() && if (schedstat_enabled() &&
rq_of(cfs_rq)->cfs.load.weight >= 2*se->load.weight) { rq_of(cfs_rq)->cfs.load.weight >= 2*se->load.weight) {
schedstat_set(se->statistics.slice_max, __schedstat_set(se->statistics.slice_max,
max((u64)schedstat_val(se->statistics.slice_max), max((u64)se->statistics.slice_max,
se->sum_exec_runtime - se->prev_sum_exec_runtime)); se->sum_exec_runtime - se->prev_sum_exec_runtime));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment