linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>, KVM <kvm@vger.kernel.org>,
	yoshihiro.yunomae.ez@hitachi.com
Subject: Re: RFC: paravirtualizing perf_clock
Date: Wed, 30 Oct 2013 08:31:30 -0600	[thread overview]
Message-ID: <52711842.8080402@gmail.com> (raw)
In-Reply-To: <20131030142013.GH4651@redhat.com>

On 10/30/13 8:20 AM, Gleb Natapov wrote:
> So can you explain a little bit more about how this will work? You run
> perf on a host and get both host and guest events? How do you pass
> events from guest to host in this case?

The intent is to allow data capture to occur in both contexts (host and 
guest) completely independently (e.g., record events in the guest to a 
file and in the host to a separate file). The files are then made 
available to a single post processing command (e.g., copy off box to an 
analysis server or copy guest file to host or vice versa).

 From there perf needs some tweaks to read 2 different data files and 
sort. From an address to symbol perspective, perf already has the notion 
of independent machines -- work that was done for perf-kvm. There has 
already been a lot of discussion on writing perf events to mmap-specific 
files which are then merged at analysis time (versus today where all 
mmap's are scanned and dumped to the same file). This use case is not 
much of an extension beyond those two concepts.

Right now, as a proof of concept, I am dumping events in the guest to a 
file (perf-script) and in the host to a file, merging the two files 
together and then time sorting. For example running, 'ls' in the guest 
causes disk I/O which causes a VMEXIT, .... you can see this action end 
to end.

>
>> And then for the cherry on top a design that works across
>> architectures (e.g., x86 now, but arm later).
>>
> MSR is x86 thing.

Sure the implementation of pv_perf_clock for x86 is an MSR read (open to 
suggestions on other options). ARM would have some other means of a fast 
access to host, no?

David

      reply	other threads:[~2013-10-30 14:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-28  1:27 RFC: paravirtualizing perf_clock David Ahern
2013-10-28 13:00 ` Gleb Natapov
2013-10-28 13:15 ` Peter Zijlstra
2013-10-29  2:58   ` David Ahern
2013-10-29 13:23     ` Peter Zijlstra
2013-10-30  5:59     ` Masami Hiramatsu
2013-10-30 14:03       ` David Ahern
2013-10-31  8:09         ` Masami Hiramatsu
2013-10-31 16:45           ` David Ahern
2013-10-30 14:20     ` Gleb Natapov
2013-10-30 14:31       ` David Ahern [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=52711842.8080402@gmail.com \
    --to=dsahern@gmail.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=yoshihiro.yunomae.ez@hitachi.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).