From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Cc: kvm@vger.kernel.org, pbonzini@redhat.com
Subject: Re: [PATCH] kvm/stats: Update kvm stats to clear on write to their debugfs entry
Date: Mon, 17 Oct 2016 15:40:05 +0200 [thread overview]
Message-ID: <20161017134004.GA8631@potion> (raw)
In-Reply-To: <1476424962-7610-1-git-send-email-sjitindarsingh@gmail.com>
2016-10-14 17:02+1100, Suraj Jitindar Singh:
> Various kvm vm and vcpu stats are provided via debugfs entries.
> Currently there is no way to reset these stats back to zero for the system
> except by stopping all vms.
It is not really resetting, just a special case of current behavior --
top-level stats are a sum of all existing VMs/VCPUs, so we would see 0
if they all had 0.
> Add the ability to clear (reset back to zero) these stats on a per stat
> basis by writing to the debugfs files.
I can see this being used before a test, but the userspace could also
read the value instead of writing and subtract it from the value after
the test to get a similar result.
The userspace-only solution is insufficient?
When and what do you zero?
> The stats are just reset to zero
> irrespective of what is actually written to the file.
Sounds good. Setting the val would be as simple, but there shouldn't be
a reason to and it is a debug interface, so we can change it anytime.
> Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
> ---
I have applied it to kvm/queue for the moment, thanks.
next prev parent reply other threads:[~2016-10-17 13:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-14 6:02 [PATCH] kvm/stats: Update kvm stats to clear on write to their debugfs entry Suraj Jitindar Singh
2016-10-17 13:40 ` Radim Krčmář [this message]
2016-10-17 13:48 ` Christian Borntraeger
2016-10-18 7:18 ` Suraj Jitindar Singh
2016-10-18 7:16 ` Suraj Jitindar Singh
2016-10-17 16:50 ` Paolo Bonzini
2016-10-18 6:20 ` Suraj Jitindar Singh
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=20161017134004.GA8631@potion \
--to=rkrcmar@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=sjitindarsingh@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.