[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2824d739-235d-46d5-8559-aa3f374bccbe@bytedance.com>
Date: Fri, 24 Jan 2025 18:58:17 +0800
From: Abel Wu <wuyun.abel@...edance.com>
To: Michal Koutný <mkoutny@...e.com>
Cc: Tejun Heo <tj@...nel.org>, Johannes Weiner <hannes@...xchg.org>,
Jonathan Corbet <corbet@....net>, Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>, Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>, Ben Segall <bsegall@...gle.com>,
Mel Gorman <mgorman@...e.de>, Valentin Schneider <vschneid@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>, Yury Norov <yury.norov@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>, Bitao Hu
<yaoma@...ux.alibaba.com>, Chen Ridong <chenridong@...wei.com>,
"open list:CONTROL GROUP (CGROUP)" <cgroups@...r.kernel.org>,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] cgroup/rstat: Fix forceidle time in cpu.stat
On 1/24/25 6:39 PM, Michal Koutný Wrote:
> On Fri, Jan 24, 2025 at 05:58:26PM +0800, Abel Wu <wuyun.abel@...edance.com> wrote:
>> The following hunk deleted the snapshot of cgrp->bstat.forceidle_sum:
>
> But there's no such hunk in your PATCH 1/3 :-o
if (cgroup_parent(cgrp)) {
cgroup_rstat_flush_hold(cgrp);
- usage = cgrp->bstat.cputime.sum_exec_runtime;
+ bstat = cgrp->bstat;
cputime_adjust(&cgrp->bstat.cputime, &cgrp->prev_cputime,
- &utime, &stime);
- ntime = cgrp->bstat.ntime;
+ &bstat.cputime.utime, &bstat.cputime.stime);
cgroup_rstat_flush_release(cgrp);
} else {
Because @bstat takes a full snapshot of @cgrp->bstat which contains
forceidle time. I think the lack of readability is the reason why
TJ doesn't like this :(
Powered by blists - more mailing lists