qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] migration: discard RAMBlocks of type ram_device


From: Cédric Le Goater
Subject: Re: [Qemu-devel] [PATCH] migration: discard RAMBlocks of type ram_device
Date: Thu, 12 Apr 2018 15:41:30 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 04/12/2018 02:08 PM, Peter Maydell wrote:
> On 12 April 2018 at 12:53, Dr. David Alan Gilbert <address@hidden> wrote:
>> * Peter Maydell (address@hidden) wrote:
>>> David suggested on IRC that we would want a flag on the ramblock
>>> for "not migratable", because there are other uses for "don't
>>> migrate this" than just "is this a ram device".
>>
>> My original suggestion to your series was with a flag, but I'd forgotten
>> about that by the time I'd made the suggestion to Cédric.
>> In your case would just adding an extra term to the
>> ram_block_is_migratable function work, or do you really need a flag?
> 
> I don't see how else you would identify the ram block that needs
> to be skipped. Also I think it's just better design to decouple
> the decision about "should we migrate this ram block" from the
> migration code itself, and push it up to the code layer that knows
> it's creating ram blocks that shouldn't be migrated.

Do you mean adding a new RAMBlock flag RAM_NON_MIGRATABLE 
in exec.c ? That would require to add an extra bool to the 
following functions :

        memory_region_init_ram_ptr()
        qemu_ram_alloc_from_ptr()
        qemu_ram_alloc_internal()

Would that be ok ? 

Thanks,

C. 



reply via email to

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