Re: [libvirt] patch: allow disk cache mode to be specified in a domain's xml definition.

2009-01-30 Thread Daniel P. Berrange
On Fri, Jan 30, 2009 at 10:10:34AM -0500, john cooper wrote: > > With this change I think it is good to go. > The attached patch incorporates the above > modification. NACK, please see my proposed patch elsewhere in this thread. daniel -- |: Red Hat, Engineering, London -o- http://people.re

Re: [libvirt] patch: allow disk cache mode to be specified in a domain's xml definition.

2009-01-30 Thread john cooper
Jim Meyering wrote: Hi John, I tried to apply that, but failed miserably, since all of the following was recently redone to use virBufferVSprintf rather than snprintf. Yea I suspected the code was likely seeing some motion. Thanks for bringing it forward. And it's a good thing, because with t

Re: [libvirt] patch: allow disk cache mode to be specified in a domain's xml definition.

2009-01-30 Thread Jim Meyering
"Daniel P. Berrange" wrote: > Here's the patch including RNG schema update > > Daniel > > diff -r 2ff2ff7734c2 docs/schemas/domain.rng > --- a/docs/schemas/domain.rng Fri Jan 30 11:01:52 2009 + > +++ b/docs/schemas/domain.rng Fri Jan 30 14:47:11 2009 + > @@ -426,16 +426,43 @@ > --> >

Re: [libvirt] patch: allow disk cache mode to be specified in a domain's xml definition.

2009-01-30 Thread Daniel P. Berrange
On Fri, Jan 30, 2009 at 02:41:18PM +, Daniel P. Berrange wrote: > On Fri, Jan 30, 2009 at 03:27:55PM +0100, Jim Meyering wrote: > > "Daniel P. Berrange" wrote: > > ... > > > Further up in this code its already adding cache=off for shared disks. > > > > Probably introduced by me in the merge.

Re: [libvirt] patch: allow disk cache mode to be specified in a domain's xml definition.

2009-01-30 Thread Daniel P. Berrange
On Fri, Jan 30, 2009 at 03:27:55PM +0100, Jim Meyering wrote: > "Daniel P. Berrange" wrote: > ... > > Further up in this code its already adding cache=off for shared disks. > > Probably introduced by me in the merge. > > > There's also quite a few code style issues, not following conventions > >

Re: [libvirt] patch: allow disk cache mode to be specified in a domain's xml definition.

2009-01-30 Thread Jim Meyering
"Daniel P. Berrange" wrote: ... > Further up in this code its already adding cache=off for shared disks. Probably introduced by me in the merge. > There's also quite a few code style issues, not following conventions > of the surrounding code. > > Here's a patch which addresses all that, and mor

Re: [libvirt] patch: allow disk cache mode to be specified in a domain's xml definition.

2009-01-30 Thread Daniel P. Berrange
On Fri, Jan 30, 2009 at 12:07:31AM +0100, Jim Meyering wrote: > Here's your rebased and adjusted patch: > > > From ce4f15853e119d6d976a5d29917f62f577e8ec9e Mon Sep 17 00:00:00 2001 > From: Jim Meyering > Date: Thu, 29 Jan 2009 22:50:36 +0100 > Subject: [PATCH] allow disk cache mode to be specif

Re: style question (was Re: [libvirt] patch: allow disk cache mode to be specified in a domain's xml definition.)

2009-01-30 Thread Daniel P. Berrange
On Thu, Jan 29, 2009 at 10:48:36PM -0500, Dave Allan wrote: > Jim Meyering wrote: > >Finally, I moved a couple variable declarations > >down (C99-style) to their points of first use. > > I take it that the C++/C99 is the recommended style for all libvirt > code? I generally haven't coded this wa

style question (was Re: [libvirt] patch: allow disk cache mode to be specified in a domain's xml definition.)

2009-01-29 Thread Dave Allan
Jim Meyering wrote: Finally, I moved a couple variable declarations down (C99-style) to their points of first use. I take it that the C++/C99 is the recommended style for all libvirt code? I generally haven't coded this way in the past (in fact I usually compile with -Wdeclaration-after-stat

Re: [libvirt] patch: allow disk cache mode to be specified in a domain's xml definition.

2009-01-29 Thread Jim Meyering
john cooper wrote: > Daniel P. Berrange wrote: >> If you loook at src/qemu_conf.c, you'll find a nice method called >> qemudExtractVersionInfo, which runs 'qemu -help' and checks for >> certain interesting command line arguments :-) > That problem does seem to be crying for some type > of structur

Re: [libvirt] patch: allow disk cache mode to be specified in a domain's xml definition.

2009-01-27 Thread john cooper
Daniel P. Berrange wrote: If you loook at src/qemu_conf.c, you'll find a nice method called qemudExtractVersionInfo, which runs 'qemu -help' and checks for certain interesting command line arguments :-) That problem does seem to be crying for some type of structured interface to avoid subtle br

Re: [libvirt] patch: allow disk cache mode to be specified in a domain's xml definition.

2009-01-20 Thread Daniel P. Berrange
On Mon, Jan 19, 2009 at 10:06:47PM -0500, john cooper wrote: > >There have been two differnet syntaxes supported in QEMU for caching, > >so we need to detect this and switch between them. Originally there > >was just > > > > cache=on & cache=off (writethrough and no caching) > > > >Now it supports

Re: [libvirt] patch: allow disk cache mode to be specified in a domain's xml definition.

2009-01-19 Thread john cooper
Daniel P. Berrange wrote: A couple of extra things needed - Addition to tests/qemuxml2argvtest.c to validate the XML to struct to QEMU ARGV conversion. - Addition to tests/qemuxml2xmltest.c to validate XML to struct to XML round-trip conversions. - Addition to the docs/libvirt.rng XML

Re: [libvirt] patch: allow disk cache mode to be specified in a domain's xml definition.

2009-01-19 Thread Daniel P. Berrange
On Fri, Jan 16, 2009 at 03:46:01PM -0500, john cooper wrote: > We have found certain application scenarios where > overriding of the default qemu host cache mode > provides a substantial improvement in guest > performance. In particular, disabling host caching > of the file/dev backing a guest dri

[libvirt] patch: allow disk cache mode to be specified in a domain's xml definition.

2009-01-16 Thread john cooper
We have found certain application scenarios where overriding of the default qemu host cache mode provides a substantial improvement in guest performance. In particular, disabling host caching of the file/dev backing a guest drive. A summary of performance metrics may be found below. Attached is