From: David Hildenbrand <david@redhat.com>
To: Suren Baghdasaryan <surenb@google.com>, akpm@linux-foundation.org
Cc: kent.overstreet@linux.dev, vbabka@suse.cz,
pasha.tatashin@soleen.com, souravpanda@google.com,
keescook@chromium.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, stable@vger.kernel.org
Subject: Re: [PATCH v3 2/2] alloc_tag: mark pages reserved during CMA activation as not tagged
Date: Tue, 13 Aug 2024 17:09:09 +0200 [thread overview]
Message-ID: <be75dbc3-3137-44a2-af45-5454728c98a2@redhat.com> (raw)
In-Reply-To: <20240813150758.855881-2-surenb@google.com>
On 13.08.24 17:07, Suren Baghdasaryan wrote:
> During CMA activation, pages in CMA area are prepared and then freed
> without being allocated. This triggers warnings when memory allocation
> debug config (CONFIG_MEM_ALLOC_PROFILING_DEBUG) is enabled. Fix this
> by marking these pages not tagged before freeing them.
>
> Fixes: d224eb0287fb ("codetag: debug: mark codetags for reserved pages as empty")
> Signed-off-by: Suren Baghdasaryan <surenb@google.com>
> Cc: stable@vger.kernel.org # v6.10
> ---
> Changes since v2 [1]:
> - Add and use clear_page_tag_ref helper, per David Hildenbrand
>
> https://lore.kernel.org/all/20240812192428.151825-1-surenb@google.com/
>
> mm/mm_init.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/mm/mm_init.c b/mm/mm_init.c
> index 907c46b0773f..13c4060bb01a 100644
> --- a/mm/mm_init.c
> +++ b/mm/mm_init.c
> @@ -2245,6 +2245,8 @@ void __init init_cma_reserved_pageblock(struct page *page)
>
> set_pageblock_migratetype(page, MIGRATE_CMA);
> set_page_refcounted(page);
> + /* pages were reserved and not allocated */
> + clear_page_tag_ref(page);
> __free_pages(page, pageblock_order);
>
> adjust_managed_page_count(page, pageblock_nr_pages);
Acked-by: David Hildenbrand <david@redhat.com>
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2024-08-13 15:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-13 15:07 [PATCH v3 1/2] alloc_tag: introduce clear_page_tag_ref() helper function Suren Baghdasaryan
2024-08-13 15:07 ` [PATCH v3 2/2] alloc_tag: mark pages reserved during CMA activation as not tagged Suren Baghdasaryan
2024-08-13 15:09 ` David Hildenbrand [this message]
2024-08-13 16:06 ` Suren Baghdasaryan
2024-08-13 18:40 ` Andrew Morton
2024-08-13 19:37 ` Suren Baghdasaryan
2024-08-13 15:08 ` [PATCH v3 1/2] alloc_tag: introduce clear_page_tag_ref() helper function David Hildenbrand
2024-08-14 18:42 ` Pasha Tatashin
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=be75dbc3-3137-44a2-af45-5454728c98a2@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=keescook@chromium.org \
--cc=kent.overstreet@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pasha.tatashin@soleen.com \
--cc=souravpanda@google.com \
--cc=stable@vger.kernel.org \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
/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