mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-18 07:09:36 +02:00
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:
parent
dd071677cb
commit
43b4adb9c9
|
@ -435,3 +435,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_resume_end);
|
|||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_early_resume_begin);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_enable_thermal_genl_check);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_pr_set_vma_name_bypass);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rebalance_anon_lru_bypass);
|
||||
|
|
|
@ -58,6 +58,9 @@ DECLARE_HOOK(android_vh_should_continue_reclaim,
|
|||
DECLARE_HOOK(android_vh_file_is_tiny_bypass,
|
||||
TP_PROTO(bool file_is_tiny, bool *bypass),
|
||||
TP_ARGS(file_is_tiny, bypass));
|
||||
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>
|
||||
|
|
|
@ -6407,6 +6407,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);
|
||||
|
@ -6504,6 +6505,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
|
||||
|
|
Loading…
Reference in New Issue
Block a user