[PATCH][SRU Disco] UBUNTU: SAUCE: cma: ratelimit cma_alloc error messages

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH][SRU Disco] UBUNTU: SAUCE: cma: ratelimit cma_alloc error messages

dann frazier-4
BugLink: https://bugs.launchpad.net/bugs/1828092

We're seeing on the order of 10K cma_alloc() failure messages on
certain systems (HiSilicon D06 w/ SMMU BIOS-disabled, HP m400s).
While we continue to try and identify a solution that avoids
these messages altogether, in the meantime let's lessen the impact
(slow boot time, etc) by ratelimiting these messages. On a D06
w/ SMMU disabled, this drops the error messages count from 10758 to
21.

Signed-off-by: dann frazier <[hidden email]>
---
 mm/cma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/cma.c b/mm/cma.c
index c7b39dd3b4f65..56d2a046f689e 100644
--- a/mm/cma.c
+++ b/mm/cma.c
@@ -477,7 +477,7 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align,
  page_kasan_tag_reset(page + i);
  }
 
- if (ret && !no_warn) {
+ if (ret && !no_warn && printk_ratelimit()) {
  pr_err("%s: alloc failed, req-size: %zu pages, ret: %d\n",
  __func__, count, ret);
  cma_debug_show_areas(cma);
--
2.20.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [PATCH][SRU Disco] UBUNTU: SAUCE: cma: ratelimit cma_alloc error messages

Thadeu Lima de Souza Cascardo-3
Low risk, well tested.

Acked-by: Thadeu Lima de Souza Cascardo <[hidden email]>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [PATCH][SRU Disco] UBUNTU: SAUCE: cma: ratelimit cma_alloc error messages

Kleber Souza
In reply to this post by dann frazier-4
On 5/7/19 7:01 PM, dann frazier wrote:

> BugLink: https://bugs.launchpad.net/bugs/1828092
>
> We're seeing on the order of 10K cma_alloc() failure messages on
> certain systems (HiSilicon D06 w/ SMMU BIOS-disabled, HP m400s).
> While we continue to try and identify a solution that avoids
> these messages altogether, in the meantime let's lessen the impact
> (slow boot time, etc) by ratelimiting these messages. On a D06
> w/ SMMU disabled, this drops the error messages count from 10758 to
> 21.
>
> Signed-off-by: dann frazier <[hidden email]>

Acked-by: Kleber Sacilotto de Souza <[hidden email]>

> ---
>  mm/cma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/cma.c b/mm/cma.c
> index c7b39dd3b4f65..56d2a046f689e 100644
> --- a/mm/cma.c
> +++ b/mm/cma.c
> @@ -477,7 +477,7 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align,
>   page_kasan_tag_reset(page + i);
>   }
>  
> - if (ret && !no_warn) {
> + if (ret && !no_warn && printk_ratelimit()) {
>   pr_err("%s: alloc failed, req-size: %zu pages, ret: %d\n",
>   __func__, count, ret);
>   cma_debug_show_areas(cma);
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED: [PATCH][SRU Disco] UBUNTU: SAUCE: cma: ratelimit cma_alloc error messages

Kleber Souza
In reply to this post by dann frazier-4
On 5/7/19 7:01 PM, dann frazier wrote:

> BugLink: https://bugs.launchpad.net/bugs/1828092
>
> We're seeing on the order of 10K cma_alloc() failure messages on
> certain systems (HiSilicon D06 w/ SMMU BIOS-disabled, HP m400s).
> While we continue to try and identify a solution that avoids
> these messages altogether, in the meantime let's lessen the impact
> (slow boot time, etc) by ratelimiting these messages. On a D06
> w/ SMMU disabled, this drops the error messages count from 10758 to
> 21.
>
> Signed-off-by: dann frazier <[hidden email]>
> ---
>  mm/cma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/cma.c b/mm/cma.c
> index c7b39dd3b4f65..56d2a046f689e 100644
> --- a/mm/cma.c
> +++ b/mm/cma.c
> @@ -477,7 +477,7 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align,
>   page_kasan_tag_reset(page + i);
>   }
>  
> - if (ret && !no_warn) {
> + if (ret && !no_warn && printk_ratelimit()) {
>   pr_err("%s: alloc failed, req-size: %zu pages, ret: %d\n",
>   __func__, count, ret);
>   cma_debug_show_areas(cma);
>

Applied to disco/master-next branch.

Thanks,
Kleber


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED[Unstable]: [PATCH][SRU Disco] UBUNTU: SAUCE: cma: ratelimit cma_alloc error messages

Seth Forshee
In reply to this post by dann frazier-4
On Tue, May 07, 2019 at 11:01:41AM -0600, dann frazier wrote:

> BugLink: https://bugs.launchpad.net/bugs/1828092
>
> We're seeing on the order of 10K cma_alloc() failure messages on
> certain systems (HiSilicon D06 w/ SMMU BIOS-disabled, HP m400s).
> While we continue to try and identify a solution that avoids
> these messages altogether, in the meantime let's lessen the impact
> (slow boot time, etc) by ratelimiting these messages. On a D06
> w/ SMMU disabled, this drops the error messages count from 10758 to
> 21.
>
> Signed-off-by: dann frazier <[hidden email]>

Applied to unstable/master, thanks!

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team