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

Hi,

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.

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

But I'm not sure about using timedwait function here with qemu_global_mutex.
The original function uses qemu_mutex_unlock_iothread + qemu_mutex_lock_iothread
It differs from locking/unlocking (inside timedwait) qemu_global_mutex
because of using qemu_bql_mutex_lock_func function which could be anything.
This is why the series is RFC.

What do you think?
Thanks!

Yury Kotov (2):
  qemu-thread: Add qemu_cond_timedwait
  cpus: Fix throttling during vm_stop

 cpus.c                   | 27 +++++++++++++++++++--------
 include/qemu/thread.h    | 12 ++++++++++++
 util/qemu-thread-posix.c | 40 ++++++++++++++++++++++++++++------------
 util/qemu-thread-win32.c | 16 ++++++++++++++++
 4 files changed, 75 insertions(+), 20 deletions(-)

-- 
2.22.0



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

end of thread, other threads:[~2019-07-15 12:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-10  9:23 [Qemu-devel] [RFC PATCH 0/2] High downtime with 95+ throttle pct Yury Kotov
2019-07-10  9:23 ` [Qemu-devel] [RFC PATCH 1/2] qemu-thread: Add qemu_cond_timedwait Yury Kotov
2019-07-10  9:23 ` [Qemu-devel] [RFC PATCH 2/2] cpus: Fix throttling during vm_stop Yury Kotov
2019-07-15  9:40   ` Yury Kotov
2019-07-15 11:00     ` Paolo Bonzini
2019-07-15 12:36       ` Yury Kotov
2019-07-15 12:54         ` Paolo Bonzini
2019-07-10  9:56 ` [Qemu-devel] [RFC PATCH 0/2] High downtime with 95+ throttle pct Dr. David Alan Gilbert
2019-07-10 10:24   ` Yury Kotov

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).