]> git.proxmox.com Git - qemu.git/commit
QEMUFileBuffered: indicate that we're ready when the underlying file is ready
authorAvi Kivity <avi@redhat.com>
Wed, 7 Jul 2010 16:44:22 +0000 (19:44 +0300)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 19 Aug 2010 13:44:37 +0000 (08:44 -0500)
commit5e77aaa0d7d2f4ceaa4fcaf50f3a26d5150f34a6
tree0437f47eb6f848ab15c2e7dbc48bc93e587656ba
parent9fc391f8b54ea0be47baece3983e0f2224958f25
QEMUFileBuffered: indicate that we're ready when the underlying file is ready

QEMUFileBuffered stops writing when the underlying QEMUFile is not ready,
and tells its producer so.  However, when the underlying QEMUFile becomes
ready, it neglects to pass that information along, resulting in stoppage
of all data until the next tick (a tenths of a second).

Usually this doesn't matter, because most QEMUFiles used with QEMUFileBuffered
are almost always ready, but in the case of exec: migration this is not true,
due to the small pipe buffers used to connect to the target process.  The
result is very slow migration.

Fix by detecting the readiness notification and propagating it.  The detection
is a little ugly since QEMUFile overloads put_buffer() to send it, but that's
the suject for a different patch.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
buffered_file.c