Re: [PATCH v5] Add functions for handling exponential backoff loops.

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

 



On 15.04.2016 13:53, Richard W.M. Jones wrote:
> In a few places in libvirt we busy-wait for events, for example qemu
> creating a monitor socket.  This is problematic because:
> 
>  - We need to choose a sufficiently small polling period so that
>    libvirt doesn't add unnecessary delays.
> 
>  - We need to choose a sufficiently large polling period so that
>    the effect of busy-waiting doesn't affect the system.
> 
> The solution to this conflict is to use an exponential backoff.
> 
> This patch adds two functions to hide the details, and modifies a few
> places where we currently busy-wait.
> ---
>  src/fdstream.c           | 10 +++---
>  src/libvirt_private.syms |  2 ++
>  src/qemu/qemu_agent.c    |  9 +++---
>  src/qemu/qemu_monitor.c  | 10 +++---
>  src/util/virtime.c       | 81 ++++++++++++++++++++++++++++++++++++++++++++++++
>  src/util/virtime.h       | 11 +++++++
>  6 files changed, 111 insertions(+), 12 deletions(-)

ACK. Sorry for making you send v5 to such simple patch.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]