Re: [PATCH 0 of 6] PowerPC KVM patches for 2.6.29

2008-12-03 Thread Hollis Blanchard
On Wed, 2008-12-03 at 13:22 -0600, Hollis Blanchard wrote:
> On Wed, 2008-12-03 at 19:06 +0200, Avi Kivity wrote:
> > Hollis Blanchard wrote:
> > >
> > >> I'm not thrilled about the private exit timing statistics gathering, 
> > >> hopefully it can be morphed into the more general framework.
> > >> 
> > >
> > > Is there anything in particular you have in mind? I think it could be
> > > generally useful, but since x86 has hardware support for performance
> > > monitoring, oprofile will already give you more accurate information. Of
> > > course, I don't think you could extract standard deviation from an
> > > oprofile report, and that has been very useful for us because it can
> > > tell us e.g. 99% of instruction emulation is handled in the minimum
> > > amount of time, but 1% takes hundreds of ms.
> > >   
> > 
> > kvmtrace is basically a bunch of trace_marker()s sprinkled around the 
> > code.  the marker infrastructure allow you to attach a callback to the 
> > markers, where you can do the accounting.  The nice thing it can be 
> > switched off at runtime, being replaced by a nop so 
> > compiled-in-but-disabled overhead is very low.
> 
> However, we grab timestamps extremely early and late in the exit
> handlers, in contexts from which it is not safe to call C code. This is
> really important because we need to be able to measure the time spent in
> the interrupt handler assembly. For x86 that may be confined to a simple
> inline asm statement, but the code in
> arch/powerpc/kvm/booke_interrupts.S is non-trivial and worth measuring.

Well, I suppose we could save the timestamp to the vcpu, and call
kvmtrace code later using that data. I'll stop now and let Christian
comment when he's back. :)

-- 
Hollis Blanchard
IBM Linux Technology Center

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0 of 6] PowerPC KVM patches for 2.6.29

2008-12-03 Thread Hollis Blanchard
On Wed, 2008-12-03 at 19:06 +0200, Avi Kivity wrote:
> Hollis Blanchard wrote:
> >
> >> I'm not thrilled about the private exit timing statistics gathering, 
> >> hopefully it can be morphed into the more general framework.
> >> 
> >
> > Is there anything in particular you have in mind? I think it could be
> > generally useful, but since x86 has hardware support for performance
> > monitoring, oprofile will already give you more accurate information. Of
> > course, I don't think you could extract standard deviation from an
> > oprofile report, and that has been very useful for us because it can
> > tell us e.g. 99% of instruction emulation is handled in the minimum
> > amount of time, but 1% takes hundreds of ms.
> >   
> 
> kvmtrace is basically a bunch of trace_marker()s sprinkled around the 
> code.  the marker infrastructure allow you to attach a callback to the 
> markers, where you can do the accounting.  The nice thing it can be 
> switched off at runtime, being replaced by a nop so 
> compiled-in-but-disabled overhead is very low.

However, we grab timestamps extremely early and late in the exit
handlers, in contexts from which it is not safe to call C code. This is
really important because we need to be able to measure the time spent in
the interrupt handler assembly. For x86 that may be confined to a simple
inline asm statement, but the code in
arch/powerpc/kvm/booke_interrupts.S is non-trivial and worth measuring.

-- 
Hollis Blanchard
IBM Linux Technology Center

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0 of 6] PowerPC KVM patches for 2.6.29

2008-12-03 Thread Avi Kivity

Hollis Blanchard wrote:


I'm not thrilled about the private exit timing statistics gathering, 
hopefully it can be morphed into the more general framework.



Is there anything in particular you have in mind? I think it could be
generally useful, but since x86 has hardware support for performance
monitoring, oprofile will already give you more accurate information. Of
course, I don't think you could extract standard deviation from an
oprofile report, and that has been very useful for us because it can
tell us e.g. 99% of instruction emulation is handled in the minimum
amount of time, but 1% takes hundreds of ms.
  


kvmtrace is basically a bunch of trace_marker()s sprinkled around the 
code.  the marker infrastructure allow you to attach a callback to the 
markers, where you can do the accounting.  The nice thing it can be 
switched off at runtime, being replaced by a nop so 
compiled-in-but-disabled overhead is very low.


--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0 of 6] PowerPC KVM patches for 2.6.29

2008-12-03 Thread Hollis Blanchard
On Wed, 2008-12-03 at 13:32 +0200, Avi Kivity wrote:
> Hollis Blanchard wrote:
> > Hi Avi, here's the latest batch of PowerPC kernel patches.
> >
> > The first set dramatically improve performance. Most importantly, we add
> > support for large host pages with KVM (i.e. PAGE_SHIFT > 12). (Large *guest*
> > pages have already been supported since day 1, since the guest kernel uses
> > them for the linear map.) Followup patches further improve performance by
> > changing how we manage the shadow TLB.
> >
> > The last two add some accounting code to easily discover performance
> > bottlenecks. This is especially important since the 440 core lacks 
> > performance
> > monitoring hardware.
> >
> > These patches, in conjunction with 64KB pages on guest and host, get us to 
> > 96%
> > of native performance for compute-bound workloads, which I'm pretty happy
> > with. See http://kvm.qumranet.com/kvmwiki/PowerPC_Exittimings for more
> > details (those statistics were gathered using the accounting patches).
> >
> > These have been tested pretty thoroughly for several weeks. Please apply for
> > 2.6.29. Thanks!
> >   
> 
> Applied all, thanks.

Thanks.

> I'm not thrilled about the private exit timing statistics gathering, 
> hopefully it can be morphed into the more general framework.

Is there anything in particular you have in mind? I think it could be
generally useful, but since x86 has hardware support for performance
monitoring, oprofile will already give you more accurate information. Of
course, I don't think you could extract standard deviation from an
oprofile report, and that has been very useful for us because it can
tell us e.g. 99% of instruction emulation is handled in the minimum
amount of time, but 1% takes hundreds of ms.

I'll let Christian comment when he gets back from vacation on Monday.

-- 
Hollis Blanchard
IBM Linux Technology Center

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0 of 6] PowerPC KVM patches for 2.6.29

2008-12-03 Thread Avi Kivity

Hollis Blanchard wrote:

Hi Avi, here's the latest batch of PowerPC kernel patches.

The first set dramatically improve performance. Most importantly, we add
support for large host pages with KVM (i.e. PAGE_SHIFT > 12). (Large *guest*
pages have already been supported since day 1, since the guest kernel uses
them for the linear map.) Followup patches further improve performance by
changing how we manage the shadow TLB.

The last two add some accounting code to easily discover performance
bottlenecks. This is especially important since the 440 core lacks performance
monitoring hardware.

These patches, in conjunction with 64KB pages on guest and host, get us to 96%
of native performance for compute-bound workloads, which I'm pretty happy
with. See http://kvm.qumranet.com/kvmwiki/PowerPC_Exittimings for more
details (those statistics were gathered using the accounting patches).

These have been tested pretty thoroughly for several weeks. Please apply for
2.6.29. Thanks!
  


Applied all, thanks.

I'm not thrilled about the private exit timing statistics gathering, 
hopefully it can be morphed into the more general framework.


--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html