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 way in

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 meyer...@redhat.com Date: Thu, 29 Jan 2009 22:50:36 +0100 Subject: [PATCH] allow disk cache mode

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 berra...@redhat.com 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

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 berra...@redhat.com 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

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 berra...@redhat.com wrote: ... Further up in this code its already adding cache=off for shared disks. Probably introduced by me in the

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 berra...@redhat.com 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 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

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

2009-01-29 Thread Jim Meyering
john cooper john.coo...@redhat.com 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

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

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

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 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 drive.

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

[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