ANDROID: vendor_hooks: bypass shrink slab

Add hooks for bypass shrink slab.

Bug: 185951972
Change-Id: I343e02ae5cd6d076d525d0e4bfc09ecdfeda1d7b
Signed-off-by: wudean <dean.wu@vivo.com>
This commit is contained in:
wudean
2021-04-27 17:40:41 +08:00
committed by Suren Baghdasaryan
parent 0907114be2
commit 396a6adfd3
3 changed files with 9 additions and 0 deletions

View File

@@ -670,6 +670,11 @@ static unsigned long shrink_slab(gfp_t gfp_mask, int nid,
{
unsigned long ret, freed = 0;
struct shrinker *shrinker;
bool bypass = false;
trace_android_vh_shrink_slab_bypass(gfp_mask, nid, memcg, priority, &bypass);
if (bypass)
return 0;
/*
* The root memcg might be allocated even though memcg is disabled