Patchwork [v2,5/5] qemu_calculate_timeout: increase minimum timeout to 1h

login
register
mail settings
Submitter Stefano Stabellini
Date Jan. 27, 2012, 12:26 p.m.
Message ID <1327667215-5411-5-git-send-email-stefano.stabellini@eu.citrix.com>
Download mbox | patch
Permalink /patch/138217/
State New
Headers show

Comments

Stefano Stabellini - Jan. 27, 2012, 12:26 p.m.
There is no reason why the minimum timeout should be 1sec, it could
easily be 1h and we would save lots of cpu cycles.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
 qemu-timer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Paolo Bonzini - Jan. 27, 2012, 2:43 p.m.
On 01/27/2012 01:26 PM, Stefano Stabellini wrote:
> There is no reason why the minimum timeout should be 1sec, it could
> easily be 1h and we would save lots of cpu cycles.
>
> Signed-off-by: Stefano Stabellini<stefano.stabellini@eu.citrix.com>
> ---
>   qemu-timer.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/qemu-timer.c b/qemu-timer.c
> index 648db1d..b792a32 100644
> --- a/qemu-timer.c
> +++ b/qemu-timer.c
> @@ -844,6 +844,6 @@ fail:
>
>   int qemu_calculate_timeout(void)
>   {
> -    return 1000;
> +    return 1000*60*60;
>   }
>

This might break Windows networking, but I'm going to fix it before 1.1 
anyway.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

Paolo
Stefano Stabellini - Jan. 27, 2012, 3:44 p.m.
On Fri, 27 Jan 2012, Paolo Bonzini wrote:
> On 01/27/2012 01:26 PM, Stefano Stabellini wrote:
> > There is no reason why the minimum timeout should be 1sec, it could
> > easily be 1h and we would save lots of cpu cycles.
> >
> > Signed-off-by: Stefano Stabellini<stefano.stabellini@eu.citrix.com>
> > ---
> >   qemu-timer.c |    2 +-
> >   1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/qemu-timer.c b/qemu-timer.c
> > index 648db1d..b792a32 100644
> > --- a/qemu-timer.c
> > +++ b/qemu-timer.c
> > @@ -844,6 +844,6 @@ fail:
> >
> >   int qemu_calculate_timeout(void)
> >   {
> > -    return 1000;
> > +    return 1000*60*60;
> >   }
> >
> 
> This might break Windows networking, but I'm going to fix it before 1.1 
> anyway.
> 
> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
 
Thanks!

Patch

diff --git a/qemu-timer.c b/qemu-timer.c
index 648db1d..b792a32 100644
--- a/qemu-timer.c
+++ b/qemu-timer.c
@@ -844,6 +844,6 @@  fail:
 
 int qemu_calculate_timeout(void)
 {
-    return 1000;
+    return 1000*60*60;
 }