[Top][All Lists]

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

Re: [Qemu-devel] [RFC 00/27] Migration thread (WIP)

From: Jan Kiszka
Subject: Re: [Qemu-devel] [RFC 00/27] Migration thread (WIP)
Date: Thu, 26 Jul 2012 13:56:41 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv: Gecko/20080226 SUSE/ Thunderbird/ Mnenhy/

On 2012-07-26 13:16, Juan Quintela wrote:
> Jan Kiszka <address@hidden> wrote:
>> On 2012-07-24 20:36, Juan Quintela wrote:
>>> Hi
>>> Appart of the review:
>>> - Are there any locking issues that I have missed (I guess so)
>>> - stop all cpus correctly.  vm_stop should be called from the iothread,
>>>   I use the trick of using a bottom half to get that working correctly.
>>>   but this _implementation_ is ugly as hell.  Is there an easy way
>>>   of doing it?
>> vm_stop is prepared to be called from vcpu context as well. I'm not sure
>> right now if we actually do, but the code is there.
> But this is a migation_thread (i.e. neither iothread of vcpu), and we
> need to wait for vm_stop to finish.  My reading is that in vcpu context,
> we just ask the iothread to stop all cpus.
> void vm_stop(RunState state)
> {
>     if (!qemu_thread_is_self(&io_thread)) {
>         qemu_system_vmstop_request(state);
>         /*
>          * FIXME: should not return to device code in case
>          * vm_stop() has been requested.
>          */
>         cpu_stop_current();
>         return;
>     }
>     do_vm_stop(state);
> }
> Or I am reading it wrong?

Ah, indeed. Did you try top make this service ready for such a use case
(sorry, didn't look at the code yet)? Something like issuing
qemu_system_vmstop_request and then resuming the with the next step on a
vmstate change notification?


Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux

reply via email to

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