linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Dong Aisheng <aisheng.dong@nxp.com>, linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org, dongas86@gmail.com,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 5/5] mm/page_alloc: improve memmap_pages and dma_reserve dbg msg
Date: Tue, 25 May 2021 10:01:15 +0200	[thread overview]
Message-ID: <69b5a56c-e9a0-01e7-5fd5-78c6e656fa68@redhat.com> (raw)
In-Reply-To: <20210517112044.233138-6-aisheng.dong@nxp.com>

On 17.05.21 13:20, Dong Aisheng wrote:
> Make debug message more accurately.
> 
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
> ---
>   mm/page_alloc.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 3100fcb08500..16f494352f58 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -7263,14 +7263,15 @@ static void __init free_area_init_core(struct pglist_data *pgdat)
>   					pr_debug("  %s zone: %lu pages used for memmap\n",
>   						 zone_names[j], memmap_pages);
>   			} else
> -				pr_warn("  %s zone: %lu pages exceeds freesize %lu\n",
> +				pr_warn("  %s zone: %lu memmap pages exceeds freesize %lu\n",
>   					zone_names[j], memmap_pages, freesize);
>   		}
>   
>   		/* Account for reserved pages */
>   		if (j == 0 && freesize > dma_reserve) {
>   			freesize -= dma_reserve;
> -			pr_debug("  %s zone: %lu pages reserved\n", zone_names[0], dma_reserve);
> +			pr_debug("  %s zone: %lu pages reserved for dma\n",
> +				 zone_names[0], dma_reserve);

... which is not really correct I think. See the comment above 
set_dma_reserve(). It's called dma_reserve because it involves the first 
zone -- where many unfreeable allocations like the kernel image end up.

Memory is not reserved for dma purposes ... and the zone name should be 
sufficient.

-- 
Thanks,

David / dhildenb


  reply	other threads:[~2021-05-25  8:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17 11:20 [PATCH 0/5] mm/sparse: a few minor fixes and improvements Dong Aisheng
2021-05-17 11:20 ` [PATCH 1/5] mm: correct SECTION_SHIFT name in code comments Dong Aisheng
2021-05-17 17:17   ` Yu Zhao
2021-05-18  2:48     ` Aisheng Dong
2021-05-17 11:20 ` [PATCH 2/5] mm/sparse: free section usage memory in case populate_section_memmap failed Dong Aisheng
2021-05-18 10:09   ` Mike Rapoport
2021-05-18 10:25     ` Dong Aisheng
2021-05-18 11:43       ` Mike Rapoport
2021-05-19  4:04         ` Dong Aisheng
2021-05-25  7:52   ` David Hildenbrand
2021-05-25  8:15     ` Dong Aisheng
2021-05-17 11:20 ` [PATCH 3/5] mm/sparse: move mem_sections allocation out of memory_present() Dong Aisheng
2021-05-18 10:12   ` Mike Rapoport
2021-05-18 10:45     ` Dong Aisheng
2021-05-17 11:20 ` [PATCH 4/5] mm: rename the global section array to mem_sections Dong Aisheng
2021-05-25  7:55   ` David Hildenbrand
2021-05-25  8:32     ` Dong Aisheng
2021-05-17 11:20 ` [PATCH 5/5] mm/page_alloc: improve memmap_pages and dma_reserve dbg msg Dong Aisheng
2021-05-25  8:01   ` David Hildenbrand [this message]
2021-05-25  8:39     ` Dong Aisheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=69b5a56c-e9a0-01e7-5fd5-78c6e656fa68@redhat.com \
    --to=david@redhat.com \
    --cc=aisheng.dong@nxp.com \
    --cc=akpm@linux-foundation.org \
    --cc=dongas86@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).