ANDROID: mm: add vendor hook in vmscan.c
Add vendor hook to skip rebalance anon lru list. Bug: 351175506 Change-Id: Ib4e56976d892b96f6c319a1b69d23d71ac7ce993 Signed-off-by: Sooyong Suk <s.suk@samsung.corp-partner.google.com>
This commit is contained in:
committed by
Matthias Männich
parent
72906266a4
commit
cf3b5e3a2f
@@ -275,3 +275,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_async_psi_bypass);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cma_alloc_retry);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_smaps_pte_entry);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_show_smap);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rebalance_anon_lru_bypass);
|
||||
|
||||
@@ -40,6 +40,9 @@ DECLARE_HOOK(android_vh_should_memcg_bypass,
|
||||
DECLARE_HOOK(android_vh_do_shrink_slab,
|
||||
TP_PROTO(struct shrinker *shrinker, long *freeable),
|
||||
TP_ARGS(shrinker, freeable));
|
||||
DECLARE_HOOK(android_vh_rebalance_anon_lru_bypass,
|
||||
TP_PROTO(bool *bypass),
|
||||
TP_ARGS(bypass));
|
||||
#endif /* _TRACE_HOOK_VMSCAN_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
|
||||
@@ -5712,6 +5712,7 @@ static void shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc)
|
||||
unsigned long nr_to_reclaim = sc->nr_to_reclaim;
|
||||
bool proportional_reclaim;
|
||||
struct blk_plug plug;
|
||||
bool bypass = false;
|
||||
|
||||
if (lru_gen_enabled() && !root_reclaim(sc)) {
|
||||
lru_gen_shrink_lruvec(lruvec, sc);
|
||||
@@ -5809,6 +5810,9 @@ static void shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc)
|
||||
}
|
||||
blk_finish_plug(&plug);
|
||||
sc->nr_reclaimed += nr_reclaimed;
|
||||
trace_android_vh_rebalance_anon_lru_bypass(&bypass);
|
||||
if (bypass)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Even if we did not try to evict anon pages at all, we want to
|
||||
|
||||
Reference in New Issue
Block a user