Re: [PATCH 1/3] cgroup/rstat: Fix forceidle time in cpu.stat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/24/25 6:39 PM, Michal Koutný Wrote:
On Fri, Jan 24, 2025 at 05:58:26PM +0800, Abel Wu <wuyun.abel@xxxxxxxxxxxxx> 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 :(




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux