On Thu, Jun 14, 2018 at 09:50:35AM +0100, Dr. David Alan Gilbert wrote:
> * Peter Xu (pet...@redhat.com) wrote:
> > On Wed, Jun 13, 2018 at 11:26:41AM +0100, Dr. David Alan Gilbert (git)
> > wrote:
> >
> > [...]
> >
> > > @@ -2932,10 +2943,24 @@ static void *migration_thread(void *opaque)
> > >
* Peter Xu (pet...@redhat.com) wrote:
> On Wed, Jun 13, 2018 at 11:26:41AM +0100, Dr. David Alan Gilbert (git) wrote:
>
> [...]
>
> > @@ -2932,10 +2943,24 @@ static void *migration_thread(void *opaque)
> >
> > migration_update_counters(s, current_time);
> >
> > +urgent =
On Wed, Jun 13, 2018 at 11:26:41AM +0100, Dr. David Alan Gilbert (git) wrote:
[...]
> @@ -2932,10 +2943,24 @@ static void *migration_thread(void *opaque)
>
> migration_update_counters(s, current_time);
>
> +urgent = false;
> if (qemu_file_rate_limit(s->to_dst_file))
From: "Dr. David Alan Gilbert"
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