summaryrefslogtreecommitdiffstats
path: root/kernel/sched/stop_task.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2023-11-04 11:59:18 +0100
committerPeter Zijlstra <peterz@infradead.org>2023-11-15 09:57:48 +0100
commit5d69eca542ee17c618f9a55da52191d5e28b435f (patch)
treeada1a9eabd52e3b77f3cc5c56ca60c038404b481 /kernel/sched/stop_task.c
parentee4373dc902c0a403dd084b254ce70a78f95466f (diff)
downloadlinux-stable-5d69eca542ee17c618f9a55da52191d5e28b435f.tar.gz
linux-stable-5d69eca542ee17c618f9a55da52191d5e28b435f.tar.bz2
linux-stable-5d69eca542ee17c618f9a55da52191d5e28b435f.zip
sched: Unify runtime accounting across classes
All classes use sched_entity::exec_start to track runtime and have copies of the exact same code around to compute runtime. Collapse all that. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Phil Auld <pauld@redhat.com> Reviewed-by: Valentin Schneider <vschneid@redhat.com> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> Link: https://lkml.kernel.org/r/54d148a144f26d9559698c4dd82d8859038a7380.1699095159.git.bristot@kernel.org
Diffstat (limited to 'kernel/sched/stop_task.c')
-rw-r--r--kernel/sched/stop_task.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/kernel/sched/stop_task.c b/kernel/sched/stop_task.c
index 6cf7304e6449..b1b8fe61c532 100644
--- a/kernel/sched/stop_task.c
+++ b/kernel/sched/stop_task.c
@@ -70,18 +70,7 @@ static void yield_task_stop(struct rq *rq)
static void put_prev_task_stop(struct rq *rq, struct task_struct *prev)
{
- struct task_struct *curr = rq->curr;
- u64 now, delta_exec;
-
- now = rq_clock_task(rq);
- delta_exec = now - curr->se.exec_start;
- if (unlikely((s64)delta_exec < 0))
- delta_exec = 0;
-
- schedstat_set(curr->stats.exec_max,
- max(curr->stats.exec_max, delta_exec));
-
- update_current_exec_runtime(curr, now, delta_exec);
+ update_curr_common(rq);
}
/*