Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-10 Thread Zhang, Yanmin
On Thu, 2010-06-10 at 11:50 +0200, Peter Zijlstra wrote: > On Thu, 2010-06-10 at 10:21 +0800, Zhang, Yanmin wrote: > > . The ABI mostly includes the definition of struct perf_event_attr, > > guest_perf_counter, > > and hypercalls. > > Note that perf_event_attr isn't guaranteed to be stable betwee

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-10 Thread Peter Zijlstra
On Thu, 2010-06-10 at 10:21 +0800, Zhang, Yanmin wrote: > . The ABI mostly includes the definition of struct perf_event_attr, > guest_perf_counter, > and hypercalls. Note that perf_event_attr isn't guaranteed to be stable between kernels, it can grow. -- To unsubscribe from this list: send the li

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Zhang, Yanmin
On Thu, 2010-06-10 at 06:06 +0300, Avi Kivity wrote: > On 06/10/2010 05:21 AM, Zhang, Yanmin wrote: > > > >> I see. So put it in a union. Or perhaps not even in a union - what if > >> a kvm guest is also acting as a kvm host? > >> > > My patch has consideration on it. I compiled kernel with

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Avi Kivity
On 06/10/2010 05:21 AM, Zhang, Yanmin wrote: I see. So put it in a union. Or perhaps not even in a union - what if a kvm guest is also acting as a kvm host? My patch has consideration on it. I compiled kernel with host and guest support at the same time. The accessing to perf_event->sh

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Zhang, Yanmin
On Wed, 2010-06-09 at 12:41 +0300, Avi Kivity wrote: > On 06/09/2010 12:21 PM, Zhang, Yanmin wrote: > > > >> One thing that's missing is documentation of the guest/host ABI. It > >> will be a requirement for inclusion, but it will also be a great help > >> for review, so please provide it ASAP. >

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Avi Kivity
On 06/09/2010 01:08 PM, Peter Zijlstra wrote: On Wed, 2010-06-09 at 12:41 +0300, Avi Kivity wrote: Disabling the watchdog is unfortunate. Why is it necessary? perf always uses NMI, so we disable the nmi_watchdog when a perf_event is set up in case they might have impact.

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Ingo Molnar
* Peter Zijlstra wrote: > On Wed, 2010-06-09 at 12:41 +0300, Avi Kivity wrote: > > > > >> Disabling the watchdog is unfortunate. Why is it necessary? > > >> > > > perf always uses NMI, so we disable the nmi_watchdog when a perf_event is > > > set up in case they might have impact. > > >

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Peter Zijlstra
On Wed, 2010-06-09 at 12:41 +0300, Avi Kivity wrote: > > >> Disabling the watchdog is unfortunate. Why is it necessary? > >> > > perf always uses NMI, so we disable the nmi_watchdog when a perf_event is > > set up in case they might have impact. > > > > Ok. Is that the case for the ha

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Avi Kivity
On 06/09/2010 12:30 PM, Zhang, Yanmin wrote: On Wed, 2010-06-09 at 11:59 +0300, Avi Kivity wrote: On 06/09/2010 06:30 AM, Zhang, Yanmin wrote: From: Zhang, Yanmin Based on Ingo's idea, I implement a para virt interface for perf to support statistics collection in guest os. That means

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Avi Kivity
On 06/09/2010 12:21 PM, Zhang, Yanmin wrote: One thing that's missing is documentation of the guest/host ABI. It will be a requirement for inclusion, but it will also be a great help for review, so please provide it ASAP. I will add such document. It will includes: 1) Data struct perf_e

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Zhang, Yanmin
On Wed, 2010-06-09 at 11:59 +0300, Avi Kivity wrote: > On 06/09/2010 06:30 AM, Zhang, Yanmin wrote: > > From: Zhang, Yanmin > > > > Based on Ingo's idea, I implement a para virt interface for perf to support > > statistics collection in guest os. That means we could run tool perf in > > guest > >

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Zhang, Yanmin
On Wed, 2010-06-09 at 11:33 +0300, Avi Kivity wrote: > On 06/09/2010 06:30 AM, Zhang, Yanmin wrote: > > From: Zhang, Yanmin > > > > Based on Ingo's idea, I implement a para virt interface for perf to support > > statistics collection in guest os. That means we could run tool perf in > > guest > >

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Avi Kivity
On 06/09/2010 06:30 AM, Zhang, Yanmin wrote: From: Zhang, Yanmin Based on Ingo's idea, I implement a para virt interface for perf to support statistics collection in guest os. That means we could run tool perf in guest os directly. Great thanks to Peter Zijlstra. He is really the architect and

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Avi Kivity
On 06/09/2010 06:30 AM, Zhang, Yanmin wrote: From: Zhang, Yanmin Based on Ingo's idea, I implement a para virt interface for perf to support statistics collection in guest os. That means we could run tool perf in guest os directly. Great thanks to Peter Zijlstra. He is really the architect and

[RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-08 Thread Zhang, Yanmin
From: Zhang, Yanmin Based on Ingo's idea, I implement a para virt interface for perf to support statistics collection in guest os. That means we could run tool perf in guest os directly. Great thanks to Peter Zijlstra. He is really the architect and gave me architecture design suggestions. I al