public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Alexander Graf <agraf@suse.de>
Cc: Mihai Caraman <mihai.caraman@freescale.com>,
	"<kvm-ppc@vger.kernel.org>" <kvm-ppc@vger.kernel.org>,
	"<kvm@vger.kernel.org> list" <kvm@vger.kernel.org>,
	<linuxppc-dev@lists.ozlabs.org>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH 2/2] KVM: PPC: Book3E: Emulate MCSRR0/1 SPR and rfmci instruction
Date: Tue, 9 Jul 2013 17:26:23 -0500	[thread overview]
Message-ID: <1373408783.8183.208@snotra> (raw)
In-Reply-To: <B31BC4F4-39E8-479D-B5AB-2D7F870E7A6C@suse.de> (from agraf@suse.de on Tue Jul  9 17:00:26 2013)

On 07/09/2013 05:00:26 PM, Alexander Graf wrote:
> 
> On 09.07.2013, at 23:54, Scott Wood wrote:
> 
> > On 07/09/2013 04:49:32 PM, Alexander Graf wrote:
> >> Not sure I understand. What the timing stats do is that they  
> measure the time between [exit ... entry], right? We'd do the same  
> thing, just all in C code. That means we would become slightly less  
> accurate, but gain dynamic enabling of the traces and get rid of all  
> the timing stat asm code.
> >
> > Compile-time enabling bothers me less than a loss of accuracy (not  
> just a small loss by moving into C code, but a potential for a large  
> loss if we overflow the buffer)
> 
> Then don't overflow the buffer. Make it large enough.

How large is that?  Does the tool recognize and report when overflow  
happens?

How much will the overhead of running some python script on the host,  
consuming a large volume of data, affect the results?

> IIRC ftrace improved recently to dynamically increase the buffer size  
> too.
> 
> Steven, do I remember correctly here?

Yay more complexity.

So now we get to worry about possible memory allocations happening when  
we try to log something?  Or if there is a way to do an "atomic" log,  
we're back to the "buffer might be full" situation.

> > and a dependency on a userspace tool
> 
> We already have that for kvm_stat. It's a simple python script - and  
> you surely have python on your rootfs, no?
> 
> > (both in terms of the tool needing to be written, and in the hassle  
> of ensuring that it's present in the root filesystem of whatever  
> system I'm testing).  And the whole mechanism will be more  
> complicated.
> 
> It'll also be more flexible at the same time. You could take the logs  
> and actually check what's going on to debug issues that you're  
> encountering for example.
> 
> We could even go as far as sharing the same tool with other  
> architectures, so that we only have to learn how to debug things once.

Have you encountered an actual need for this flexibility, or is it  
theoretical?

Is there common infrastructure for dealing with measuring intervals and  
tracking statistics thereof, rather than just tracking points and  
letting userspace connect the dots (though it could still do that as an  
option)?  Even if it must be done in userspace, it doesn't seem like  
something that should be KVM-specific.

> > Lots of debug options are enabled at build time; why must this be  
> different?
> 
> Because I think it's valuable as debug tool for cases where compile  
> time switches are not the best way of debugging things. It's not a  
> high profile thing to tackle for me tbh, but I don't really think  
> working heavily on the timing stat thing is the correct path to walk  
> along.

Adding new exit types isn't "working heavily" on it.

-Scott

  reply	other threads:[~2013-07-09 22:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-03 13:30 [PATCH 1/2] KVM: PPC: Fix kvm_exit_names array Mihai Caraman
2013-07-03 13:30 ` [PATCH 2/2] KVM: PPC: Book3E: Emulate MCSRR0/1 SPR and rfmci instruction Mihai Caraman
2013-07-08 18:45   ` Alexander Graf
2013-07-09 17:16     ` Scott Wood
2013-07-09 17:46       ` Alexander Graf
2013-07-09 18:29         ` Scott Wood
2013-07-09 21:49           ` Alexander Graf
2013-07-09 21:54             ` Scott Wood
2013-07-09 22:00               ` Alexander Graf
2013-07-09 22:26                 ` Scott Wood [this message]
2013-07-10  0:00                   ` Steven Rostedt
2013-07-10 10:23                   ` Alexander Graf
2013-07-10 18:24                     ` Scott Wood
2013-07-10 22:47                       ` Alexander Graf
2013-07-09 23:50                 ` Steven Rostedt
2013-07-08 18:39 ` [PATCH 1/2] KVM: PPC: Fix kvm_exit_names array Alexander Graf

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=1373408783.8183.208@snotra \
    --to=scottwood@freescale.com \
    --cc=agraf@suse.de \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mihai.caraman@freescale.com \
    --cc=rostedt@goodmis.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