[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <69b5a56c-e9a0-01e7-5fd5-78c6e656fa68@redhat.com>
Date: Tue, 25 May 2021 10:01:15 +0200
From: David Hildenbrand <david@...hat.com>
To: Dong Aisheng <aisheng.dong@....com>, linux-mm@...ck.org
Cc: linux-kernel@...r.kernel.org, dongas86@...il.com,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 5/5] mm/page_alloc: improve memmap_pages and dma_reserve
dbg msg
On 17.05.21 13:20, Dong Aisheng wrote:
> Make debug message more accurately.
>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Signed-off-by: Dong Aisheng <aisheng.dong@....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
Powered by blists - more mailing lists