Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8809b4b

Browse files
YiPeng ChaiHawking Zhang
YiPeng Chai
authored and
Hawking Zhang
committed
amd/amdgpu: Reduce unnecessary repetitive GPU resets
In multiple GPUs case, after a GPU has startedresetting all GPUs on hive, other GPUs do notneed to trigger GPU reset again.Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com>Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
1 parent2f767b9 commit8809b4b

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

‎drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4030,8 +4030,27 @@ int amdgpu_ras_reset_gpu(struct amdgpu_device *adev)
40304030
ras->gpu_reset_flags |=AMDGPU_RAS_GPU_RESET_MODE1_RESET;
40314031
}
40324032

4033-
if (atomic_cmpxchg(&ras->in_recovery,0,1)==0)
4033+
if (atomic_cmpxchg(&ras->in_recovery,0,1)==0) {
4034+
structamdgpu_hive_info*hive=amdgpu_get_xgmi_hive(adev);
4035+
inthive_ras_recovery=0;
4036+
4037+
if (hive) {
4038+
hive_ras_recovery=atomic_read(&hive->ras_recovery);
4039+
amdgpu_put_xgmi_hive(hive);
4040+
}
4041+
/* In the case of multiple GPUs, after a GPU has started
4042+
* resetting all GPUs on hive, other GPUs do not need to
4043+
* trigger GPU reset again.
4044+
*/
4045+
if (!hive_ras_recovery)
4046+
amdgpu_reset_domain_schedule(ras->adev->reset_domain,&ras->recovery_work);
4047+
else
4048+
atomic_set(&ras->in_recovery,0);
4049+
}else {
4050+
flush_work(&ras->recovery_work);
40344051
amdgpu_reset_domain_schedule(ras->adev->reset_domain,&ras->recovery_work);
4052+
}
4053+
40354054
return0;
40364055
}
40374056

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp