* [PATCH] drm/amdkfd: replace err by dbg print at svm vram migration
@ 2022-02-10 2:59 Alex Sierra
2022-02-10 3:07 ` Chen, Guchun
2022-02-11 16:17 ` Alex Sierra
0 siblings, 2 replies; 8+ messages in thread
From: Alex Sierra @ 2022-02-10 2:59 UTC (permalink / raw)
To: amd-gfx; +Cc: Felix.Kuehling
Avoid spam the kernel log on application memory allocation failures.
Signed-off-by: Alex Sierra <alex.sierra@amd.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
index 88db82b3d443..f40092a17af8 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
@@ -312,7 +312,7 @@ svm_migrate_copy_to_vram(struct amdgpu_device *adev, struct svm_range *prange,
r = svm_range_vram_node_new(adev, prange, true);
if (r) {
- dev_err(adev->dev, "fail %d to alloc vram\n", r);
+ pr_debug("fail %d to alloc vram\n", r);
goto out;
}
--
2.32.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* RE: [PATCH] drm/amdkfd: replace err by dbg print at svm vram migration
2022-02-10 2:59 [PATCH] drm/amdkfd: replace err by dbg print at svm vram migration Alex Sierra
@ 2022-02-10 3:07 ` Chen, Guchun
2022-02-11 16:17 ` Alex Sierra
1 sibling, 0 replies; 8+ messages in thread
From: Chen, Guchun @ 2022-02-10 3:07 UTC (permalink / raw)
To: Sierra Guiza, Alejandro (Alex), amd-gfx@lists.freedesktop.org
Cc: Kuehling, Felix
[Public]
How about using 'dev_dbg'? It will benefit multiple GPU configuration when enabling debug option.
Regards,
Guchun
-----Original Message-----
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex Sierra
Sent: Thursday, February 10, 2022 10:59 AM
To: amd-gfx@lists.freedesktop.org
Cc: Kuehling, Felix <Felix.Kuehling@amd.com>
Subject: [PATCH] drm/amdkfd: replace err by dbg print at svm vram migration
Avoid spam the kernel log on application memory allocation failures.
Signed-off-by: Alex Sierra <alex.sierra@amd.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
index 88db82b3d443..f40092a17af8 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
@@ -312,7 +312,7 @@ svm_migrate_copy_to_vram(struct amdgpu_device *adev, struct svm_range *prange,
r = svm_range_vram_node_new(adev, prange, true);
if (r) {
- dev_err(adev->dev, "fail %d to alloc vram\n", r);
+ pr_debug("fail %d to alloc vram\n", r);
goto out;
}
--
2.32.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] drm/amdkfd: replace err by dbg print at svm vram migration
2022-02-10 2:59 [PATCH] drm/amdkfd: replace err by dbg print at svm vram migration Alex Sierra
2022-02-10 3:07 ` Chen, Guchun
@ 2022-02-11 16:17 ` Alex Sierra
2022-02-11 16:48 ` philip yang
` (3 more replies)
1 sibling, 4 replies; 8+ messages in thread
From: Alex Sierra @ 2022-02-11 16:17 UTC (permalink / raw)
To: amd-gfx; +Cc: Felix.Kuehling, guchun.chen
Avoid spam the kernel log on application memory allocation failures.
__func__ argument was also removed from dev_fmt macro due to
parameter conflicts with dynamic_dev_dbg.
Signed-off-by: Alex Sierra <alex.sierra@amd.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
index 88db82b3d443..befaadc0e854 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
@@ -36,7 +36,7 @@
#ifdef dev_fmt
#undef dev_fmt
#endif
-#define dev_fmt(fmt) "kfd_migrate: %s: " fmt, __func__
+#define dev_fmt(fmt) "kfd_migrate: " fmt
static uint64_t
svm_migrate_direct_mapping_addr(struct amdgpu_device *adev, uint64_t addr)
@@ -312,7 +312,7 @@ svm_migrate_copy_to_vram(struct amdgpu_device *adev, struct svm_range *prange,
r = svm_range_vram_node_new(adev, prange, true);
if (r) {
- dev_err(adev->dev, "fail %d to alloc vram\n", r);
+ dev_dbg(adev->dev, "fail %d dma_map_page\n", r);
goto out;
}
@@ -332,7 +332,8 @@ svm_migrate_copy_to_vram(struct amdgpu_device *adev, struct svm_range *prange,
DMA_TO_DEVICE);
r = dma_mapping_error(dev, src[i]);
if (r) {
- dev_err(adev->dev, "fail %d dma_map_page\n", r);
+ dev_err(adev->dev, "%s: fail %d dma_map_page\n",
+ __func__, r);
goto out_free_vram_pages;
}
} else {
@@ -612,7 +613,7 @@ svm_migrate_copy_to_ram(struct amdgpu_device *adev, struct svm_range *prange,
dst[i] = dma_map_page(dev, dpage, 0, PAGE_SIZE, DMA_FROM_DEVICE);
r = dma_mapping_error(dev, dst[i]);
if (r) {
- dev_err(adev->dev, "fail %d dma_map_page\n", r);
+ dev_err(adev->dev, "%s: fail %d dma_map_page\n", __func__, r);
goto out_oom;
}
--
2.32.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/amdkfd: replace err by dbg print at svm vram migration
2022-02-11 16:17 ` Alex Sierra
@ 2022-02-11 16:48 ` philip yang
2022-02-11 18:23 ` Felix Kuehling
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: philip yang @ 2022-02-11 16:48 UTC (permalink / raw)
To: Alex Sierra, amd-gfx; +Cc: Felix.Kuehling, guchun.chen
[-- Attachment #1: Type: text/html, Size: 2686 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/amdkfd: replace err by dbg print at svm vram migration
2022-02-11 16:17 ` Alex Sierra
2022-02-11 16:48 ` philip yang
@ 2022-02-11 18:23 ` Felix Kuehling
2022-02-11 19:45 ` Alex Sierra
2022-02-12 3:16 ` Chen, Guchun
3 siblings, 0 replies; 8+ messages in thread
From: Felix Kuehling @ 2022-02-11 18:23 UTC (permalink / raw)
To: Alex Sierra, amd-gfx; +Cc: guchun.chen
Am 2022-02-11 um 11:17 schrieb Alex Sierra:
> Avoid spam the kernel log on application memory allocation failures.
> __func__ argument was also removed from dev_fmt macro due to
> parameter conflicts with dynamic_dev_dbg.
>
> Signed-off-by: Alex Sierra <alex.sierra@amd.com>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
> index 88db82b3d443..befaadc0e854 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
> @@ -36,7 +36,7 @@
> #ifdef dev_fmt
> #undef dev_fmt
> #endif
> -#define dev_fmt(fmt) "kfd_migrate: %s: " fmt, __func__
> +#define dev_fmt(fmt) "kfd_migrate: " fmt
>
> static uint64_t
> svm_migrate_direct_mapping_addr(struct amdgpu_device *adev, uint64_t addr)
> @@ -312,7 +312,7 @@ svm_migrate_copy_to_vram(struct amdgpu_device *adev, struct svm_range *prange,
>
> r = svm_range_vram_node_new(adev, prange, true);
> if (r) {
> - dev_err(adev->dev, "fail %d to alloc vram\n", r);
> + dev_dbg(adev->dev, "fail %d dma_map_page\n", r);
There seems to be a mix-up with this message.
> goto out;
> }
>
> @@ -332,7 +332,8 @@ svm_migrate_copy_to_vram(struct amdgpu_device *adev, struct svm_range *prange,
> DMA_TO_DEVICE);
> r = dma_mapping_error(dev, src[i]);
> if (r) {
> - dev_err(adev->dev, "fail %d dma_map_page\n", r);
> + dev_err(adev->dev, "%s: fail %d dma_map_page\n",
> + __func__, r);
> goto out_free_vram_pages;
> }
> } else {
> @@ -612,7 +613,7 @@ svm_migrate_copy_to_ram(struct amdgpu_device *adev, struct svm_range *prange,
> dst[i] = dma_map_page(dev, dpage, 0, PAGE_SIZE, DMA_FROM_DEVICE);
> r = dma_mapping_error(dev, dst[i]);
> if (r) {
> - dev_err(adev->dev, "fail %d dma_map_page\n", r);
> + dev_err(adev->dev, "%s: fail %d dma_map_page\n", __func__, r);
> goto out_oom;
You should also update the "vma setup fail %d range" messages in
svm_migrate_vma_to_ram and svm_migrate_vma_to_vram that are otherwise
ambiguous.
Regards,
Felix
> }
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] drm/amdkfd: replace err by dbg print at svm vram migration
2022-02-11 16:17 ` Alex Sierra
2022-02-11 16:48 ` philip yang
2022-02-11 18:23 ` Felix Kuehling
@ 2022-02-11 19:45 ` Alex Sierra
2022-02-11 19:52 ` Felix Kuehling
2022-02-12 3:16 ` Chen, Guchun
3 siblings, 1 reply; 8+ messages in thread
From: Alex Sierra @ 2022-02-11 19:45 UTC (permalink / raw)
To: amd-gfx; +Cc: Felix.Kuehling, guchun.chen
Avoid spam the kernel log on application memory allocation failures.
__func__ argument was also removed from dev_fmt macro due to
parameter conflicts with dynamic_dev_dbg.
Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Reviewed-by: Philip Yang <Philip.Yang@amd.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
index 88db82b3d443..8ce0b169b976 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
@@ -36,7 +36,7 @@
#ifdef dev_fmt
#undef dev_fmt
#endif
-#define dev_fmt(fmt) "kfd_migrate: %s: " fmt, __func__
+#define dev_fmt(fmt) "kfd_migrate: " fmt
static uint64_t
svm_migrate_direct_mapping_addr(struct amdgpu_device *adev, uint64_t addr)
@@ -312,7 +312,7 @@ svm_migrate_copy_to_vram(struct amdgpu_device *adev, struct svm_range *prange,
r = svm_range_vram_node_new(adev, prange, true);
if (r) {
- dev_err(adev->dev, "fail %d to alloc vram\n", r);
+ dev_dbg(adev->dev, "fail %d dma_map_page\n", r);
goto out;
}
@@ -332,7 +332,8 @@ svm_migrate_copy_to_vram(struct amdgpu_device *adev, struct svm_range *prange,
DMA_TO_DEVICE);
r = dma_mapping_error(dev, src[i]);
if (r) {
- dev_err(adev->dev, "fail %d dma_map_page\n", r);
+ dev_err(adev->dev, "%s: fail %d dma_map_page\n",
+ __func__, r);
goto out_free_vram_pages;
}
} else {
@@ -433,8 +434,8 @@ svm_migrate_vma_to_vram(struct amdgpu_device *adev, struct svm_range *prange,
r = migrate_vma_setup(&migrate);
if (r) {
- dev_err(adev->dev, "vma setup fail %d range [0x%lx 0x%lx]\n", r,
- prange->start, prange->last);
+ dev_err(adev->dev, "%s: vma setup fail %d range [0x%lx 0x%lx]\n",
+ __func__, r, prange->start, prange->last);
goto out_free;
}
@@ -612,7 +613,7 @@ svm_migrate_copy_to_ram(struct amdgpu_device *adev, struct svm_range *prange,
dst[i] = dma_map_page(dev, dpage, 0, PAGE_SIZE, DMA_FROM_DEVICE);
r = dma_mapping_error(dev, dst[i]);
if (r) {
- dev_err(adev->dev, "fail %d dma_map_page\n", r);
+ dev_err(adev->dev, "%s: fail %d dma_map_page\n", __func__, r);
goto out_oom;
}
@@ -673,8 +674,8 @@ svm_migrate_vma_to_ram(struct amdgpu_device *adev, struct svm_range *prange,
r = migrate_vma_setup(&migrate);
if (r) {
- dev_err(adev->dev, "vma setup fail %d range [0x%lx 0x%lx]\n", r,
- prange->start, prange->last);
+ dev_err(adev->dev, "%s: vma setup fail %d range [0x%lx 0x%lx]\n",
+ __func__, r, prange->start, prange->last);
goto out_free;
}
--
2.32.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/amdkfd: replace err by dbg print at svm vram migration
2022-02-11 19:45 ` Alex Sierra
@ 2022-02-11 19:52 ` Felix Kuehling
0 siblings, 0 replies; 8+ messages in thread
From: Felix Kuehling @ 2022-02-11 19:52 UTC (permalink / raw)
To: Alex Sierra, amd-gfx; +Cc: guchun.chen
Am 2022-02-11 um 14:45 schrieb Alex Sierra:
> Avoid spam the kernel log on application memory allocation failures.
> __func__ argument was also removed from dev_fmt macro due to
> parameter conflicts with dynamic_dev_dbg.
>
> Signed-off-by: Alex Sierra <alex.sierra@amd.com>
> Reviewed-by: Philip Yang <Philip.Yang@amd.com>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 17 +++++++++--------
> 1 file changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
> index 88db82b3d443..8ce0b169b976 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
> @@ -36,7 +36,7 @@
> #ifdef dev_fmt
> #undef dev_fmt
> #endif
> -#define dev_fmt(fmt) "kfd_migrate: %s: " fmt, __func__
> +#define dev_fmt(fmt) "kfd_migrate: " fmt
>
> static uint64_t
> svm_migrate_direct_mapping_addr(struct amdgpu_device *adev, uint64_t addr)
> @@ -312,7 +312,7 @@ svm_migrate_copy_to_vram(struct amdgpu_device *adev, struct svm_range *prange,
>
> r = svm_range_vram_node_new(adev, prange, true);
> if (r) {
> - dev_err(adev->dev, "fail %d to alloc vram\n", r);
> + dev_dbg(adev->dev, "fail %d dma_map_page\n", r);
This is still the wrong message (s/dma_map_page/to alloc vram/). Other
than that, the patch is
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
> goto out;
> }
>
> @@ -332,7 +332,8 @@ svm_migrate_copy_to_vram(struct amdgpu_device *adev, struct svm_range *prange,
> DMA_TO_DEVICE);
> r = dma_mapping_error(dev, src[i]);
> if (r) {
> - dev_err(adev->dev, "fail %d dma_map_page\n", r);
> + dev_err(adev->dev, "%s: fail %d dma_map_page\n",
> + __func__, r);
> goto out_free_vram_pages;
> }
> } else {
> @@ -433,8 +434,8 @@ svm_migrate_vma_to_vram(struct amdgpu_device *adev, struct svm_range *prange,
>
> r = migrate_vma_setup(&migrate);
> if (r) {
> - dev_err(adev->dev, "vma setup fail %d range [0x%lx 0x%lx]\n", r,
> - prange->start, prange->last);
> + dev_err(adev->dev, "%s: vma setup fail %d range [0x%lx 0x%lx]\n",
> + __func__, r, prange->start, prange->last);
> goto out_free;
> }
>
> @@ -612,7 +613,7 @@ svm_migrate_copy_to_ram(struct amdgpu_device *adev, struct svm_range *prange,
> dst[i] = dma_map_page(dev, dpage, 0, PAGE_SIZE, DMA_FROM_DEVICE);
> r = dma_mapping_error(dev, dst[i]);
> if (r) {
> - dev_err(adev->dev, "fail %d dma_map_page\n", r);
> + dev_err(adev->dev, "%s: fail %d dma_map_page\n", __func__, r);
> goto out_oom;
> }
>
> @@ -673,8 +674,8 @@ svm_migrate_vma_to_ram(struct amdgpu_device *adev, struct svm_range *prange,
>
> r = migrate_vma_setup(&migrate);
> if (r) {
> - dev_err(adev->dev, "vma setup fail %d range [0x%lx 0x%lx]\n", r,
> - prange->start, prange->last);
> + dev_err(adev->dev, "%s: vma setup fail %d range [0x%lx 0x%lx]\n",
> + __func__, r, prange->start, prange->last);
> goto out_free;
> }
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] drm/amdkfd: replace err by dbg print at svm vram migration
2022-02-11 16:17 ` Alex Sierra
` (2 preceding siblings ...)
2022-02-11 19:45 ` Alex Sierra
@ 2022-02-12 3:16 ` Chen, Guchun
3 siblings, 0 replies; 8+ messages in thread
From: Chen, Guchun @ 2022-02-12 3:16 UTC (permalink / raw)
To: Sierra Guiza, Alejandro (Alex), amd-gfx@lists.freedesktop.org
Cc: Kuehling, Felix
[Public]
Reviewed-by: Guchun Chen <guchun.chen@amd.com>
Regards,
Guchun
-----Original Message-----
From: Sierra Guiza, Alejandro (Alex) <Alex.Sierra@amd.com>
Sent: Saturday, February 12, 2022 12:18 AM
To: amd-gfx@lists.freedesktop.org
Cc: Kuehling, Felix <Felix.Kuehling@amd.com>; Chen, Guchun <Guchun.Chen@amd.com>
Subject: [PATCH] drm/amdkfd: replace err by dbg print at svm vram migration
Avoid spam the kernel log on application memory allocation failures.
__func__ argument was also removed from dev_fmt macro due to parameter conflicts with dynamic_dev_dbg.
Signed-off-by: Alex Sierra <alex.sierra@amd.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
index 88db82b3d443..befaadc0e854 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
@@ -36,7 +36,7 @@
#ifdef dev_fmt
#undef dev_fmt
#endif
-#define dev_fmt(fmt) "kfd_migrate: %s: " fmt, __func__
+#define dev_fmt(fmt) "kfd_migrate: " fmt
static uint64_t
svm_migrate_direct_mapping_addr(struct amdgpu_device *adev, uint64_t addr) @@ -312,7 +312,7 @@ svm_migrate_copy_to_vram(struct amdgpu_device *adev, struct svm_range *prange,
r = svm_range_vram_node_new(adev, prange, true);
if (r) {
- dev_err(adev->dev, "fail %d to alloc vram\n", r);
+ dev_dbg(adev->dev, "fail %d dma_map_page\n", r);
goto out;
}
@@ -332,7 +332,8 @@ svm_migrate_copy_to_vram(struct amdgpu_device *adev, struct svm_range *prange,
DMA_TO_DEVICE);
r = dma_mapping_error(dev, src[i]);
if (r) {
- dev_err(adev->dev, "fail %d dma_map_page\n", r);
+ dev_err(adev->dev, "%s: fail %d dma_map_page\n",
+ __func__, r);
goto out_free_vram_pages;
}
} else {
@@ -612,7 +613,7 @@ svm_migrate_copy_to_ram(struct amdgpu_device *adev, struct svm_range *prange,
dst[i] = dma_map_page(dev, dpage, 0, PAGE_SIZE, DMA_FROM_DEVICE);
r = dma_mapping_error(dev, dst[i]);
if (r) {
- dev_err(adev->dev, "fail %d dma_map_page\n", r);
+ dev_err(adev->dev, "%s: fail %d dma_map_page\n", __func__, r);
goto out_oom;
}
--
2.32.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-02-12 3:16 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-10 2:59 [PATCH] drm/amdkfd: replace err by dbg print at svm vram migration Alex Sierra
2022-02-10 3:07 ` Chen, Guchun
2022-02-11 16:17 ` Alex Sierra
2022-02-11 16:48 ` philip yang
2022-02-11 18:23 ` Felix Kuehling
2022-02-11 19:45 ` Alex Sierra
2022-02-11 19:52 ` Felix Kuehling
2022-02-12 3:16 ` Chen, Guchun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox