diff options
author | 2022-08-24 16:28:56 +0800 | |
---|---|---|
committer | 2022-08-27 00:05:35 +0200 | |
commit | 5531ecffa4b923bc7739e9ea73c552d80af602dc (patch) | |
tree | 5fa795ee0847e07754e96043ee214525dc7c551c /kernel/sched/deadline.c | |
parent | sched/fair: Don't init util/runnable_avg for !fair task (diff) | |
download | linux-5531ecffa4b923bc7739e9ea73c552d80af602dc.tar.gz linux-5531ecffa4b923bc7739e9ea73c552d80af602dc.tar.bz2 linux-5531ecffa4b923bc7739e9ea73c552d80af602dc.zip |
sched: Add update_current_exec_runtime helper
Wrap repeated code in helper function update_current_exec_runtime for
update the exec time of the current.
Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20220824082856.15674-1-shangxiaojing@huawei.com
Diffstat (limited to 'kernel/sched/deadline.c')
-rw-r--r-- | kernel/sched/deadline.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index 1d9c90958baa..4cbdc0c560da 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c @@ -1333,11 +1333,7 @@ static void update_curr_dl(struct rq *rq) trace_sched_stat_runtime(curr, delta_exec, 0); - curr->se.sum_exec_runtime += delta_exec; - account_group_exec_runtime(curr, delta_exec); - - curr->se.exec_start = now; - cgroup_account_cputime(curr, delta_exec); + update_current_exec_runtime(curr, now, delta_exec); if (dl_entity_is_special(dl_se)) return; |