Skip to content
Snippets Groups Projects
  • Peter Xu's avatar
    60bb3c58
    migration: Postcopy recover with preempt enabled · 60bb3c58
    Peter Xu authored
    
    To allow postcopy recovery, the ram fast load (preempt-only) dest QEMU thread
    needs similar handling on fault tolerance.  When ram_load_postcopy() fails,
    instead of stopping the thread it halts with a semaphore, preparing to be
    kicked again when recovery is detected.
    
    A mutex is introduced to make sure there's no concurrent operation upon the
    socket.  To make it simple, the fast ram load thread will take the mutex during
    its whole procedure, and only release it if it's paused.  The fast-path socket
    will be properly released by the main loading thread safely when there's
    network failures during postcopy with that mutex held.
    
    Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
    Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
    Message-Id: <20220707185506.27257-1-peterx@redhat.com>
    Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
    60bb3c58
    History
    migration: Postcopy recover with preempt enabled
    Peter Xu authored
    
    To allow postcopy recovery, the ram fast load (preempt-only) dest QEMU thread
    needs similar handling on fault tolerance.  When ram_load_postcopy() fails,
    instead of stopping the thread it halts with a semaphore, preparing to be
    kicked again when recovery is detected.
    
    A mutex is introduced to make sure there's no concurrent operation upon the
    socket.  To make it simple, the fast ram load thread will take the mutex during
    its whole procedure, and only release it if it's paused.  The fast-path socket
    will be properly released by the main loading thread safely when there's
    network failures during postcopy with that mutex held.
    
    Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
    Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
    Message-Id: <20220707185506.27257-1-peterx@redhat.com>
    Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>