qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3 0/3] High downtime with 95+ throttle pct
@ 2019-07-18  9:17 Yury Kotov
  2019-07-18  9:17 ` [Qemu-devel] [PATCH v3 1/3] qemu-thread: Add qemu_cond_timedwait Yury Kotov
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Yury Kotov @ 2019-07-18  9:17 UTC (permalink / raw)
  To: Paolo Bonzini, Peter Crosthwaite, Richard Henderson,
	Juan Quintela, Dr. David Alan Gilbert, Stefan Weil
  Cc: open list:Overall, yc-core

Hi,

V3:
* Rebase fixes (migrate_set_parameter -> migrate_set_parameter_int)

V2:
* Added a test
* Fixed qemu_cond_timedwait for qsp

I wrote a test for migration auto converge and found out a strange thing:
1. Enable auto converge
2. Set max-bandwidth 1Gb/s
3. Set downtime-limit 1ms
4. Run standard test (just writes a byte per page)
5. Wait for converge
6. It's converged with 99% throttle percentage
7. The result downtime was about 300-600ms   <<<<

It's much higher than expected 1ms. I figured out that cpu_throttle_thread()
function sleeps for 100ms+ for high throttle percentage (>=95%) in VCPU thread.
And it sleeps even after a cpu kick.

Fixed it by using timedwait for ms part of sleep.
E.g timedwait(halt_cond, 1ms) + usleep(500).

Regards,
Yury

Yury Kotov (3):
  qemu-thread: Add qemu_cond_timedwait
  cpus: Fix throttling during vm_stop
  tests/migration: Add a test for auto converge

 cpus.c                   |  27 ++++++---
 include/qemu/thread.h    |  18 ++++++
 tests/migration-test.c   | 119 +++++++++++++++++++++++++++++++++++----
 util/qemu-thread-posix.c |  40 +++++++++----
 util/qemu-thread-win32.c |  16 ++++++
 util/qsp.c               |  18 ++++++
 6 files changed, 207 insertions(+), 31 deletions(-)

-- 
2.22.0



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-07-23 10:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-18  9:17 [Qemu-devel] [PATCH v3 0/3] High downtime with 95+ throttle pct Yury Kotov
2019-07-18  9:17 ` [Qemu-devel] [PATCH v3 1/3] qemu-thread: Add qemu_cond_timedwait Yury Kotov
2019-07-18  9:17 ` [Qemu-devel] [PATCH v3 2/3] cpus: Fix throttling during vm_stop Yury Kotov
2019-07-18  9:17 ` [Qemu-devel] [PATCH v3 3/3] tests/migration: Add a test for auto converge Yury Kotov
2019-07-22 17:35   ` Dr. David Alan Gilbert
2019-07-23  8:54     ` Yury Kotov
2019-07-23 10:23       ` Dr. David Alan Gilbert
2019-07-18 15:33 ` [Qemu-devel] [PATCH v3 0/3] High downtime with 95+ throttle pct no-reply

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).