Merge "soc: qcom: mem-hooks: Add scan abort hook for MGLRU"

This commit is contained in:
qctecmdr 2023-10-20 11:30:37 -07:00 committed by Gerrit - the friendly Code Review server
commit 56fd19920b

View File

@ -66,6 +66,11 @@ static void kswapd_per_node_stop(int nid, unsigned int kswapd_threads)
NODE_DATA(nid)->kswapd = NULL;
}
static void scan_abort_checks(void *data, bool *check_wmarks)
{
*check_wmarks = true;
}
static void kswapd_threads_set(void *unused, int nid, bool *skip, bool run)
{
*skip = true;
@ -115,6 +120,16 @@ static int __init init_mem_hooks(void)
}
}
if (IS_ENABLED(CONFIG_LRU_GEN)) {
ret = register_trace_android_vh_scan_abort_check_wmarks(
scan_abort_checks,
NULL);
if (ret) {
pr_err("Failed to register scan_abort_check_wmarks\n");
return ret;
}
}
return 0;
}