• Laurent Dufour's avatar
    ppc64: handle transactional memory state · 4ebfa981
    Laurent Dufour authored
    The Power 8 introduces the transactional memory (TM) operations (see
    Power ISA 3.0 for details).
    
    The support for the transactional memory operation during the
    checkpoint and restart requires extended ptrace API provided by the
    kernel 4.8.
    
    When checkpointing a thread while a transactional memory operation is
    in progress, the TM checkpointed state is checkpointed through the new
    ptrace API. If these new APIs are not available, the checkpoint is
    aborted and an explicit error is reported.
    
    At restart time, the TM state is pushed on the stack frame to be
    reloaded by the kernel when reading the stack frame.
    
    Only suspended TM operation could be checkpointed since active one
    will be aborted once a system call is made. Suspended operation will
    be aborted as well, and the checkpointed thread is expected to handle
    the TM failure as usual (retrying is a good option).
    Signed-off-by: 's avatarLaurent Dufour <ldufour@linux.vnet.ibm.com>
    Reviewed-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
    4ebfa981
core-ppc64.proto 1.99 KB