Skip to content

Commit

Permalink
criu/plugin: Add environment variable to cap size of buffers.
Browse files Browse the repository at this point in the history
The amdgpu plugin would create a memory buffer at the size
of the largest VRAM bo (buffer object). On some systems, VRAM
size exceeds RAM size, so the largest bo might be larger than
the available memory.

Add an environment variable KFD_MAX_BUFFER_SIZE, which caps the
size of this buffer. By default, it is set to 0, and has no
effect. When active, any bo larger than its value will be
saved to/restored from file in multiple passes.

Signed-off-by: David Francis <David.Francis@amd.com>
  • Loading branch information
fdavid-amd committed Sep 5, 2023
1 parent 82bfb67 commit 91205ae
Show file tree
Hide file tree
Showing 2 changed files with 202 additions and 139 deletions.
9 changes: 9 additions & 0 deletions Documentation/criu-amdgpu-plugin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,15 @@ executing criu command.
E.g:
KFD_CAPABILITY_CHECK=1

*KFD_MAX_BUFFER_SIZE*::
On some systems, VRAM sizes may exceed RAM sizes, and so buffers for dumping
and restoring VRAM may be unable to fit. Set to a nonzero value (in bytes)
to set a limit on the plugin's memory usage.
Default:0 (Disabled)

E.g:
KFD_MAX_BUFFER_SIZE="2G"


AUTHOR
------
Expand Down
Loading

0 comments on commit 91205ae

Please sign in to comment.