diff options
author | Yafang Shao <laoar.shao@gmail.com> | 2021-09-05 16:35:40 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2021-10-05 15:51:44 +0200 |
commit | a2dcb276ff9287fcea103ca1a2436383e8583751 (patch) | |
tree | 2ec1256aeb0d12b20573153199b1bac925903caa /kernel | |
parent | kselftests/sched: cleanup the child processes (diff) | |
download | linux-a2dcb276ff9287fcea103ca1a2436383e8583751.tar.xz linux-a2dcb276ff9287fcea103ca1a2436383e8583751.zip |
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: Yafang Shao <laoar.shao@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Mel Gorman <mgorman@suse.de>
Link: https://lore.kernel.org/r/20210905143547.4668-2-laoar.shao@gmail.com
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched/fair.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index fd41abef1950..61d3e3b97fe5 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4530,9 +4530,9 @@ set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se) */ if (schedstat_enabled() && rq_of(cfs_rq)->cfs.load.weight >= 2*se->load.weight) { - schedstat_set(se->statistics.slice_max, - max((u64)schedstat_val(se->statistics.slice_max), - se->sum_exec_runtime - se->prev_sum_exec_runtime)); + __schedstat_set(se->statistics.slice_max, + max((u64)se->statistics.slice_max, + se->sum_exec_runtime - se->prev_sum_exec_runtime)); } se->prev_sum_exec_runtime = se->sum_exec_runtime; |