]> git.proxmox.com Git - mirror_qemu.git/commit - migration/migration.c
migration: Wake rate limiting for urgent requests
authorDr. David Alan Gilbert <dgilbert@redhat.com>
Wed, 13 Jun 2018 10:26:41 +0000 (11:26 +0100)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Fri, 15 Jun 2018 13:40:56 +0000 (14:40 +0100)
commitad767bed5af559ed32c6dabdcaccc3f75731e1f4
treee29268c63f734e0d24788e5f1356d72647ab9d24
parent7e555c6c58f095c9286814c3f9cd06196feba8a1
migration: Wake rate limiting for urgent requests

Rate limiting sleeps the migration thread for a while when it runs
out of bandwidth; but sometimes we want to wake up to get on with
something more urgent (like a postcopy request).  Here we use
a semaphore with a timedwait instead of a simple sleep; Incrementing
the sempahore will wake it up sooner.  Anything that consumes
these urgent events must decrement the sempahore.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20180613102642.23995-3-dgilbert@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
migration/migration.c
migration/migration.h
migration/trace-events