From 039f38f9aab85bf99272a6825c0b1466abd175fa Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 24 Aug 2022 18:44:40 +0200 Subject: [PATCH] Revert "ANDROID: mm: add vendor hook for vmpressure" This reverts commit 444a0b77522e1fca71ac16848d5da5bd7a27908e. The hook android_vh_vmpressure is 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: 191534577 Cc: Liangliang Li Signed-off-by: Greg Kroah-Hartman Change-Id: I63d2a210dc6a6ded20ea8779af719d70f368ce0f --- drivers/android/vendor_hooks.c | 1 - include/trace/hooks/mm.h | 3 --- mm/vmpressure.c | 7 ------- 3 files changed, 11 deletions(-) diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 9f6add6883ca..5e27095e8b7a 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -343,7 +343,6 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmc_gpio_cd_irqt); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_save_vmalloc_stack); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_show_stack_hash); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_save_track_hash); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_vmpressure); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_task_comm); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpufreq_acct_update_power); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_typec_tcpm_log); diff --git a/include/trace/hooks/mm.h b/include/trace/hooks/mm.h index b45a6bdd4e52..a5db2918abbb 100644 --- a/include/trace/hooks/mm.h +++ b/include/trace/hooks/mm.h @@ -131,9 +131,6 @@ DECLARE_HOOK(android_vh_show_stack_hash, DECLARE_HOOK(android_vh_save_track_hash, TP_PROTO(bool alloc, unsigned long p), TP_ARGS(alloc, p)); -DECLARE_HOOK(android_vh_vmpressure, - TP_PROTO(struct mem_cgroup *memcg, bool *bypass), - TP_ARGS(memcg, bypass)); DECLARE_HOOK(android_vh_mem_cgroup_alloc, TP_PROTO(struct mem_cgroup *memcg), TP_ARGS(memcg)); diff --git a/mm/vmpressure.c b/mm/vmpressure.c index 632b88e9d49b..9b172561fded 100644 --- a/mm/vmpressure.c +++ b/mm/vmpressure.c @@ -21,8 +21,6 @@ #include #include -#include - /* * The window size (vmpressure_win) is the number of scanned pages before * we try to analyze scanned/reclaimed ratio. So the window is used as a @@ -243,17 +241,12 @@ void vmpressure(gfp_t gfp, struct mem_cgroup *memcg, bool tree, unsigned long scanned, unsigned long reclaimed) { struct vmpressure *vmpr; - bool bypass = false; if (mem_cgroup_disabled()) return; vmpr = memcg_to_vmpressure(memcg); - trace_android_vh_vmpressure(memcg, &bypass); - if (unlikely(bypass)) - return; - /* * Here we only want to account pressure that userland is able to * help us with. For example, suppose that DMA zone is under