[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] Re: [PATCH 7/6] Only probe qemu for machine types when binary changes



Mark McLoughlin wrote:
> By probing for qemu machine types, we increased the time of a
> GetCapabilities call from 100us to a whopping 60ms.
> 
> This patch takes the approach of only probing for machine types
> when the mtime of the emulator binary changed since the last time
> the capabilities were generated.
> 

Good idea!

> This brings the time of the call back to what it was for the most
> common case.
> 
> * src/capabilities.h: cache the emulator binary mtime
> 
> * src/qemu_conf.c: add qemudGetOldMachines() to copy the machine
>   types from the old caps struct if the mtime for the binary hasn't
>   changed
> 
> * src/qemu_conf.h, src/qemu_driver.c: pass the old caps pointer to
>   qemudCapsInit()
> ---
>  src/capabilities.h |    1 +
>  src/qemu_conf.c    |   97 ++++++++++++++++++++++++++++++++++++++++++++++++---
>  src/qemu_conf.h    |    2 +-
>  src/qemu_driver.c  |    4 +-
>  4 files changed, 95 insertions(+), 9 deletions(-)
> 

...

ACK, patch looks good to me.

- Cole


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]