From: Tejun Heo <tj@kernel.org>
To: Chen Ridong <chenridong@huawei.com>
Cc: lizefan.x@bytedance.com, hannes@cmpxchg.org, longman@redhat.com,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 -next] cgroup/rstat: add force idle show helper
Date: Tue, 2 Jul 2024 07:19:50 -1000 [thread overview]
Message-ID: <ZoQ2ti7nnz9EJSc3@slm.duckdns.org> (raw)
In-Reply-To: <20240702022822.1032693-1-chenridong@huawei.com>
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
next prev parent reply other threads:[~2024-07-02 17:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-02 2:28 Chen Ridong
2024-07-02 17:19 ` Tejun Heo [this message]
2024-07-03 2:30 ` chenridong
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=ZoQ2ti7nnz9EJSc3@slm.duckdns.org \
--to=tj@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=chenridong@huawei.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--cc=longman@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
all inboxes | Powered by JetHome®