Commit 0a1af395bc16a0ab42fbe5819a2fa73694740cd5

Authored by aliguori
1 parent 56f3a5d0

Increase default IO timeout from 10ms to 5s

With the recent changes to the main loop, we no longer have unconditional
polling.  This means we can now sleep in select() for much longer than we
previously did.  This patch increases our select() sleep time from 10ms to 5s
which is effectively unlimited since we're going to wake up sooner than that
in almost all circumstances.

With this patch, I see the number of wake-ups with an idle dynamic ticks guest
drop from 80 per second to about 15 times per second.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5578 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 2 additions and 2 deletions
@@ -8182,7 +8182,7 @@ static int main_loop(void) @@ -8182,7 +8182,7 @@ static int main_loop(void)
8182 timeout = 0; 8182 timeout = 0;
8183 } 8183 }
8184 } else { 8184 } else {
8185 - timeout = 10; 8185 + timeout = 5000;
8186 } 8186 }
8187 } else { 8187 } else {
8188 timeout = 0; 8188 timeout = 0;
@@ -8192,7 +8192,7 @@ static int main_loop(void) @@ -8192,7 +8192,7 @@ static int main_loop(void)
8192 ret = EXCP_INTERRUPT; 8192 ret = EXCP_INTERRUPT;
8193 break; 8193 break;
8194 } 8194 }
8195 - timeout = 10; 8195 + timeout = 5000;
8196 } 8196 }
8197 #ifdef CONFIG_PROFILER 8197 #ifdef CONFIG_PROFILER
8198 ti = profile_getclock(); 8198 ti = profile_getclock();