Revert "ANDROID: mm: add vendor hook for vmpressure"

This reverts commit 444a0b7752.

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 <liliangliang@vivo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I63d2a210dc6a6ded20ea8779af719d70f368ce0f
This commit is contained in:
Greg Kroah-Hartman
2022-08-24 18:44:40 +02:00
parent fc6f47b6fc
commit 039f38f9aa
3 changed files with 0 additions and 11 deletions

View File

@@ -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);

View File

@@ -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));

View File

@@ -21,8 +21,6 @@
#include <linux/printk.h>
#include <linux/vmpressure.h>
#include <trace/hooks/mm.h>
/*
* 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