Re: [libvirt] [PATCH 3/4] Cache result of QEMU capabilities extraction

2014-03-06 Thread Daniel P. Berrange
On Wed, Mar 05, 2014 at 05:53:48PM -0700, Eric Blake wrote: On 03/05/2014 10:53 AM, Daniel P. Berrange wrote: Extracting capabilities from QEMU takes a notable amount of time when all QEMU binaries are installed. Each system emulator needs about 200-300ms multiplied by 26 binaries == ~5-8

Re: [libvirt] [PATCH 3/4] Cache result of QEMU capabilities extraction

2014-03-06 Thread Daniel P. Berrange
On Wed, Mar 05, 2014 at 09:40:34PM +0100, Guido Günther wrote: Hi Daniel, On Wed, Mar 05, 2014 at 05:53:53PM +, Daniel P. Berrange wrote: [..snip..] +/* Discard if cache is older that QEMU binary */ +/* XXX must also compare to libvirtd timestamp */ +if (sb.st_mtime

[libvirt] [PATCH 3/4] Cache result of QEMU capabilities extraction

2014-03-05 Thread Daniel P. Berrange
Extracting capabilities from QEMU takes a notable amount of time when all QEMU binaries are installed. Each system emulator needs about 200-300ms multiplied by 26 binaries == ~5-8 seconds. This change causes the QEMU driver to save an XML file containing the content of the virQEMUCaps object

Re: [libvirt] [PATCH 3/4] Cache result of QEMU capabilities extraction

2014-03-05 Thread Guido Günther
Hi Daniel, On Wed, Mar 05, 2014 at 05:53:53PM +, Daniel P. Berrange wrote: [..snip..] +/* Discard if cache is older that QEMU binary */ +/* XXX must also compare to libvirtd timestamp */ +if (sb.st_mtime qemuCaps-mtime) { I think looking at the mtime isn't sufficent here.

Re: [libvirt] [PATCH 3/4] Cache result of QEMU capabilities extraction

2014-03-05 Thread Eric Blake
On 03/05/2014 01:40 PM, Guido Günther wrote: Hi Daniel, On Wed, Mar 05, 2014 at 05:53:53PM +, Daniel P. Berrange wrote: [..snip..] +/* Discard if cache is older that QEMU binary */ +/* XXX must also compare to libvirtd timestamp */ +if (sb.st_mtime qemuCaps-mtime) { I

Re: [libvirt] [PATCH 3/4] Cache result of QEMU capabilities extraction

2014-03-05 Thread Eric Blake
On 03/05/2014 10:53 AM, Daniel P. Berrange wrote: Extracting capabilities from QEMU takes a notable amount of time when all QEMU binaries are installed. Each system emulator needs about 200-300ms multiplied by 26 binaries == ~5-8 seconds. This change causes the QEMU driver to save an XML