mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
amdgpu libraries that use dmabuf fd to share GPU memory between processes close the dmabuf fds immediately after using them. However, it is possible that checkpoint of a process catches one of the dmabuf fds open. In that case, the amdgpu plugin needs to handle it. The checkpoint of the dmabuf fd does require the device file it was exported from to have already been dumped To identify which device this dmabuf fd was exprted from, attempt to import it on each device, then record the dmabuf handle it imports as. This handle can be used to restore it. Signed-off-by: David Francis <David.Francis@amd.com>
16 lines
No EOL
370 B
C
16 lines
No EOL
370 B
C
|
|
#ifndef __AMDGPU_PLUGIN_DMABUF_H__
|
|
#define __AMDGPU_PLUGIN_DMABUF_H__
|
|
|
|
#include "amdgpu_plugin_util.h"
|
|
#include "criu-amdgpu.pb-c.h"
|
|
|
|
int amdgpu_plugin_dmabuf_dump(int fd, int id);
|
|
int amdgpu_plugin_dmabuf_restore(int id);
|
|
|
|
int try_dump_dmabuf_list();
|
|
int post_dump_dmabuf_check();
|
|
|
|
int get_dmabuf_info(int fd, struct stat *st);
|
|
|
|
#endif /* __AMDGPU_PLUGIN_DMABUF_H__ */ |