diff options
author | Reed Riley <reed@riley.engineer> | 2024-04-15 21:08:13 -0700 |
---|---|---|
committer | Reed Riley <reed@riley.engineer> | 2024-04-15 21:08:13 -0700 |
commit | e5e8f203d77f90d1af8ebfd794eb1593582b85cc (patch) | |
tree | 4b247a45e411ea62d5af495eec775d3d48c40676 /include/linux/mm.h | |
parent | 6432d7745c1d0eba610fed85a8a6bac1864e858d (diff) | |
parent | 72cfb036b00a2c9f59a5d6ff1bc2d039ffb67490 (diff) |
Merge branch 'memalloc_prof_v6' of https://github.com/surenbaghdasaryan/linux
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 0436b919f1c7..150de10e0825 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -5,6 +5,7 @@ #include <linux/errno.h> #include <linux/mmdebug.h> #include <linux/gfp.h> +#include <linux/pgalloc_tag.h> #include <linux/bug.h> #include <linux/list.h> #include <linux/mmzone.h> @@ -3132,6 +3133,14 @@ extern void reserve_bootmem_region(phys_addr_t start, /* Free the reserved page into the buddy system, so it gets managed. */ static inline void free_reserved_page(struct page *page) { + if (mem_alloc_profiling_enabled()) { + union codetag_ref *ref = get_page_tag_ref(page); + + if (ref) { + set_codetag_empty(ref); + put_page_tag_ref(ref); + } + } ClearPageReserved(page); init_page_count(page); __free_page(page); |