From cc51dcbc60c4492d68e3b075ff4d8bd61729dae4 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 21 Sep 2022 16:35:26 +0200 Subject: [PATCH] Revert "ANDROID: vendor_hooks:vendor hook for __alloc_pages_slowpath." This reverts commit dec2f52d08d2d5b36fffafd489457ce4ac1c530e. The hooks android_vh_alloc_pages_reclaim_bypass and android_vh_alloc_pages_failure_bypass are not used by any vendor, so remove it to help with merge issues with future LTS releases. If this is needed by any real user, it can easily be reverted to add it back and then the symbol should be added to the abi list at the same time to prevent it from being removed again later. Bug: 203756332 Bug: 243629905 Cc: xiaofeng Signed-off-by: Greg Kroah-Hartman Change-Id: Id313f6971e0b5437fcfc1ed3f8d4c56706217133 --- drivers/android/vendor_hooks.c | 2 -- include/trace/hooks/mm.h | 8 -------- mm/page_alloc.c | 11 ----------- 3 files changed, 21 deletions(-) diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 9224b7bab3bd..ea1b1cf1468e 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -454,8 +454,6 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alloc_si); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_free_pages); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_shmem_page_flag); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sched_pelt_multiplier); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alloc_pages_reclaim_bypass); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alloc_pages_failure_bypass); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_page_look_around_ref); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_look_around); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_look_around_migrate_page); diff --git a/include/trace/hooks/mm.h b/include/trace/hooks/mm.h index b1c0f440f8ff..37ce86164bc8 100644 --- a/include/trace/hooks/mm.h +++ b/include/trace/hooks/mm.h @@ -264,14 +264,6 @@ DECLARE_HOOK(android_vh_set_shmem_page_flag, DECLARE_HOOK(android_vh_remove_vmalloc_stack, TP_PROTO(struct vm_struct *vm), TP_ARGS(vm)); -DECLARE_HOOK(android_vh_alloc_pages_reclaim_bypass, - TP_PROTO(gfp_t gfp_mask, int order, int alloc_flags, - int migratetype, struct page **page), - TP_ARGS(gfp_mask, order, alloc_flags, migratetype, page)); -DECLARE_HOOK(android_vh_alloc_pages_failure_bypass, - TP_PROTO(gfp_t gfp_mask, int order, int alloc_flags, - int migratetype, struct page **page), - TP_ARGS(gfp_mask, order, alloc_flags, migratetype, page)); DECLARE_HOOK(android_vh_test_clear_look_around_ref, TP_PROTO(struct page *page), TP_ARGS(page)); diff --git a/mm/page_alloc.c b/mm/page_alloc.c index a493ea72dcda..9bb27db5be15 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -4926,12 +4926,6 @@ retry: if (current->flags & PF_MEMALLOC) goto nopage; - trace_android_vh_alloc_pages_reclaim_bypass(gfp_mask, order, - alloc_flags, ac->migratetype, &page); - - if (page) - goto got_pg; - /* Try direct reclaim and then allocating */ page = __alloc_pages_direct_reclaim(gfp_mask, order, alloc_flags, ac, &did_some_progress); @@ -5039,11 +5033,6 @@ nopage: goto retry; } fail: - trace_android_vh_alloc_pages_failure_bypass(gfp_mask, order, - alloc_flags, ac->migratetype, &page); - if (page) - goto got_pg; - warn_alloc(gfp_mask, ac->nodemask, "page allocation failure: order:%u", order); got_pg: