From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: David Collins <david-GOU7F2WGkdXPplzRYGY9Cw@public.gmane.org>
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
david-PnRKb+1yrG7L5xMBEfyS8A@public.gmane.org
Subject: Re: [PATCH] cgroup: cpu.stats reset counters support
Date: Mon, 15 Feb 2016 16:15:53 -0500 [thread overview]
Message-ID: <20160215211553.GP3965@htj.duckdns.org> (raw)
In-Reply-To: <56C23F9D.2020705-GOU7F2WGkdXPplzRYGY9Cw@public.gmane.org>
On Mon, Feb 15, 2016 at 03:14:05PM -0600, David Collins wrote:
> This patch allows the cpu.stats values to be reset in cgroups without having to remove and recreate it. I wrote this patch because I've had use cases where resetting the counters made it much easier to read, and it may help with custom userland scripts when parsing statistics.
>
> Many other components of cgroups allows stats to be reset, such as cpuacct.stats. To reset the stats counters, simply `echo 0 > cpu.stats`
Please don't do this. The right thing to do is to read accumluative
values from userland and calculate the delta. Going forward, no other
cgroup stat files are gonna support resetting.
Nacked-by: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Thanks.
--
tejun
prev parent reply other threads:[~2016-02-15 21:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-15 21:14 [PATCH] cgroup: cpu.stats reset counters support David Collins
[not found] ` <56C23F9D.2020705-GOU7F2WGkdXPplzRYGY9Cw@public.gmane.org>
2016-02-15 21:15 ` Tejun Heo [this message]
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=20160215211553.GP3965@htj.duckdns.org \
--to=tj-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=david-GOU7F2WGkdXPplzRYGY9Cw@public.gmane.org \
--cc=david-PnRKb+1yrG7L5xMBEfyS8A@public.gmane.org \
/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