lkml.org 
[lkml]   [2022]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -next] sched: Add update_current_exec_runtime helper
On Wed, Aug 24, 2022 at 02:53:26PM +0800, Shang XiaoJing wrote:

In general I like, however:

> diff --git a/kernel/sched/stop_task.c b/kernel/sched/stop_task.c
> index d04073a93eb4..027068779126 100644
> --- a/kernel/sched/stop_task.c
> +++ b/kernel/sched/stop_task.c
> @@ -80,11 +80,7 @@ static void put_prev_task_stop(struct rq *rq, struct task_struct *prev)
> schedstat_set(curr->stats.exec_max,
> max(curr->stats.exec_max, delta_exec));
>
> - curr->se.sum_exec_runtime += delta_exec;
> - account_group_exec_runtime(curr, delta_exec);
> -
> - curr->se.exec_start = rq_clock_task(rq);
> - cgroup_account_cputime(curr, delta_exec);
> + update_current_exec_runtime(curr, rq_clock_task(rq), delta_exec);
> }

This already has a rq_clock_task() invocation; please fix it to call it
once -- pre-existing issue, but if we're cleaning up we should clean up,
right :-)

\
 
 \ /
  Last update: 2022-08-24 08:40    [W:0.034 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site