summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang@linux.alibaba.com>2021-04-21 14:44:11 +1000
committerSeung-Woo Kim <sw0312.kim@samsung.com>2021-08-19 02:48:56 +0000
commite97da7ed64f52e05db52b50523e05db77970d312 (patch)
tree3c63abc36e9cbebfb71b25a2981aad79ccb70637 /mm
parent72e99a1c8712c4ac92ddbb3b17c1074ebfcbb49e (diff)
downloadlinux-rpi-e97da7ed64f52e05db52b50523e05db77970d312.tar.gz
linux-rpi-e97da7ed64f52e05db52b50523e05db77970d312.tar.bz2
linux-rpi-e97da7ed64f52e05db52b50523e05db77970d312.zip
mm: cma: use pr_err_ratelimited for CMA warning
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. Link: https://lkml.kernel.org/r/ce2251ef49e1727a9a40531d1996660b05462bd2.1615279825.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com> Reviewed-by: David Hildenbrand <david@redhat.com> Acked-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Origin: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=63f83b31f4f36d933e13bd8b9a25d6d9a0cf89dd Signed-off-by: Ɓukasz Stelmach <l.stelmach@samsung.com> Change-Id: I24e03acb8288fc60e22dddfd409d56b50f3ac12f
Diffstat (limited to 'mm')
-rw-r--r--mm/cma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/cma.c b/mm/cma.c
index 9749e953b66e..18046bfdd6bd 100644
--- a/mm/cma.c
+++ b/mm/cma.c
@@ -486,8 +486,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);
}