mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-07 01:45:18 +02:00
ANDROID: mm: add vendor hook to abort scan by order
Add vendor hook to determine whether kswapd scan should be aborted based on the order of scan_control. Avoid excessive kswapd reclaim. Bug: 365902592 Change-Id: Iafd31ba629db2a65afc19e48e22ec8ad0bbe4cf2 Signed-off-by: yipeng xiang <yipengxiang@honor.corp-partner.google.com>
This commit is contained in:
parent
4082972733
commit
9d48e18a60
|
@ -336,6 +336,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_modify_scan_control);
|
|||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_should_continue_reclaim);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_file_is_tiny_bypass);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mglru_should_abort_scan);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mglru_should_abort_scan_order);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_exit_signal);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_folio_look_around_ref);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_look_around);
|
||||
|
|
|
@ -61,6 +61,9 @@ DECLARE_HOOK(android_vh_file_is_tiny_bypass,
|
|||
DECLARE_HOOK(android_vh_mglru_should_abort_scan,
|
||||
TP_PROTO(u64 *ext, bool *bypass),
|
||||
TP_ARGS(ext, bypass));
|
||||
DECLARE_HOOK(android_vh_mglru_should_abort_scan_order,
|
||||
TP_PROTO(unsigned int order, bool *bypass),
|
||||
TP_ARGS(order, bypass));
|
||||
DECLARE_HOOK(android_vh_rebalance_anon_lru_bypass,
|
||||
TP_PROTO(bool *bypass),
|
||||
TP_ARGS(bypass));
|
||||
|
|
|
@ -5498,8 +5498,9 @@ static bool should_abort_scan(struct lruvec *lruvec, struct scan_control *sc)
|
|||
if (sc->nr_reclaimed >= max(sc->nr_to_reclaim, compact_gap(sc->order)))
|
||||
return true;
|
||||
|
||||
trace_android_vh_mglru_should_abort_scan_order(sc->order, &bypass);
|
||||
/* check the order to exclude compaction-induced reclaim */
|
||||
if (!current_is_kswapd() || sc->order)
|
||||
if ((!current_is_kswapd() || sc->order) && !bypass)
|
||||
return false;
|
||||
|
||||
mark = sysctl_numa_balancing_mode & NUMA_BALANCING_MEMORY_TIERING ?
|
||||
|
|
Loading…
Reference in New Issue
Block a user