mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
drm/amdkfd: Implement KFD process eviction/restore
When the TTM memory manager in KGD evicts BOs, all user mode queues potentially accessing these BOs must be evicted temporarily. Once user mode queues are evicted, the eviction fence is signaled, allowing the migration of the BO to proceed. A delayed worker is scheduled to restore all the BOs belonging to the evicted process and restart its queues. During suspend/resume of the GPU we also evict all processes to allow KGD to save BOs in system memory, since VRAM will be lost. v2: * Account for eviction when updating of q->is_active in MQD manager Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Acked-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
This commit is contained in:
committed by
Oded Gabbay
parent
403575c44e
commit
26103436da
@@ -79,6 +79,10 @@ struct device_process_node {
|
||||
*
|
||||
* @process_termination: Clears all process queues belongs to that device.
|
||||
*
|
||||
* @evict_process_queues: Evict all active queues of a process
|
||||
*
|
||||
* @restore_process_queues: Restore all evicted queues queues of a process
|
||||
*
|
||||
*/
|
||||
|
||||
struct device_queue_manager_ops {
|
||||
@@ -129,6 +133,11 @@ struct device_queue_manager_ops {
|
||||
|
||||
int (*process_termination)(struct device_queue_manager *dqm,
|
||||
struct qcm_process_device *qpd);
|
||||
|
||||
int (*evict_process_queues)(struct device_queue_manager *dqm,
|
||||
struct qcm_process_device *qpd);
|
||||
int (*restore_process_queues)(struct device_queue_manager *dqm,
|
||||
struct qcm_process_device *qpd);
|
||||
};
|
||||
|
||||
struct device_queue_manager_asic_ops {
|
||||
|
||||
Reference in New Issue
Block a user