On Fri, Jun 14, 2024 at 6:19 PM Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote: > > On Fri, 14 Jun 2024 16:05:04 -0700 Suren Baghdasaryan <surenb@xxxxxxxxxx> wrote: > > > During compaction isolated free pages are marked allocated so that they > > can be split and/or freed. For that, post_alloc_hook() is used inside > > split_map_pages() and release_free_list(). split_map_pages() marks free > > pages allocated, splits the pages and then lets alloc_contig_range_noprof() > > free those pages. release_free_list() marks free pages and immediately > > frees them. This usage of post_alloc_hook() affect memory allocation > > profiling because these functions might not be called from an instrumented > > allocator, therefore current->alloc_tag is NULL and when debugging is > > enabled (CONFIG_MEM_ALLOC_PROFILING_DEBUG=y) that causes warnings. > > It would be helpful to quote the warnings for the changelog. And a > Reported-by:/Closes: if appropriate. This was not really reported anywhere but if someone hit this condition (it requires compaction to be running) then the warning would be generated. > > I'm assuming we want this in 6.10-rcX? Yes please. Otherwise someone will report that they are getting this warning when the system is under memory pressure and CONFIG_MEM_ALLOC_PROFILING_DEBUG is enabled. > > Please help in identifying the Fixes:, for anyone who might be > backporting allocation profiling. I think we can mark it as Fixes: b951aaff5035 ("mm: enable page allocation tagging") but it's really a separate patch which covers a corner case. Please let me know if you want me to send a v2 with this tag added. Thanks, Suren. >