amdgpu/sriov Stop data exchange for wholegpu reset
Subsystems (2)
PATCH 1/1 amdgpu/sriov Stop data exchange for wholegpu reset
[Why]
When host trigger a whole gpu reset, guest will keep waiting till host finish reset. But there's a work queue in guest exchanging data between vf&pf which need to access frame buffer. During whole gpu reset, frame buffer is not accessable, and this causes the call trace.
[How]
After vf get reset notification from pf, stop data exchange.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 1 + drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 1 + drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 1 + 3 files changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +1 -0
@@ -571,6 +571,7 @@ void amdgpu_virt_fini_data_exchange(struct amdgpu_device *adev)DRM_INFO ("clean up the vf2pf work item\n" );flush_delayed_work (&adev->virt.vf2pf_work);cancel_delayed_work_sync (&adev->virt.vf2pf_work); + adev->virt.vf2pf_update_interval_ms =0 ; } }
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c +1 -0
@@ -255,6 +255,7 @@ static void xgpu_ai_mailbox_flr_work(struct work_struct *work)if (!down_read_trylock (&adev->reset_sem))return ; +amdgpu_virt_fini_data_exchange (adev);atomic_set (&adev->in_gpu_reset,1 ); do {
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c +1 -0
@@ -276,6 +276,7 @@ static void xgpu_nv_mailbox_flr_work(struct work_struct *work)if (!down_read_trylock (&adev->reset_sem))return ; +amdgpu_virt_fini_data_exchange (adev);atomic_set (&adev->in_gpu_reset,1 ); do {
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Ping
-----Original Message-----
From: Jack Zhang <[email protected]>
Sent: Thursday, January 7, 2021 6:47 PM
To: [email protected]
Cc: Zhang, Jack (Jian) <[email protected]>; Zhang, Jack (Jian) <[email protected]>; Chen, JingWen <[email protected]>
Subject: [PATCH] amdgpu/sriov Stop data exchange for wholegpu reset
[Why]
When host trigger a whole gpu reset, guest will keep waiting till host finish reset. But there's a work queue in guest exchanging data between vf&pf which need to access frame buffer. During whole gpu reset, frame buffer is not accessable, and this causes the call trace.
[How]
After vf get reset notification from pf, stop data exchange.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 1 + drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 1 + drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 1 + 3 files changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +1 -0
@@ -571,6 +571,7 @@ void amdgpu_virt_fini_data_exchange(struct amdgpu_device *adev)DRM_INFO ("clean up the vf2pf work item\n" );flush_delayed_work (&adev->virt.vf2pf_work);cancel_delayed_work_sync (&adev->virt.vf2pf_work); + adev->virt.vf2pf_update_interval_ms =0 ; } }
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c +1 -0
@@ -255,6 +255,7 @@ static void xgpu_ai_mailbox_flr_work(struct work_struct *work)if (!down_read_trylock (&adev->reset_sem))return ; +amdgpu_virt_fini_data_exchange (adev);atomic_set (&adev->in_gpu_reset,1 ); do {
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c +1 -0
@@ -276,6 +276,7 @@ static void xgpu_nv_mailbox_flr_work(struct work_struct *work)if (!down_read_trylock (&adev->reset_sem))return ; +amdgpu_virt_fini_data_exchange (adev);atomic_set (&adev->in_gpu_reset,1 ); do {
--
2.25.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
Ping...
-----Original Message-----
From: Zhang, Jack (Jian)
Sent: Friday, January 8, 2021 11:07 AM
To: [email protected]; Liu, Monk <[email protected]>; Chen, JingWen <[email protected]>; Deucher, Alexander <[email protected]>; Deng, Emily <[email protected]>
Subject: RE: [PATCH] amdgpu/sriov Stop data exchange for wholegpu reset
Ping
-----Original Message-----
From: Jack Zhang <[email protected]>
Sent: Thursday, January 7, 2021 6:47 PM
To: [email protected]
Cc: Zhang, Jack (Jian) <[email protected]>; Zhang, Jack (Jian) <[email protected]>; Chen, JingWen <[email protected]>
Subject: [PATCH] amdgpu/sriov Stop data exchange for wholegpu reset
[Why]
When host trigger a whole gpu reset, guest will keep waiting till host finish reset. But there's a work queue in guest exchanging data between vf&pf which need to access frame buffer. During whole gpu reset, frame buffer is not accessable, and this causes the call trace.
[How]
After vf get reset notification from pf, stop data exchange.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 1 + drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 1 + drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 1 + 3 files changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +1 -0
@@ -571,6 +571,7 @@ void amdgpu_virt_fini_data_exchange(struct amdgpu_device *adev)DRM_INFO ("clean up the vf2pf work item\n" );flush_delayed_work (&adev->virt.vf2pf_work);cancel_delayed_work_sync (&adev->virt.vf2pf_work); +adev->virt.vf2pf_update_interval_ms =0 ; } }
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c +1 -0
@@ -255,6 +255,7 @@ static void xgpu_ai_mailbox_flr_work(struct work_struct *work)if (!down_read_trylock (&adev->reset_sem))return ; +amdgpu_virt_fini_data_exchange (adev);atomic_set (&adev->in_gpu_reset,1 ); do {
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c +1 -0
@@ -276,6 +276,7 @@ static void xgpu_nv_mailbox_flr_work(struct work_struct *work)if (!down_read_trylock (&adev->reset_sem))return ; +amdgpu_virt_fini_data_exchange (adev);atomic_set (&adev->in_gpu_reset,1 ); do {
--
2.25.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Liu, Monk
Reviewed-by[AMD Official Use Only - Internal Distribution Only]
Thanks
------------------------------------------
Monk Liu | Cloud-GPU Core team
------------------------------------------
-----Original Message-----
From: Zhang, Jack (Jian) <[email protected]>
Sent: Tuesday, January 12, 2021 11:20 AM
To: Zhang, Hawking <[email protected]>; [email protected]; Liu, Monk <[email protected]>; Chen, JingWen <[email protected]>; Deucher, Alexander <[email protected]>; Deng, Emily <[email protected]>
Subject: RE: [PATCH] amdgpu/sriov Stop data exchange for wholegpu reset
[AMD Official Use Only - Internal Distribution Only]
Ping...
-----Original Message-----
From: Zhang, Jack (Jian)
Sent: Friday, January 8, 2021 11:07 AM
To: [email protected]; Liu, Monk <[email protected]>; Chen, JingWen <[email protected]>; Deucher, Alexander <[email protected]>; Deng, Emily <[email protected]>
Subject: RE: [PATCH] amdgpu/sriov Stop data exchange for wholegpu reset
Ping
-----Original Message-----
From: Jack Zhang <[email protected]>
Sent: Thursday, January 7, 2021 6:47 PM
To: [email protected]
Cc: Zhang, Jack (Jian) <[email protected]>; Zhang, Jack (Jian) <[email protected]>; Chen, JingWen <[email protected]>
Subject: [PATCH] amdgpu/sriov Stop data exchange for wholegpu reset
[Why]
When host trigger a whole gpu reset, guest will keep waiting till host finish reset. But there's a work queue in guest exchanging data between vf&pf which need to access frame buffer. During whole gpu reset, frame buffer is not accessable, and this causes the call trace.
[How]
After vf get reset notification from pf, stop data exchange.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 1 + drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 1 + drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 1 + 3 files changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +1 -0
@@ -571,6 +571,7 @@ void amdgpu_virt_fini_data_exchange(struct amdgpu_device *adev) DRM_INFO("clean up the vf2pf work item\n"); flush_delayed_work(&adev->virt.vf2pf_work);cancel_delayed_work_sync (&adev->virt.vf2pf_work); +adev->virt.vf2pf_update_interval_ms =0 ; } }
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c +1 -0
@@ -255,6 +255,7 @@ static void xgpu_ai_mailbox_flr_work(struct work_struct *work) if (!down_read_trylock(&adev->reset_sem))return ; +amdgpu_virt_fini_data_exchange (adev);atomic_set (&adev->in_gpu_reset,1 ); do {
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c +1 -1
@@ -276,6 +276,7 @@ static void xgpu_nv_mailbox_flr_work(struct work_struct *work) if (!down_read_trylock(&adev->reset_sem))return ; +amdgpu_virt_fini_data_exchange (adev);atomic_set (&adev->in_gpu_reset,1 ); do { --
2.25.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Dear Jack,
Thank you for your patch.
Please add a colon after amdgpu/sriov in the commit message summary.
Am 07.01.21 um 11:46 schrieb Jack Zhang:
Quoted 2 lines
[Why]
When host trigger a whole gpu reset, guest will keep
*hosts trigger* or *host triggers*
Quoted 1 line
waiting till host finish reset. But there's a work
finishes
Quoted 1 line
queue in guest exchanging data between vf&pf which need
needs
Quoted 2 lines
to access frame buffer. During whole gpu reset, frame buffer is not accessable, and this causes the call trace.
accessible (a spell checker should have caught that)
Can you please paste part of the trace, so it’s easily findable by users running into this.
Quoted 2 lines
[How]
After vf get reset notification from pf, stop data exchange.
How can this be reproduced and tested?
Kind regards,
Paul
Quoted 38 lines
Signed-off-by Jingwen Chen <[email protected]>Signed-off-by Jack Zhang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 1 + drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 1 + drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 1 + 3 files changed, 3 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +1
-0@@ -571,6 +571,7 @@ void amdgpu_virt_fini_data_exchange(struct amdgpu_device *adev)DRM_INFO ("clean up the vf2pf work item\n" );flush_delayed_work (&adev->virt.vf2pf_work);cancel_delayed_work_sync (&adev->virt.vf2pf_work); + adev->virt.vf2pf_update_interval_ms =0 ; } }drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c +1
-0@@ -255,6 +255,7 @@ static void xgpu_ai_mailbox_flr_work(struct work_struct *work)if (!down_read_trylock (&adev->reset_sem))return ; +amdgpu_virt_fini_data_exchange (adev);atomic_set (&adev->in_gpu_reset,1 ); do {drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c +0
-0
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c static void xgpu_nv_mailbox_flr_work(struct work_struct *work) · line 282
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c +1
-0@@ -276,6 +276,7 @@ static void xgpu_nv_mailbox_flr_work(struct work_struct *work)if (!down_read_trylock (&adev->reset_sem))return ; +amdgpu_virt_fini_data_exchange (adev);atomic_set (&adev->in_gpu_reset,1 ); do {
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx