linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Chengming Zhou <zhouchengming@bytedance.com>
Cc: lizefan@huawei.com, hannes@cmpxchg.org, corbet@lwn.net,
	cgroups@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, luodaowen.backend@bytedance.com,
	songmuchun@bytedance.com
Subject: Re: [PATCH] cgroup: Add cgroupstats numbers to cgroup.stat file
Date: Mon, 21 Sep 2020 10:50:09 -0400	[thread overview]
Message-ID: <20200921145009.GD4268@mtj.duckdns.org> (raw)
In-Reply-To: <20200915155349.15181-1-zhouchengming@bytedance.com>

Hello,

On Tue, Sep 15, 2020 at 11:53:49PM +0800, Chengming Zhou wrote:
> In the cgroup v1, we can use netlink interface to get cgroupstats for
> a cgroup. But it has been excluded from cgroup v2 interface intentionally
> due to the duplication and inconsistencies with other statistics.
> To make container monitor tool like "cadvisor" continue to work, we add
> these cgroupstats numbers to the cgroup.stat file, and change the
> admin-guide doc accordingly.

So, we can't add O(nr_threads) operations to cgroup.stat reads. There are
two ways forward that I can see.

* Investigate how these counters are being used. If it's used for congestion
  detection, pressure metrics are likely better indicators to use anyway. If
  the usage frequency is low enough, maybe querying from userspace should
  work?

* If the need for these per-cgroup task state counters is really
  justifiable, the counters should be maintained from scheduling event
  directly and summed up using rstat like other statistics.

Thanks.

-- 
tejun

  reply	other threads:[~2020-09-21 14:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15 15:53 [PATCH] cgroup: Add cgroupstats numbers to cgroup.stat file Chengming Zhou
2020-09-21 14:50 ` Tejun Heo [this message]
2020-09-23  9:57   ` [Phishing Risk] [External] " Chengming Zhou

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=20200921145009.GD4268@mtj.duckdns.org \
    --to=tj@kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=corbet@lwn.net \
    --cc=hannes@cmpxchg.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=luodaowen.backend@bytedance.com \
    --cc=songmuchun@bytedance.com \
    --cc=zhouchengming@bytedance.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;
as well as URLs for NNTP newsgroup(s).