ANDROID: adjust check_flags parameter

Along with I746f4fbc20df5cf394d7644ff2cd6f25916c9790,
it also needs to adjust check_flags.

Bug: 416087944
Change-Id: I2871ab305963da00fcc8b0a7755bd8db7859e4c5
Signed-off-by: Minchan Kim <minchan@google.com>
This commit is contained in:
Minchan Kim
2025-05-06 19:57:28 +00:00
parent 1133098a07
commit 8f5494d90c
3 changed files with 8 additions and 1 deletions

View File

@@ -550,6 +550,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_free_pages_prepare_bypass);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_free_pages_ok_bypass);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_free_unref_page_list_bypass);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_free_pages_prepare_init);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_free_one_page_flag_check);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_post_alloc_hook);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_new_page);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_split_large_folio_bypass);

View File

@@ -458,6 +458,9 @@ DECLARE_HOOK(android_vh_free_unref_page_list_bypass,
DECLARE_HOOK(android_vh_free_pages_prepare_init,
TP_PROTO(struct page *page, int nr_pages, bool *init),
TP_ARGS(page, nr_pages, init));
DECLARE_HOOK(android_vh_free_one_page_flag_check,
TP_PROTO(unsigned long *flags),
TP_ARGS(flags));
DECLARE_HOOK(android_vh_post_alloc_hook,
TP_PROTO(struct page *page, unsigned int order, bool *init),
TP_ARGS(page, order, init));

View File

@@ -908,6 +908,7 @@ static inline void __free_one_page(struct page *page,
bool to_tail;
int max_order = zone_max_order(zone);
bool bypass = false;
unsigned long check_flags;
trace_android_vh_free_one_page_bypass(page, zone, order,
migratetype, (int)fpi_flags, &bypass);
@@ -916,7 +917,9 @@ static inline void __free_one_page(struct page *page,
return;
VM_BUG_ON(!zone_is_initialized(zone));
VM_BUG_ON_PAGE(page->flags & PAGE_FLAGS_CHECK_AT_PREP, page);
check_flags = PAGE_FLAGS_CHECK_AT_PREP;
trace_android_vh_free_one_page_flag_check(&check_flags);
VM_BUG_ON_PAGE(page->flags & check_flags, page);
VM_BUG_ON(migratetype == -1);