qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] runstate: ignore finishmigrate -> prelaunch transition


From: Dr. David Alan Gilbert
Subject: Re: [PATCH] runstate: ignore finishmigrate -> prelaunch transition
Date: Wed, 18 Dec 2019 16:52:42 +0000
User-agent: Mutt/1.13.0 (2019-11-30)

* Laurent Vivier (address@hidden) wrote:
> Ping?

Juan says he's doing a migration pull soon - this seems like a good one
for it.

Dave

> Thanks,
> Laurent
> 
> On 12/12/2019 20:40, Laurent Vivier wrote:
> > On 06/12/2019 20:52, Dr. David Alan Gilbert wrote:
> >> * Laurent Vivier (address@hidden) wrote:
> >>> Commit 1bd71dce4bf2 tries to prevent a finishmigrate -> prelaunch
> >>> transition by exiting at the beginning of the main_loop_should_exit()
> >>> function if the state is already finishmigrate.
> >>>
> >>> As the finishmigrate state is set in the migration thread it can
> >>> happen concurrently to the function. The migration thread and the
> >>> function are normally protected by the iothread mutex and thus the
> >>> state should no evolve between the start of the function and its end.
> >>>
> >>> Unfortunately during the function life the lock is released by
> >>> pause_all_vcpus() just before the point we need to be sure we are
> >>> not in finishmigrate state and if the migration thread is waiting
> >>> for the lock it will take the opportunity to change the state
> >>> to finishmigrate.
> >>
> >> Ewww.
> >> I hate those short wakeups for pause_all_vcpus; I'm sure there are loads
> >> more corners that break.
> >>
> >> Still, I _think_ this is an improvement, so:
> >>
> >> Reviewed-by: Dr. David Alan Gilbert <address@hidden>
> >>
> > 
> > Who volunteers to take this in his queue?
> > 
> > Thanks,
> > Laurent
> > 
> > 
> 
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK




reply via email to

[Prev in Thread] Current Thread [Next in Thread]