drm/amdkfd: CRIU Implement KFD process_info ioctl
authorRajneesh Bhardwaj <rajneesh.bhardwaj@amd.com>
Tue, 24 Aug 2021 20:14:51 +0000 (16:14 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Feb 2022 22:59:20 +0000 (17:59 -0500)
commitf185381b64814bb483416e4dd83d85891018a7c5
treea4f1ea5324ed96c690fc451dc4eeaef417f8aa14
parent3698807094ecae945436921325f5c309d1123f11
drm/amdkfd: CRIU Implement KFD process_info ioctl

This IOCTL op is expected to be called as a precursor to the actual
Checkpoint operation. This does the basic discovery into the target
process seized by CRIU and relays the information to the userspace that
utilizes it to start the Checkpoint operation via another dedicated
IOCTL op.

The process_info IOCTL op determines the number of GPUs, buffer objects
that are associated with the target process, its process id in
caller's namespace since /proc/pid/mem interface maybe used to drain
the contents of the discovered buffer objects in userspace and getpid
returns the pid of CRIU dumper process. Also the pid of a process
inside a container might be different than its global pid so return
the ns pid.

Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com>
Signed-off-by: David Yat Sin <david.yatsin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c