linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] mm: cma: Print region name on failure
@ 2021-02-09 14:24 Georgi Djakov
  2021-02-09 16:03 ` Minchan Kim
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Georgi Djakov @ 2021-02-09 14:24 UTC (permalink / raw)
  To: akpm, linux-mm; +Cc: rdunlap, pdaly, georgi.djakov, linux-kernel

From: Patrick Daly <pdaly@codeaurora.org>

Print the name of the CMA region for convenience. This is useful
information to have when cma_alloc() fails.

Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
---
v2:
 * Print the "count" variable, as it was originally in the code. (Randy)
 * Fix spelling s/convienience/convenience/ in the commit text (Randy)

v1: https://lore.kernel.org/r/20210208115200.20286-1-georgi.djakov@linaro.org/

 mm/cma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/cma.c b/mm/cma.c
index 23d4a97c834a..54eee2119822 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: alloc failed, req-size: %zu pages, ret: %d\n",
-			__func__, count, ret);
+		pr_err("%s: %s: alloc failed, req-size: %zu pages, ret: %d\n",
+		       __func__, cma->name, count, ret);
 		cma_debug_show_areas(cma);
 	}
 


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] mm: cma: Print region name on failure
  2021-02-09 14:24 [PATCH v2] mm: cma: Print region name on failure Georgi Djakov
@ 2021-02-09 16:03 ` Minchan Kim
  2021-02-09 16:06 ` David Hildenbrand
  2021-02-09 17:36 ` Randy Dunlap
  2 siblings, 0 replies; 4+ messages in thread
From: Minchan Kim @ 2021-02-09 16:03 UTC (permalink / raw)
  To: Georgi Djakov; +Cc: akpm, linux-mm, rdunlap, pdaly, linux-kernel

On Tue, Feb 09, 2021 at 04:24:14PM +0200, Georgi Djakov wrote:
> From: Patrick Daly <pdaly@codeaurora.org>
> 
> Print the name of the CMA region for convenience. This is useful
> information to have when cma_alloc() fails.
> 
> Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Acked-by: Minchan Kim <minchan@kernel.org>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] mm: cma: Print region name on failure
  2021-02-09 14:24 [PATCH v2] mm: cma: Print region name on failure Georgi Djakov
  2021-02-09 16:03 ` Minchan Kim
@ 2021-02-09 16:06 ` David Hildenbrand
  2021-02-09 17:36 ` Randy Dunlap
  2 siblings, 0 replies; 4+ messages in thread
From: David Hildenbrand @ 2021-02-09 16:06 UTC (permalink / raw)
  To: Georgi Djakov, akpm, linux-mm; +Cc: rdunlap, pdaly, linux-kernel

On 09.02.21 15:24, Georgi Djakov wrote:
> From: Patrick Daly <pdaly@codeaurora.org>
> 
> Print the name of the CMA region for convenience. This is useful
> information to have when cma_alloc() fails.
> 
> Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
> ---
> v2:
>   * Print the "count" variable, as it was originally in the code. (Randy)
>   * Fix spelling s/convienience/convenience/ in the commit text (Randy)
> 
> v1: https://lore.kernel.org/r/20210208115200.20286-1-georgi.djakov@linaro.org/
> 
>   mm/cma.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/cma.c b/mm/cma.c
> index 23d4a97c834a..54eee2119822 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: alloc failed, req-size: %zu pages, ret: %d\n",
> -			__func__, count, ret);
> +		pr_err("%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] 4+ messages in thread

* Re: [PATCH v2] mm: cma: Print region name on failure
  2021-02-09 14:24 [PATCH v2] mm: cma: Print region name on failure Georgi Djakov
  2021-02-09 16:03 ` Minchan Kim
  2021-02-09 16:06 ` David Hildenbrand
@ 2021-02-09 17:36 ` Randy Dunlap
  2 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2021-02-09 17:36 UTC (permalink / raw)
  To: Georgi Djakov, akpm, linux-mm; +Cc: pdaly, linux-kernel

On 2/9/21 6:24 AM, Georgi Djakov wrote:
> From: Patrick Daly <pdaly@codeaurora.org>
> 
> Print the name of the CMA region for convenience. This is useful
> information to have when cma_alloc() fails.
> 
> Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>

Reviewed-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
> v2:
>  * Print the "count" variable, as it was originally in the code. (Randy)
>  * Fix spelling s/convienience/convenience/ in the commit text (Randy)
> 
> v1: https://lore.kernel.org/r/20210208115200.20286-1-georgi.djakov@linaro.org/
> 
>  mm/cma.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/cma.c b/mm/cma.c
> index 23d4a97c834a..54eee2119822 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: alloc failed, req-size: %zu pages, ret: %d\n",
> -			__func__, count, ret);
> +		pr_err("%s: %s: alloc failed, req-size: %zu pages, ret: %d\n",
> +		       __func__, cma->name, count, ret);
>  		cma_debug_show_areas(cma);
>  	}
>  
> 


-- 
~Randy



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-09 17:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09 14:24 [PATCH v2] mm: cma: Print region name on failure Georgi Djakov
2021-02-09 16:03 ` Minchan Kim
2021-02-09 16:06 ` David Hildenbrand
2021-02-09 17:36 ` Randy Dunlap

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).