Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-29 Thread Avi Kivity
On 06/29/2011 11:38 AM, Peter Zijlstra wrote: > > Peter, can you look at 1-3 please? Queued them, thanks! I was more or less waiting for a next iteration of the series because of those problems reported, but those three stand well on their own. Thanks. I'm mired in other work but will retur

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-29 Thread Peter Zijlstra
On Wed, 2011-06-29 at 10:52 +0300, Avi Kivity wrote: > On 06/13/2011 04:34 PM, Avi Kivity wrote: > > This patchset exposes an emulated version 1 architectural performance > > monitoring unit to KVM guests. The PMU is emulated using perf_events, > > so the host kernel can multiplex host-wide, host-

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-29 Thread Avi Kivity
On 06/13/2011 04:34 PM, Avi Kivity wrote: This patchset exposes an emulated version 1 architectural performance monitoring unit to KVM guests. The PMU is emulated using perf_events, so the host kernel can multiplex host-wide, host-user, and the guest on available resources. Caveats: - counters

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread David Ahern
On 06/16/2011 10:31 AM, Avi Kivity wrote: > On 06/16/2011 07:04 PM, David Ahern wrote: >> >> On 06/16/2011 09:59 AM, Avi Kivity wrote: >> > On 06/16/2011 06:34 PM, David Ahern wrote: >> >> > >> >> > main () >> >> > { >> >> > int i; >> >> > >> >> > fork(); >> >> > for

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread Avi Kivity
On 06/16/2011 07:04 PM, David Ahern wrote: On 06/16/2011 09:59 AM, Avi Kivity wrote: > On 06/16/2011 06:34 PM, David Ahern wrote: >> > >> > main () >> > { >> > int i; >> > >> > fork(); >> > fork(); > > What happens without the two forks? > you have a 1-billion ins

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread David Ahern
On 06/16/2011 09:59 AM, Avi Kivity wrote: > On 06/16/2011 06:34 PM, David Ahern wrote: >> > >> > main () >> > { >> > int i; >> > >> > fork(); >> > fork(); > > What happens without the two forks? > you have a 1-billion instruction benchmark since there is only 1 process. David

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread Avi Kivity
On 06/16/2011 06:34 PM, David Ahern wrote: > > main () > { >int i; > >fork(); >fork(); What happens without the two forks? -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread David Ahern
On 06/16/2011 09:27 AM, Peter Zijlstra wrote: > Sure, I've got a couple of those things lying around: > > # perf stat -e instructions:u ./loop_1b_instructions-4x > > Performance counter stats for './loop_1b_instructions-4x': > > 4,000,085,344 instructions:u#0.00 insns per

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread Peter Zijlstra
On Thu, 2011-06-16 at 09:19 -0600, David Ahern wrote: > > On 06/16/2011 09:08 AM, Peter Zijlstra wrote: > > On Thu, 2011-06-16 at 08:08 -0600, David Ahern wrote: > >> Command: > >> perf stat -e instructions openssl speed aes > >> > >> Guest: > >>135,522,189,056 instructions #

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread David Ahern
On 06/16/2011 09:08 AM, Peter Zijlstra wrote: > On Thu, 2011-06-16 at 08:08 -0600, David Ahern wrote: >> Command: >> perf stat -e instructions openssl speed aes >> >> Guest: >>135,522,189,056 instructions #0.00 insns per cycle >> >> >> Host: >>346,082,922,185 instruct

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread David Ahern
On 06/16/2011 09:08 AM, Peter Zijlstra wrote: > On Thu, 2011-06-16 at 08:08 -0600, David Ahern wrote: >> Command: >> perf stat -e instructions openssl speed aes >> >> Guest: >>135,522,189,056 instructions #0.00 insns per cycle >> >> >> Host: >>346,082,922,185 instruct

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread Peter Zijlstra
On Thu, 2011-06-16 at 08:08 -0600, David Ahern wrote: > Command: > perf stat -e instructions openssl speed aes > > Guest: >135,522,189,056 instructions #0.00 insns per cycle > > > Host: >346,082,922,185 instructions #0.00 insns per cycle How does:

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread David Ahern
On 06/16/2011 08:36 AM, Avi Kivity wrote: > On 06/16/2011 05:32 PM, David Ahern wrote: >> Seems to be a side effect of running perf-stat in the guest. Running >> just 'openssl speed aes' in both host and guest shows very similar >> numbers (for the first 3 columns). Adding the 'perf stat' to the

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread Avi Kivity
On 06/16/2011 05:32 PM, David Ahern wrote: Seems to be a side effect of running perf-stat in the guest. Running just 'openssl speed aes' in both host and guest shows very similar numbers (for the first 3 columns). Adding the 'perf stat' to the command (ie., perf stat openssl speed aes) causes a s

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread David Ahern
On 06/16/2011 08:20 AM, Avi Kivity wrote: > On 06/16/2011 05:19 PM, David Ahern wrote: >> On 06/16/2011 08:08 AM, David Ahern wrote: >> > Command: >> >perf stat -e instructions openssl speed aes >> >> Hmm.. this might be the wrong benchmark for this. I thought >> openssl-speed was a purely

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread Avi Kivity
On 06/16/2011 05:19 PM, David Ahern wrote: On 06/16/2011 08:08 AM, David Ahern wrote: > Command: >perf stat -e instructions openssl speed aes Hmm.. this might be the wrong benchmark for this. I thought openssl-speed was a purely CPU intensive benchmark which should have fairly similar perf

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread David Ahern
On 06/16/2011 08:08 AM, David Ahern wrote: > Command: > perf stat -e instructions openssl speed aes Hmm.. this might be the wrong benchmark for this. I thought openssl-speed was a purely CPU intensive benchmark which should have fairly similar performance numbers in both host and guest. I seem

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread David Ahern
On 06/16/2011 07:53 AM, Avi Kivity wrote: > On 06/15/2011 07:51 PM, David Ahern wrote: >> The qemu-kvm change is setting the pmu version to 1, and your patchset >> introduces v1 event constraints. So based on intel_pmu_init model=0 is >> an appropriate model - and a required parameter (-cpu host,

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread Avi Kivity
On 06/15/2011 07:51 PM, David Ahern wrote: The qemu-kvm change is setting the pmu version to 1, and your patchset introduces v1 event constraints. So based on intel_pmu_init model=0 is an appropriate model - and a required parameter (-cpu host,model=0). With that option I get the label as expect

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-15 Thread David Ahern
On 06/15/2011 10:27 AM, Avi Kivity wrote: > On 06/15/2011 07:08 PM, David Ahern wrote: >> > What does >> > dmesg say about Perf? >> >> [0.050995] Performance Events: Nehalem events, core PMU driver. >> [0.051466] ... version:1 >> [0.052998] ... bit width:

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-15 Thread Avi Kivity
On 06/15/2011 07:08 PM, David Ahern wrote: > What does > dmesg say about Perf? [0.050995] Performance Events: Nehalem events, core PMU driver. [0.051466] ... version:1 [0.052998] ... bit width: 40 [0.053999] ... generic registers: 2 [0.0549

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-15 Thread David Ahern
On 06/15/2011 07:22 AM, Avi Kivity wrote: > On 06/15/2011 03:40 PM, David Ahern wrote: >> On 06/15/2011 02:57 AM, Avi Kivity wrote: >> > Okay. If you do anything interesting with it, please let us know. I >> > only tested the watchdog, 'perf top', and 'perf stat'. >> > >> >> For the following

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-15 Thread Avi Kivity
On 06/15/2011 03:40 PM, David Ahern wrote: On 06/15/2011 02:57 AM, Avi Kivity wrote: > Okay. If you do anything interesting with it, please let us know. I > only tested the watchdog, 'perf top', and 'perf stat'. > For the following I was using the userspace command from latest perf-core bran

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-15 Thread David Ahern
On 06/15/2011 02:57 AM, Avi Kivity wrote: > Okay. If you do anything interesting with it, please let us know. I > only tested the watchdog, 'perf top', and 'perf stat'. > For the following I was using the userspace command from latest perf-core branch. cycles H/W event is not working for me, s

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-15 Thread Avi Kivity
On 06/14/2011 09:11 PM, David Ahern wrote: > > Based on Patch 2 you are expecting the guest to have this feature set. > I've tried +perfmon and +arch_perfmon in the cpu definition for qemu-kvm > (e.g., -cpu host,model=0,+perfmon) no luck > nevermind. I hand applied your qemu-kvm patch and chan

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-14 Thread David Ahern
On 06/14/2011 11:48 AM, David Ahern wrote: > On 06/14/2011 11:33 AM, David Ahern wrote: >> Avi: still no luck: >> [0.047996] Performance Events: unsupported p6 CPU model 0 no PMU >> driver, software events only. >> >> qemu-kvm next branch, ce5f0a588b740e8f28f46a6009e12cfa72edc51f with your >>

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-14 Thread David Ahern
On 06/14/2011 11:33 AM, David Ahern wrote: > Avi: still no luck: > [0.047996] Performance Events: unsupported p6 CPU model 0 no PMU > driver, software events only. > > qemu-kvm next branch, ce5f0a588b740e8f28f46a6009e12cfa72edc51f with your > perfmon cpuid change. Host and guest are both runni

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-14 Thread David Ahern
On 06/14/2011 11:24 AM, Jan Kiszka wrote: > On 2011-06-14 19:15, David Ahern wrote: >> On 06/14/2011 02:36 AM, Avi Kivity wrote: >>> On 06/13/2011 10:55 PM, David Ahern wrote: On 06/13/2011 07:34 AM, Avi Kivity wrote: > This patchset exposes an emulated version 1 architectural performan

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-14 Thread Jan Kiszka
On 2011-06-14 19:15, David Ahern wrote: > On 06/14/2011 02:36 AM, Avi Kivity wrote: >> On 06/13/2011 10:55 PM, David Ahern wrote: >>> On 06/13/2011 07:34 AM, Avi Kivity wrote: This patchset exposes an emulated version 1 architectural performance monitoring unit to KVM guests. The PMU i

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-14 Thread David Ahern
On 06/14/2011 02:36 AM, Avi Kivity wrote: > On 06/13/2011 10:55 PM, David Ahern wrote: >> On 06/13/2011 07:34 AM, Avi Kivity wrote: >> > This patchset exposes an emulated version 1 architectural performance >> > monitoring unit to KVM guests. The PMU is emulated using perf_events, >> > so the h

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-14 Thread Avi Kivity
On 06/13/2011 10:55 PM, David Ahern wrote: On 06/13/2011 07:34 AM, Avi Kivity wrote: > This patchset exposes an emulated version 1 architectural performance > monitoring unit to KVM guests. The PMU is emulated using perf_events, > so the host kernel can multiplex host-wide, host-user, and the

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-13 Thread David Ahern
On 06/13/2011 07:34 AM, Avi Kivity wrote: > This patchset exposes an emulated version 1 architectural performance > monitoring unit to KVM guests. The PMU is emulated using perf_events, > so the host kernel can multiplex host-wide, host-user, and the > guest on available resources. Any particular

[PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-13 Thread Avi Kivity
This patchset exposes an emulated version 1 architectural performance monitoring unit to KVM guests. The PMU is emulated using perf_events, so the host kernel can multiplex host-wide, host-user, and the guest on available resources. Caveats: - counters that have PMI (interrupt) enabled stop count