lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e99506e7-cf6f-609c-8a28-e92dacf65d73@huawei.com>
Date:   Wed, 24 Aug 2022 15:29:39 +0800
From:   shangxiaojing <shangxiaojing@...wei.com>
To:     Peter Zijlstra <peterz@...radead.org>
CC:     <mingo@...hat.com>, <juri.lelli@...hat.com>,
        <vincent.guittot@...aro.org>, <dietmar.eggemann@....com>,
        <rostedt@...dmis.org>, <bsegall@...gle.com>, <mgorman@...e.de>,
        <bristot@...hat.com>, <vschneid@...hat.com>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] sched: Add update_current_exec_runtime helper


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ