public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Shang XiaoJing <shangxiaojing@huawei.com>
Cc: mingo@redhat.com, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
	rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
	bristot@redhat.com, vschneid@redhat.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] sched: Add update_current_exec_runtime helper
Date: Wed, 24 Aug 2022 08:38:48 +0200	[thread overview]
Message-ID: <YwXHeHQnvRFxS1ct@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20220824065326.10583-1-shangxiaojing@huawei.com>

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 :-)

  reply	other threads:[~2022-08-24  6:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24  6:53 [PATCH -next] sched: Add update_current_exec_runtime helper Shang XiaoJing
2022-08-24  6:38 ` Peter Zijlstra [this message]
2022-08-24  7:29   ` shangxiaojing

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YwXHeHQnvRFxS1ct@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=shangxiaojing@huawei.com \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox