Merge "soc: qcom: mem-hooks: Add scan abort hook for MGLRU"
This commit is contained in:
commit
56fd19920b
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user