[libvirt] Sleeping 50 microseconds in qemuDomainWaitForMigrationComplete?

Daniel Veillard veillard at redhat.com
Thu Mar 25 11:08:15 UTC 2010


On Thu, Mar 25, 2010 at 12:31:09AM +0100, Matthias Bolte wrote:
> There is this nanosleep call in the QEMU driver.
> 
> /* Poll every 50ms for progress & to allow cancellation */
> struct timespec ts = { .tv_sec = 0, .tv_nsec = 50 * 1000ull };
> [...]
> nanosleep(&ts, NULL);
> 
> The comment says 50ms (assuming m is for milli and not for micro.
> because normally u is used for micro) but the actual nanosleep call is
> done with 50 microseconds.
> 
> Is the comment right and the code wrong? I assume so, because 50
> microseconds is pretty short and 50 milliseconds sounds more
> reasonable.

  Ah, right, that looks like a subtle bug !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list