public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: shangxiaojing <shangxiaojing@huawei.com>
To: Peter Zijlstra <peterz@infradead.org>
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 15:29:39 +0800	[thread overview]
Message-ID: <e99506e7-cf6f-609c-8a28-e92dacf65d73@huawei.com> (raw)
In-Reply-To: <YwXHeHQnvRFxS1ct@worktop.programming.kicks-ass.net>


On 2022/8/24 14:38, Peter Zijlstra wrote:
> 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 :-)

Right, the redundant invocation of rq_clock_task() will be removed in v2.


Thanks :-) ,

Shang XiaoJing


      reply	other threads:[~2022-08-24  7:30 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
2022-08-24  7:29   ` shangxiaojing [this message]

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=e99506e7-cf6f-609c-8a28-e92dacf65d73@huawei.com \
    --to=shangxiaojing@huawei.com \
    --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=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --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