From: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
To: "Christian Borntraeger" <borntraeger@de.ibm.com>,
"Radim Krčmář" <rkrcmar@redhat.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: Tue, 18 Oct 2016 18:18:35 +1100 [thread overview]
Message-ID: <1476775115.2150.11.camel@gmail.com> (raw)
In-Reply-To: <4b0284f4-161e-68ff-9942-9be9ff245f63@de.ibm.com>
On Mon, 2016-10-17 at 15:48 +0200, Christian Borntraeger wrote:
> On 10/17/2016 03:40 PM, Radim Krčmář wrote:
> >
> > 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.
> FWIW, I was thinking about another change: provide the accumulated
> values of
> the counters of all VMs that have been destroyed (basically on
> vm_destroy read
> the values and add them on top of the "forever" counters.
> Did not find the time to do something like this.
This doesn't seem like it would be particularly hard to implement, I'm
just not sure of the use case.
>
>
>
next prev parent reply other threads:[~2016-10-18 7:18 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ář
2016-10-17 13:48 ` Christian Borntraeger
2016-10-18 7:18 ` Suraj Jitindar Singh [this message]
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=1476775115.2150.11.camel@gmail.com \
--to=sjitindarsingh@gmail.com \
--cc=borntraeger@de.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@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;
as well as URLs for NNTP newsgroup(s).