Skip to contentSkip to conversation

drm/amdgpu: replace DRM_ERROR with DRM_WARN in ras_reserve_bad_pages

PATCH In review Zhou1, Tao 2 participants 4 messages Sep 17, 2019 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Zhou1, Tao

author
#0 lore raw

PATCH 1/1 drm/amdgpu: replace DRM_ERROR with DRM_WARN in ras_reserve_bad_pages

There are two cases of reserve error should be ignored:
1) a ras bad page has been allocated (used by someone);
2) a ras bad page has been reserved (duplicate error injection for one page);

DRM_ERROR is unnecessary for the failure of bad page reserve

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +6 -1
index 79e5e5be8b34..5f623daf5078 100644
@@ -1409,10 +1409,15 @@ int amdgpu_ras_reserve_bad_pages(struct amdgpu_device *adev)
 	for (i = data->last_reserved; i < data->count; i++) {
 		bp = data->bps[i].retired_page;
 
+		/* There are two cases of reserve error should be ignored:
+		 * 1) a ras bad page has been allocated (used by someone);
+		 * 2) a ras bad page has been reserved (duplicate error injection
+		 *    for one page);
+		 */
 		if (amdgpu_bo_create_kernel_at(adev, bp << PAGE_SHIFT, PAGE_SIZE,
 					       AMDGPU_GEM_DOMAIN_VRAM,
 					       &bo, NULL))
-			DRM_ERROR("RAS ERROR: reserve vram %llx fail\n", bp);
+			DRM_WARN("RAS WARN: reserve vram for retired page %llx fail\n", bp);
 
 		data->bps_bo[i] = bo;
 		data->last_reserved = i + 1;
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Tuesday, September 17, 2019 2:25 PM
To: [email protected]; Chen, Guchun <[email protected]>; Zhang, Hawking <[email protected]>
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: replace DRM_ERROR with DRM_WARN in ras_reserve_bad_pages

There are two cases of reserve error should be ignored:
1) a ras bad page has been allocated (used by someone);
2) a ras bad page has been reserved (duplicate error injection for one page);

DRM_ERROR is unnecessary for the failure of bad page reserve

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +5 -0
index 79e5e5be8b34..5f623daf5078 100644
@@ -1409,10 +1409,15 @@ int amdgpu_ras_reserve_bad_pages(struct amdgpu_device *adev)
 	for (i = data->last_reserved; i < data->count; i++) {
 		bp = data->bps[i].retired_page;
 
+		/* There are two cases of reserve error should be ignored:
+		 * 1) a ras bad page has been allocated (used by someone);
+		 * 2) a ras bad page has been reserved (duplicate error injection
+		 *    for one page);
+		 */
 		if (amdgpu_bo_create_kernel_at(adev, bp << PAGE_SHIFT, PAGE_SIZE,
 					       AMDGPU_GEM_DOMAIN_VRAM,
 					       &bo, NULL))

[Guchun]Do we need to change PAGE_SHIFT to AMDGPU_GPU_PAGE_SHIFT here?

- DRM_ERROR("RAS ERROR: reserve vram %llx fail\n", bp);
+ DRM_WARN("RAS WARN: reserve vram for retired page %llx fail\n", bp);

data->bps_bo[i] = bo;
data->last_reserved = i + 1;

Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): BYAPR12MB28060C4BE2088D071875ABB1F18F0-ZGDeBxoHBPk0CuAkIMgl3QdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

author
#4 lore raw
Quoted 52 lines

-----Original Message-----
From: Chen, Guchun <[email protected]>
Sent: 2019年9月17日 14:52
To: Zhou1, Tao <[email protected]>; [email protected]; Zhang, Hawking <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: replace DRM_ERROR with DRM_WARN in ras_reserve_bad_pages

-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Tuesday, September 17, 2019 2:25 PM
To: [email protected]; Chen, Guchun <[email protected]>; Zhang, Hawking <[email protected]>
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: replace DRM_ERROR with DRM_WARN in ras_reserve_bad_pages

There are two cases of reserve error should be ignored:
1) a ras bad page has been allocated (used by someone);
2) a ras bad page has been reserved (duplicate error injection for one page);

DRM_ERROR is unnecessary for the failure of bad page reserve

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +3 -0
index 79e5e5be8b34..5f623daf5078 100644
@@ -1409,10 +1409,15 @@ int amdgpu_ras_reserve_bad_pages(struct
 amdgpu_device *adev)
 	for (i = data->last_reserved; i < data->count; i++) {
 		bp = data->bps[i].retired_page;
 
+		/* There are two cases of reserve error should be ignored:
+		 * 1) a ras bad page has been allocated (used by someone);
+		 * 2) a ras bad page has been reserved (duplicate error

injection

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2 -0
+		 *    for one page);
+		 */
 		if (amdgpu_bo_create_kernel_at(adev, bp << PAGE_SHIFT,

PAGE_SIZE,

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -0
 					       AMDGPU_GEM_DOMAIN_VRAM,
 					       &bo, NULL))
Quoted 2 lines

[Guchun]Do we need to change PAGE_SHIFT to AMDGPU_GPU_PAGE_SHIFT here?

[Tao] Alex has another patch to fix it, you can find it in mail list.

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -1
-			DRM_ERROR("RAS ERROR: reserve vram %llx fail\n",

bp);

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -0
+			DRM_WARN("RAS WARN: reserve vram for retired

page %llx fail\n", bp);

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -1
 		data->bps_bo[i] = bo;
 		data->last_reserved = i + 1;
--

2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): MN2PR12MB3054549648F8445590F7D41EB08F0-rweVpJHSKTqnT25eLM+iUQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

Reviewed-by Guchun Chen
#6 lore raw

Yeah, that's fine.

-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Tuesday, September 17, 2019 3:01 PM
To: Chen, Guchun <[email protected]>; [email protected]; Zhang, Hawking <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: replace DRM_ERROR with DRM_WARN in ras_reserve_bad_pages

Quoted 50 lines

-----Original Message-----
From: Chen, Guchun <[email protected]>
Sent: 2019年9月17日 14:52
To: Zhou1, Tao <[email protected]>; [email protected]; Zhang, Hawking <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: replace DRM_ERROR with DRM_WARN in ras_reserve_bad_pages

-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Tuesday, September 17, 2019 2:25 PM
To: [email protected]; Chen, Guchun <[email protected]>; Zhang, Hawking <[email protected]>
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: replace DRM_ERROR with DRM_WARN in ras_reserve_bad_pages

There are two cases of reserve error should be ignored:
1) a ras bad page has been allocated (used by someone);
2) a ras bad page has been reserved (duplicate error injection for one page);

DRM_ERROR is unnecessary for the failure of bad page reserve

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +3 -0
index 79e5e5be8b34..5f623daf5078 100644
@@ -1409,10 +1409,15 @@ int amdgpu_ras_reserve_bad_pages(struct
 amdgpu_device *adev)
 	for (i = data->last_reserved; i < data->count; i++) {
 		bp = data->bps[i].retired_page;
 
+		/* There are two cases of reserve error should be ignored:
+		 * 1) a ras bad page has been allocated (used by someone);
+		 * 2) a ras bad page has been reserved (duplicate error

injection

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2 -0
+		 *    for one page);
+		 */
 		if (amdgpu_bo_create_kernel_at(adev, bp << PAGE_SHIFT, PAGE_SIZE,
 					       AMDGPU_GEM_DOMAIN_VRAM,
 					       &bo, NULL))
Quoted 1 line

[Guchun]Do we need to change PAGE_SHIFT to AMDGPU_GPU_PAGE_SHIFT here?

[Tao] Alex has another patch to fix it, you can find it in mail list.

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -1
-			DRM_ERROR("RAS ERROR: reserve vram %llx fail\n",

bp);

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -0
+			DRM_WARN("RAS WARN: reserve vram for retired

page %llx fail\n", bp);

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -1
 		data->bps_bo[i] = bo;
 		data->last_reserved = i + 1;
--

2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx