qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 02/16] postcopy: Transmit and compare individ


From: Laurent Vivier
Subject: Re: [Qemu-devel] [PATCH v2 02/16] postcopy: Transmit and compare individual page sizes
Date: Fri, 24 Feb 2017 11:50:20 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

On 24/02/2017 11:48, Dr. David Alan Gilbert wrote:
> * Laurent Vivier (address@hidden) wrote:
>> On 06/02/2017 18:32, Dr. David Alan Gilbert (git) wrote:
>>> From: "Dr. David Alan Gilbert" <address@hidden>
>>>
>>> When using postcopy with hugepages, we require the source
>>> and destination page sizes for any RAMBlock to match; note
>>> that different RAMBlocks in the same VM can have different
>>> page sizes.
>>>
>>> Transmit them as part of the RAM information header and
>>> fail if there's a difference.
>>>
>>> Signed-off-by: Dr. David Alan Gilbert <address@hidden>
>>> ---
>>>  migration/ram.c | 17 +++++++++++++++++
>>>  1 file changed, 17 insertions(+)
>>>
>>> diff --git a/migration/ram.c b/migration/ram.c
>>> index b405e4a..5726563 100644
>>> --- a/migration/ram.c
>>> +++ b/migration/ram.c
>>> @@ -1979,6 +1979,9 @@ static int ram_save_setup(QEMUFile *f, void *opaque)
>>>          qemu_put_byte(f, strlen(block->idstr));
>>>          qemu_put_buffer(f, (uint8_t *)block->idstr, strlen(block->idstr));
>>>          qemu_put_be64(f, block->used_length);
>>> +        if (migrate_postcopy_ram() && block->page_size != 
>>> qemu_host_page_size) {
>>> +            qemu_put_be64(f, block->page_size);
>>> +        }
>>
>> I understand we don't break migration to previous machine type by adding
>> data in the migration stream because migration is already broken when
>> block->page_size != qemu_host_page_size. Am I correct?
> 
> Right, the previous patch - the one with the summary word - should have failed
> the migration before we get to this point.
> 
> This patch can detect a more subtle problem - e.g. we still have huge pages 
> used
> by some of the RAM Blocks, but not all the same ones as the source.

Thanks.

Reviewed-by: Laurent Vivier <address@hidden>

Laurent




reply via email to

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