* [PATCH] mm: cma: Use pr_err_ratelimited for CMA warning
@ 2021-03-09 9:16 Baolin Wang
2021-03-11 16:53 ` David Hildenbrand
2021-03-11 18:39 ` Minchan Kim
0 siblings, 2 replies; 3+ messages in thread
From: Baolin Wang @ 2021-03-09 9:16 UTC (permalink / raw)
To: akpm; +Cc: baolin.wang, linux-mm, linux-kernel
If we did not reserve extra CMA memory, the log buffer can be
easily filled up by CMA failure warning when the devices calling
dmam_alloc_coherent() to alloc DMA memory. Thus we can use
pr_err_ratelimited() instead to reduce the duplicate CMA warning.
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
---
mm/cma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/cma.c b/mm/cma.c
index 54eee21..d101bdb 100644
--- a/mm/cma.c
+++ b/mm/cma.c
@@ -500,8 +500,8 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align,
}
if (ret && !no_warn) {
- pr_err("%s: %s: alloc failed, req-size: %zu pages, ret: %d\n",
- __func__, cma->name, count, ret);
+ pr_err_ratelimited("%s: %s: alloc failed, req-size: %zu pages, ret: %d\n",
+ __func__, cma->name, count, ret);
cma_debug_show_areas(cma);
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mm: cma: Use pr_err_ratelimited for CMA warning
2021-03-09 9:16 [PATCH] mm: cma: Use pr_err_ratelimited for CMA warning Baolin Wang
@ 2021-03-11 16:53 ` David Hildenbrand
2021-03-11 18:39 ` Minchan Kim
1 sibling, 0 replies; 3+ messages in thread
From: David Hildenbrand @ 2021-03-11 16:53 UTC (permalink / raw)
To: Baolin Wang, akpm; +Cc: linux-mm, linux-kernel
On 09.03.21 10:16, Baolin Wang wrote:
> If we did not reserve extra CMA memory, the log buffer can be
> easily filled up by CMA failure warning when the devices calling
> dmam_alloc_coherent() to alloc DMA memory. Thus we can use
> pr_err_ratelimited() instead to reduce the duplicate CMA warning.
>
> Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
> ---
> mm/cma.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/cma.c b/mm/cma.c
> index 54eee21..d101bdb 100644
> --- a/mm/cma.c
> +++ b/mm/cma.c
> @@ -500,8 +500,8 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align,
> }
>
> if (ret && !no_warn) {
> - pr_err("%s: %s: alloc failed, req-size: %zu pages, ret: %d\n",
> - __func__, cma->name, count, ret);
> + pr_err_ratelimited("%s: %s: alloc failed, req-size: %zu pages, ret: %d\n",
> + __func__, cma->name, count, ret);
> cma_debug_show_areas(cma);
> }
>
>
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm: cma: Use pr_err_ratelimited for CMA warning
2021-03-09 9:16 [PATCH] mm: cma: Use pr_err_ratelimited for CMA warning Baolin Wang
2021-03-11 16:53 ` David Hildenbrand
@ 2021-03-11 18:39 ` Minchan Kim
1 sibling, 0 replies; 3+ messages in thread
From: Minchan Kim @ 2021-03-11 18:39 UTC (permalink / raw)
To: Baolin Wang; +Cc: akpm, linux-mm, linux-kernel
On Tue, Mar 09, 2021 at 05:16:06PM +0800, Baolin Wang wrote:
> If we did not reserve extra CMA memory, the log buffer can be
> easily filled up by CMA failure warning when the devices calling
> dmam_alloc_coherent() to alloc DMA memory. Thus we can use
> pr_err_ratelimited() instead to reduce the duplicate CMA warning.
>
> Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Acked-by: Minchan Kim <minchan@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-11 18:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09 9:16 [PATCH] mm: cma: Use pr_err_ratelimited for CMA warning Baolin Wang
2021-03-11 16:53 ` David Hildenbrand
2021-03-11 18:39 ` Minchan Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).