Skip to content

CHECKPOINT RESTORE WITH ROCm

David Yat Sin amd-gfx 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest16 patches 0 repliesNew
  2. v218 patches 0 repliesSuperseded
  3. v118 patches 6 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16x86/configs: CRIU update debug rock defconfigarch/x86/configs/rock-dbg_defconfig+34 -190 replies
2/16drm/amdkfd: CRIU Introduce Checkpoint-Restore APIsdrivers/gpu/drm/amd/amdkfd/kfd_chardev.c drivers/gpu/drm/amd/amdkfd/kfd_priv.h include/uapi/linux/kfd_ioctl.h+347 -20 replies
3/16drm/amdkfd: CRIU Implement KFD process_info ioctldrivers/gpu/drm/amd/amdkfd/kfd_chardev.c drivers/gpu/drm/amd/amdkfd/kfd_priv.h drivers/gpu/drm/amd/amdkfd/kfd_process.c+59 -10 replies
4/16drm/amdkfd: CRIU Implement KFD dumper ioctldrivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +1 more+211 -20 replies
5/16drm/amdkfd: CRIU Implement KFD restore ioctldrivers/gpu/drm/amd/amdkfd/kfd_chardev.c+296 -10 replies
6/16drm/amdkfd: CRIU Implement KFD resume ioctldrivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +2 more+124 -140 replies
7/16drm/amdkfd: CRIU Implement KFD pause ioctldrivers/gpu/drm/amd/amdkfd/kfd_chardev.c drivers/gpu/drm/amd/amdkfd/kfd_priv.h drivers/gpu/drm/amd/amdkfd/kfd_process.c+26 -10 replies
8/16drm/amdkfd: CRIU add queues supportdrivers/gpu/drm/amd/amdkfd/kfd_chardev.c drivers/gpu/drm/amd/amdkfd/kfd_priv.h drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c+402 -20 replies
9/16drm/amdkfd: CRIU restore queue idsdrivers/gpu/drm/amd/amdkfd/kfd_chardev.c drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c drivers/gpu/drm/amd/amdkfd/kfd_priv.h +1 more+26 -40 replies
10/16drm/amdkfd: CRIU restore sdma id for queuesdrivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c+40 -150 replies
11/16drm/amdkfd: CRIU restore queue doorbell iddrivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c+41 -190 replies
12/16drm/amdkfd: CRIU dump and restore queue mqdsdrivers/gpu/drm/amd/amdkfd/kfd_chardev.c drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +8 more+444 -240 replies
13/16drm/amdkfd: CRIU dump/restore queue control stackdrivers/gpu/drm/amd/amdkfd/kfd_chardev.c drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +8 more+125 -520 replies
14/16drm/amdkfd: CRIU dump and restore eventsdrivers/gpu/drm/amd/amdkfd/kfd_chardev.c drivers/gpu/drm/amd/amdkfd/kfd_events.c drivers/gpu/drm/amd/amdkfd/kfd_priv.h+324 -790 replies
15/16drm/amdkfd: CRIU implement gpu_id remappingdrivers/gpu/drm/amd/amdkfd/kfd_chardev.c drivers/gpu/drm/amd/amdkfd/kfd_events.c drivers/gpu/drm/amd/amdkfd/kfd_priv.h +1 more+329 -1190 replies
16/16drm/amdkfd: CRIU export kfd bos as prime dmabuf objectsdrivers/gpu/drm/amd/amdkfd/kfd_chardev.c+56 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 00/16] CHECKPOINT RESTORE WITH ROCm

CRIU is a user space tool which is very popular for container live migration in datacentres. It can checkpoint a running application, save its complete state, memory contents and all system resources to images on disk which can be migrated to another m achine and restored later. More information on CRIU can be found at https://criu.org/Main_Page

CRIU currently does not support Checkpoint / Restore with applications that have devices files open so it cannot perform checkpoint and restore on GPU devices which are very complex and have their own VRAM managed privately. CRIU, however can support e xternal devices by using a plugin architecture. This patch series adds initial support for ROCm applications while we add more remaining features. We welcome some feedback, especially in regards to the APIs, before involving a larger audience.

Our changes to CRIU are can be obtained from here:
https://github.com/RadeonOpenCompute/criu/tree/amdgpu_rfc-210715-2

We have tested the following scenarios:
-Checkpoint / Restore of a Pytorch (BERT) workload -kfdtests with queues and events
-Gfx9 and Gfx10 based multi GPU test systems -On baremetal and inside a docker container -Restoring on a different system

V1: Initial
V2: Addressed review comments
V3: Rebased on latest amd-staging-drm-next

PS: There will be an upcoming V4 patch series with minor additions to the API's to support HMM.

David Yat Sin (9):
drm/amdkfd: CRIU Implement KFD pause ioctl drm/amdkfd: CRIU add queues support drm/amdkfd: CRIU restore queue ids drm/amdkfd: CRIU restore sdma id for queues drm/amdkfd: CRIU restore queue doorbell id drm/amdkfd: CRIU dump and restore queue mqds drm/amdkfd: CRIU dump/restore queue control stack drm/amdkfd: CRIU dump and restore events drm/amdkfd: CRIU implement gpu_id remapping

Rajneesh Bhardwaj (7):
x86/configs: CRIU update debug rock defconfig drm/amdkfd: CRIU Introduce Checkpoint-Restore APIs drm/amdkfd: CRIU Implement KFD process_info ioctl drm/amdkfd: CRIU Implement KFD dumper ioctl drm/amdkfd: CRIU Implement KFD restore ioctl drm/amdkfd: CRIU Implement KFD resume ioctl drm/amdkfd: CRIU export kfd bos as prime dmabuf objects

 arch/x86/configs/rock-dbg_defconfig           |   53 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h    |    6 +-
 .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c  |   51 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c       |   20 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h       |    2 +
 drivers/gpu/drm/amd/amdkfd/kfd_chardev.c      | 1179 ++++++++++++++---
 drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c       |    2 +-
 .../drm/amd/amdkfd/kfd_device_queue_manager.c |  185 ++-
 .../drm/amd/amdkfd/kfd_device_queue_manager.h |   18 +-
 drivers/gpu/drm/amd/amdkfd/kfd_events.c       |  323 ++++-
 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.h  |   11 +
 .../gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c  |   69 +
 .../gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c  |   71 +
 .../gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c   |   86 ++
 .../gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c   |   78 ++
 drivers/gpu/drm/amd/amdkfd/kfd_priv.h         |  137 +-
 drivers/gpu/drm/amd/amdkfd/kfd_process.c      |   68 +-
 .../amd/amdkfd/kfd_process_queue_manager.c    |  474 ++++++-
 include/uapi/linux/kfd_ioctl.h                |  221 ++-
 19 files changed, 2792 insertions(+), 262 deletions(-)
Signature · 1 line
2.17.1