All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: cam@cs.ualberta.ca, qemu-devel@nongnu.org, quintela@redhat.com
Subject: [Qemu-devel] Re: [RFC PATCH 0/5] Save state error handling (kill off no_migrate)
Date: Wed, 06 Oct 2010 07:55:47 -0500	[thread overview]
Message-ID: <4CAC71D3.9090801@codemonkey.ws> (raw)
In-Reply-To: <1286332177.3136.51.camel@x201>

On 10/05/2010 09:29 PM, Alex Williamson wrote:
> On Tue, 2010-10-05 at 14:58 -0600, Alex Williamson wrote:
>    
>> On Tue, 2010-10-05 at 15:49 -0500, Anthony Liguori wrote:
>>      
>>> On 10/05/2010 03:46 PM, Alex Williamson wrote:
>>>        
>>>> On Tue, 2010-10-05 at 15:41 -0500, Anthony Liguori wrote:
>>>>
>>>>          
>>>>> On 10/05/2010 03:35 PM, Alex Williamson wrote:
>>>>>
>>>>>            
>>>>>> I was thinking of making KVM VMs with assigned PCI devices
>>>>>> unsavable/unmigratable, but I wasn't thrilled with the
>>>>>> no_migrate solutions.  The more generic solutions seems to be
>>>>>> simply letting save handlers return an error if the device can't
>>>>>> be migrated.  This is also much more generic than a one-way
>>>>>> bit flip of the no_migrate flag.  For a vmsd based registration,
>>>>>> the pre_save() routine seems to be the right place to allow
>>>>>> devices to abort.  The series also carries the error back through
>>>>>> all the vmstate callers.  If this looks good, I'll give it some
>>>>>> more testing and submit as non-RFC.  Thanks,
>>>>>>
>>>>>>
>>>>>>              
>>>>> Doesn't this mean that we don't fail the migration until after
>>>>> transferring all of the memory contents?
>>>>>
>>>>>            
>>>> That's the case with the current no_migrate implementation too, it
>>>> doesn't get called until qemu_savevm_state_complete().  Thanks,
>>>>
>>>>          
>>> Ouch, that's unfortunate but also should be easily fixable.
>>>
>>> But making a save handler fail seems would make it impossible to get
>>> instant failure semantics.
>>>        
>> True.  Ok, so maybe we do still need a separate no migrate registration.
>> In any case, I think it's a good idea to allow the save routines to have
>> a failure path, but I'll work on a way to disable migration that's not
>> quite so coupled with the savevm entry (it seems silly for device
>> assignment to register a savevm only for the purpose of then registering
>> as non-migratable).  Thanks,
>>      
> On second thought, I think we should take the same approach with the
> live handlers.  We just need to make SaveSetParamsHandler return an int
> and check it and the SaveLiveStateHandler return for<  0.  Then we have
> a full spectrum of points at which a savevm handler can abort a
> migration.  If that sounds reasonable, I'll send a new series tomorrow.
>    

Yes, makes sense to me.

Regards,

Anthony Liguori

> Thanks,
>
> Alex
>
>    

      reply	other threads:[~2010-10-06 13:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-05 20:35 [Qemu-devel] [RFC PATCH 0/5] Save state error handling (kill off no_migrate) Alex Williamson
2010-10-05 20:35 ` [Qemu-devel] [RFC PATCH 1/5] savevm: Allow SaveStateHandler() to return error Alex Williamson
2010-10-05 20:35 ` [Qemu-devel] [RFC PATCH 2/5] savevm: Remove register_device_unmigratable() Alex Williamson
2010-10-05 20:35 ` [Qemu-devel] [RFC PATCH 3/5] savevm: Allow vmsd->pre_save to return error Alex Williamson
2010-10-05 20:35 ` [Qemu-devel] [RFC PATCH 4/5] pci: Allow pci_device_save() " Alex Williamson
2010-10-05 20:35 ` [Qemu-devel] [RFC PATCH 5/5] virtio: Allow virtio_save() errors Alex Williamson
2010-10-05 20:41 ` [Qemu-devel] Re: [RFC PATCH 0/5] Save state error handling (kill off no_migrate) Anthony Liguori
2010-10-05 20:46   ` Alex Williamson
2010-10-05 20:49     ` Anthony Liguori
2010-10-05 20:58       ` Alex Williamson
2010-10-06  2:29         ` Alex Williamson
2010-10-06 12:55           ` Anthony Liguori [this message]

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=4CAC71D3.9090801@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=alex.williamson@redhat.com \
    --cc=cam@cs.ualberta.ca \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /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.