ANDROID: mm, oom: add vendor hook to prevent oom panic
In some cases we would like to bypass oom panic and give the system more time to cleanup memory. Add vendor hook to allow skipping the oom panic. Bug: 186875166 Change-Id: I64e74b2c013d6f18d74504777c6559d9ae07e008 Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <linux/types.h>
|
||||
|
||||
#include <linux/mm.h>
|
||||
#include <linux/oom.h>
|
||||
#include <linux/tracepoint.h>
|
||||
#include <trace/hooks/vendor_hooks.h>
|
||||
|
||||
@@ -78,6 +79,9 @@ DECLARE_HOOK(android_vh_mm_dirty_limits,
|
||||
unsigned long nr_reclaimable, unsigned long pages_dirtied),
|
||||
TP_ARGS(gdtc, strictlimit, dirty, bg_thresh,
|
||||
nr_reclaimable, pages_dirtied));
|
||||
DECLARE_HOOK(android_vh_oom_check_panic,
|
||||
TP_PROTO(struct oom_control *oc, int *ret),
|
||||
TP_ARGS(oc, ret));
|
||||
DECLARE_HOOK(android_vh_save_vmalloc_stack,
|
||||
TP_PROTO(unsigned long flags, struct vm_struct *vm),
|
||||
TP_ARGS(flags, vm));
|
||||
|
Reference in New Issue
Block a user