mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: William Cohen <wcohen@redhat.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Enhance perf to collect KVM guest os statistics fromhost side
Date: Thu, 18 Mar 2010 17:57:33 -0400	[thread overview]
Message-ID: <4BA2A1CD.1070207@redhat.com> (raw)

* Ingo Molnar <mingo@xxxxxxxx> wrote:

> * Avi Kivity <avi@xxxxxxxxxx> wrote:
> 
> > Monitoring guests from the host is useful for kvm developers, but less so
> > for users.
> 
> Guest space profiling is easy, and 'perf kvm' is not about that. (plain 'perf'
> will work if a proper paravirt channel is opened to the host)
> 
> I think you might have misunderstood the purpose and role of the 'perf kvm'
> patch here? 'perf kvm' is aimed at KVM developers: it is them who improve KVM
> code, not guest kernel users.
> 
> Ingo

The software performance events work fine in a KVM guest. Do the hardware performance events work in KVM guest  environment? Last time I looked the results for the hardware counters were not sane. The values were seemingly random numbers. Something like the following.

Performance counter stats for 'ls':

       3.427434  task-clock-msecs         #      0.046 CPUs 
              2  context-switches         #      0.001 M/sec
              0  CPU-migrations           #      0.000 M/sec
            218  page-faults              #      0.064 M/sec
 140737488355327  cycles                   # 41062056440.861 M/sec
 68825777242116  instructions             #      0.489 IPC  
 68825777242117  branches                 # 20080846849.893 M/sec
 68825777242118  branch-misses            #    100.000 %    
  <not counted>  cache-references        
  <not counted>  cache-misses     

The guest image is using 2.6.34-0.10.rc1.git0.fc14.it68 kernel and the host is Fedora-12 with a kernel built from 2.6.34-rc1-tip+ git tree running on Quad-Core AMD Opteron(tm) Processor 2350. Is there some combination of kernel/distribution/hardware that the hardware performance counters are suppose to work on?

-Will

                 reply	other threads:[~2010-03-18 21:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4BA2A1CD.1070207@redhat.com \
    --to=wcohen@redhat.com \
    --cc=linux-kernel@vger.kernel.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

Powered by JetHome