[libvirt] [PATCH v2 4/5] Introduce VIR_CONNECT_GET_ALL_DOMAINS_STATS_NOWAIT

Michal Prívozník mprivozn at redhat.com
Tue Jun 19 06:08:08 UTC 2018


On 06/19/2018 01:25 AM, John Ferlan wrote:
> 
> 
> On 06/15/2018 04:18 AM, Michal Privoznik wrote:
>> https://bugzilla.redhat.com/show_bug.cgi?id=1552092
>>
>> If there's a long running job it might cause us to wait 30
>> seconds before we give up acquiring the job. This is problematic
>> to interactive applications that fetch stats repeatedly every few
>> seconds.
>>
>> The solution is to introduce
>> VIR_CONNECT_GET_ALL_DOMAINS_STATS_NOWAIT flag which tries to
>> acquire job but does not wait if acquiring failed.
>>
>> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>> ---
>>  include/libvirt/libvirt-domain.h |  2 ++
>>  src/libvirt-domain.c             | 12 ++++++++++++
>>  src/qemu/qemu_driver.c           | 15 ++++++++++++---
>>  3 files changed, 26 insertions(+), 3 deletions(-)
>>
> 
> Reviewed-by: John Ferlan <jferlan at redhat.com>
> 
> John
> 
> Is the 30 seconds qemu specific?  Could drop it from the commit message
> - if you feel so compelled.
> 

Yes & no. Each driver has its own timeout but all set it to 30 seconds:

#define LXC_JOB_WAIT_TIME (1000ull * 30)
#define LIBXL_JOB_WAIT_TIME (1000ull * 30)
#define VZ_JOB_WAIT_TIME (1000 * 30)
#define QEMU_JOB_WAIT_TIME (1000ull * 30)

Therefore I rather keep 30seconds in the commit message.

Michal




More information about the libvir-list mailing list