[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZoQ2ti7nnz9EJSc3@slm.duckdns.org>
Date: Tue, 2 Jul 2024 07:19:50 -1000
From: Tejun Heo <tj@...nel.org>
To: Chen Ridong <chenridong@...wei.com>
Cc: lizefan.x@...edance.com, hannes@...xchg.org, longman@...hat.com,
cgroups@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 -next] cgroup/rstat: add force idle show helper
Hello,
On Tue, Jul 02, 2024 at 02:28:22AM +0000, Chen Ridong wrote:
...
> if (cgroup_parent(cgrp)) {
> cgroup_rstat_flush_hold(cgrp);
> usage = cgrp->bstat.cputime.sum_exec_runtime;
> cputime_adjust(&cgrp->bstat.cputime, &cgrp->prev_cputime,
> &utime, &stime);
> -#ifdef CONFIG_SCHED_CORE
> - forceidle_time = cgrp->bstat.forceidle_sum;
> -#endif
> + bstat = cgrp->bstat;
Please don't copy non-trivial struct like this. Maybe add a pointer which
points to the bstat to use?
Thanks.
--
tejun
Powered by blists - more mailing lists