From: Alexander Graf <agraf@suse.de>
To: Paul Mackerras <paulus@samba.org>
Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH 13/23] KVM: PPC: Book3S HV: Accumulate timing information for real-mode code
Date: Fri, 20 Mar 2015 12:35:43 +0100 [thread overview]
Message-ID: <550C060F.2080006@suse.de> (raw)
In-Reply-To: <20150320112512.GA9425@iris.ozlabs.ibm.com>
On 20.03.15 12:25, Paul Mackerras wrote:
> On Fri, Mar 20, 2015 at 12:15:15PM +0100, Alexander Graf wrote:
>>
>>
>> On 20.03.15 10:39, Paul Mackerras wrote:
>>> This reads the timebase at various points in the real-mode guest
>>> entry/exit code and uses that to accumulate total, minimum and
>>> maximum time spent in those parts of the code. Currently these
>>> times are accumulated per vcpu in 5 parts of the code:
>>>
>>> * rm_entry - time taken from the start of kvmppc_hv_entry() until
>>> just before entering the guest.
>>> * rm_intr - time from when we take a hypervisor interrupt in the
>>> guest until we either re-enter the guest or decide to exit to the
>>> host. This includes time spent handling hcalls in real mode.
>>> * rm_exit - time from when we decide to exit the guest until the
>>> return from kvmppc_hv_entry().
>>> * guest - time spend in the guest
>>> * cede - time spent napping in real mode due to an H_CEDE hcall
>>> while other threads in the same vcore are active.
>>>
>>> These times are exposed in debugfs in a directory per vcpu that
>>> contains a file called "timings". This file contains one line for
>>> each of the 5 timings above, with the name followed by a colon and
>>> 4 numbers, which are the count (number of times the code has been
>>> executed), the total time, the minimum time, and the maximum time,
>>> all in nanoseconds.
>>>
>>> Signed-off-by: Paul Mackerras <paulus@samba.org>
>>
>> Have you measure the additional overhead this brings?
>
> I haven't - in fact I did this patch so I could measure the overhead
> or improvement from other changes I did, but it doesn't measure its
> own overhead, of course. I guess I need a workload that does a
> defined number of guest entries and exits and measure how fast it runs
> with and without the patch (maybe something like H_SET_MODE in a
> loop). I'll figure something out and post the results.
Yeah, just measure the number of exits you can handle for a simple
hcall. If there is measurable overhead, it's probably a good idea to
move the statistics gathering into #ifdef paths for DEBUGFS or maybe
even a separate EXIT_TIMING config option as we have it for booke.
Alex
next prev parent reply other threads:[~2015-03-20 11:35 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-20 9:39 [PATCH 00/23] Bug fixes and improvements for HV KVM Paul Mackerras
2015-03-20 9:39 ` [PATCH 01/23] KVM: PPC: Book3S HV: Fix spinlock/mutex ordering issue in kvmppc_set_lpcr() Paul Mackerras
2015-03-20 9:39 ` [PATCH 02/23] KVM: PPC: Book3S HV: Endian fix for accessing VPA yield count Paul Mackerras
2015-03-20 9:39 ` [PATCH 03/23] KVM: PPC: Book3S HV: Fix instruction emulation Paul Mackerras
2015-03-20 9:39 ` [PATCH 04/23] KVM: PPC: Book3S HV: Add fast real-mode H_RANDOM implementation Paul Mackerras
2015-03-20 9:39 ` [PATCH 05/23] KVM: PPC: Book3S HV: Remove RMA-related variables from code Paul Mackerras
2015-03-20 9:39 ` [PATCH 06/23] KVM: PPC: Book3S HV: Add helpers for lock/unlock hpte Paul Mackerras
2015-03-20 9:39 ` [PATCH 07/23] KVM: PPC: Book3S: Allow reuse of vCPU object Paul Mackerras
2015-03-20 11:01 ` Alexander Graf
2015-03-20 11:26 ` Paul Mackerras
2015-03-20 11:34 ` Alexander Graf
2015-03-20 15:51 ` Bharata B Rao
2015-03-21 14:58 ` Alexander Graf
2015-03-23 7:50 ` Bharata B Rao
2015-03-23 8:31 ` Alexander Graf
2015-03-20 9:39 ` [PATCH 08/23] KVM: PPC: Book3S HV: Add guest->host real mode completion counters Paul Mackerras
2015-03-20 9:39 ` [PATCH 09/23] KVM: PPC: Book3S HV: Convert ICS mutex lock to spin lock Paul Mackerras
2015-03-20 9:39 ` [PATCH 10/23] KVM: PPC: Book3S HV: Move virtual mode ICP functions to real-mode Paul Mackerras
2015-03-20 9:39 ` [PATCH 11/23] KVM: PPC: Book3S HV: Add ICP real mode counters Paul Mackerras
2015-03-20 9:39 ` [PATCH 12/23] KVM: PPC: Book3S HV: Create debugfs file for each guest's HPT Paul Mackerras
2015-03-20 11:20 ` Alexander Graf
2015-03-20 9:39 ` [PATCH 13/23] KVM: PPC: Book3S HV: Accumulate timing information for real-mode code Paul Mackerras
2015-03-20 11:15 ` Alexander Graf
2015-03-20 11:25 ` Paul Mackerras
2015-03-20 11:35 ` Alexander Graf [this message]
2015-03-22 22:57 ` Paul Mackerras
2015-03-20 9:39 ` [PATCH 14/23] KVM: PPC: Book3S HV: Simplify handling of VCPUs that need a VPA update Paul Mackerras
2015-03-20 9:39 ` [PATCH 15/23] KVM: PPC: Book3S HV: Minor cleanups Paul Mackerras
2015-03-20 9:39 ` [PATCH 16/23] KVM: PPC: Book3S HV: Move vcore preemption point up into kvmppc_run_vcpu Paul Mackerras
2015-03-20 9:39 ` [PATCH 17/23] KVM: PPC: Book3S HV: Get rid of vcore nap_count and n_woken Paul Mackerras
2015-03-20 9:39 ` [PATCH 18/23] KVM: PPC: Book3S HV: Don't wake thread with no vcpu on guest IPI Paul Mackerras
2015-03-20 9:39 ` [PATCH 19/23] KVM: PPC: Book3S HV: Use decrementer to wake napping threads Paul Mackerras
2015-03-20 9:39 ` [PATCH 20/23] KVM: PPC: Book3S HV: Use msgsnd for signalling threads on POWER8 Paul Mackerras
2015-03-20 11:28 ` Alexander Graf
2015-03-23 0:44 ` Paul Mackerras
2015-03-20 9:39 ` [PATCH 21/23] KVM: PPC: Book3S HV: Streamline guest entry and exit Paul Mackerras
2015-03-20 9:39 ` [PATCH 22/23] KVM: PPC: Book3S HV: Use bitmap of active threads rather than count Paul Mackerras
2015-03-20 9:40 ` [PATCH 23/23] KVM: PPC: Book3S HV: Translate kvmhv_commence_exit to C Paul Mackerras
2015-03-20 10:45 ` [PATCH 00/23] Bug fixes and improvements for HV KVM Alexander Graf
2015-03-20 11:36 ` 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=550C060F.2080006@suse.de \
--to=agraf@suse.de \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=paulus@samba.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