All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Denis V. Lunev" <den@openvz.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, Dmitry Andreev <dandreev@virtuozzo.com>
Subject: Re: [Qemu-devel] [PATCH 1/1] vl: change QEMU state machine for system reset
Date: Thu, 21 Jan 2016 15:56:19 +0300	[thread overview]
Message-ID: <56A0D573.7040309@openvz.org> (raw)
In-Reply-To: <56A0B465.9040109@redhat.com>

On 01/21/2016 01:35 PM, Paolo Bonzini wrote:
>
> On 19/01/2016 08:59, Denis V. Lunev wrote:
>> @@ -612,8 +617,10 @@ static const RunStateTransition runstate_transitions_def[] = {
>>   
>>       { RUN_STATE_FINISH_MIGRATE, RUN_STATE_RUNNING },
>>       { RUN_STATE_FINISH_MIGRATE, RUN_STATE_POSTMIGRATE },
>> +    { RUN_STATE_FINISH_MIGRATE, RUN_STATE_PRELAUNCH },
>>   
>>       { RUN_STATE_RESTORE_VM, RUN_STATE_RUNNING },
>> +    { RUN_STATE_RESTORE_VM, RUN_STATE_PRELAUNCH },
>>   
>>       { RUN_STATE_RUNNING, RUN_STATE_DEBUG },
>>       { RUN_STATE_RUNNING, RUN_STATE_INTERNAL_ERROR },
>> @@ -627,20 +634,25 @@ static const RunStateTransition runstate_transitions_def[] = {
>>       { RUN_STATE_RUNNING, RUN_STATE_GUEST_PANICKED },
>>   
>>       { RUN_STATE_SAVE_VM, RUN_STATE_RUNNING },
>> +    { RUN_STATE_SAVE_VM, RUN_STATE_PRELAUNCH },
> This should not happen; thus I would remove this line.
>
>>       { RUN_STATE_SHUTDOWN, RUN_STATE_PAUSED },
>>       { RUN_STATE_SHUTDOWN, RUN_STATE_FINISH_MIGRATE },
>> +    { RUN_STATE_SHUTDOWN, RUN_STATE_PRELAUNCH },
>>   
>>       { RUN_STATE_DEBUG, RUN_STATE_SUSPENDED },
>>       { RUN_STATE_RUNNING, RUN_STATE_SUSPENDED },
>>       { RUN_STATE_SUSPENDED, RUN_STATE_RUNNING },
>>       { RUN_STATE_SUSPENDED, RUN_STATE_FINISH_MIGRATE },
>> +    { RUN_STATE_SUSPENDED, RUN_STATE_PRELAUNCH },
>>   
>>       { RUN_STATE_WATCHDOG, RUN_STATE_RUNNING },
>>       { RUN_STATE_WATCHDOG, RUN_STATE_FINISH_MIGRATE },
>> +    { RUN_STATE_WATCHDOG, RUN_STATE_PRELAUNCH },
>>   
>>       { RUN_STATE_GUEST_PANICKED, RUN_STATE_RUNNING },
>>       { RUN_STATE_GUEST_PANICKED, RUN_STATE_FINISH_MIGRATE },
>> +    { RUN_STATE_GUEST_PANICKED, RUN_STATE_PRELAUNCH },
>>   
>>       { RUN_STATE__MAX, RUN_STATE__MAX },
>>   };
>> @@ -1886,8 +1899,10 @@ static bool main_loop_should_exit(void)
>>           cpu_synchronize_all_states();
>>           qemu_system_reset(VMRESET_REPORT);
>>           resume_all_vcpus();
>> -        if (runstate_needs_reset()) {
>> -            runstate_set(RUN_STATE_PAUSED);
>> +        if (!runstate_check(RUN_STATE_RUNNING) &&
>> +                !runstate_check(RUN_STATE_INMIGRATE) &&
>> +                !runstate_check(RUN_STATE_SAVE_VM)) {
> Since SAVE_VM should not happen here, I would leave this check out too.
>   If it happens, the lack of a SAVE_VM->PRELAUNCH transition will cause
> an assertion failure.
>
> Thanks for the patch!
>
> Paolo
>
:) cool. This one is tied to one of our internal bugs thus I have to 
finish it some way.
The rest will be handled in libvirt by my colleague.

I much more worry about bdrv_invalidate_cache(). This problem crashes QEMU
with 100% probability in our stress testing. Manually it crashes 1 times 
out of 5
('virsh managed-save && virsh start' in parallel with
'while /bin/true; do virsh qemu-monitor-command --hmp info block ; done'

Den

  reply	other threads:[~2016-01-21 12:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-19  7:59 [Qemu-devel] [PATCH 1/1] vl: change QEMU state machine for system reset Denis V. Lunev
2016-01-21 10:35 ` Paolo Bonzini
2016-01-21 12:56   ` Denis V. Lunev [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-02-13 13:26 Denis V. Lunev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56A0D573.7040309@openvz.org \
    --to=den@openvz.org \
    --cc=dandreev@virtuozzo.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.