Skip to content
  • Fabiano Rosas's avatar
    migration/ram: Introduce 'mapped-ram' migration capability · 4ed49feb
    Fabiano Rosas authored and Peter Xu's avatar Peter Xu committed
    
    
    Add a new migration capability 'mapped-ram'.
    
    The core of the feature is to ensure that RAM pages are mapped
    directly to offsets in the resulting migration file instead of being
    streamed at arbitrary points.
    
    The reasons why we'd want such behavior are:
    
     - The resulting file will have a bounded size, since pages which are
       dirtied multiple times will always go to a fixed location in the
       file, rather than constantly being added to a sequential
       stream. This eliminates cases where a VM with, say, 1G of RAM can
       result in a migration file that's 10s of GBs, provided that the
       workload constantly redirties memory.
    
     - It paves the way to implement O_DIRECT-enabled save/restore of the
       migration stream as the pages are ensured to be written at aligned
       offsets.
    
     - It allows the usage of multifd so we can write RAM pages to the
       migration file in parallel.
    
    For now, enabling the capability has no effect. The next couple of
    patches implement the core functionality.
    
    Acked-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Reviewed-by: Peter Xu's avatarPeter Xu <peterx@redhat.com>
    Signed-off-by: default avatarFabiano Rosas <farosas@suse.de>
    Link: https://lore.kernel.org/r/20240229153017.2221-8-farosas@suse.de
    
    
    Signed-off-by: Peter Xu's avatarPeter Xu <peterx@redhat.com>
    4ed49feb