lmkd: check pgrefill vmstat when deciding active reclaim am: 4d8791b1f1 am: 3d9c7f86fa am: d194d9188f am: 17c4843c31
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2662996 Change-Id: I64155b8e4e4647973f86e1ae0f909b211587a99c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
844fa71bc7
9
lmkd.cpp
9
lmkd.cpp
|
|
@ -467,6 +467,7 @@ enum vmstat_field {
|
||||||
VS_PGSCAN_KSWAPD,
|
VS_PGSCAN_KSWAPD,
|
||||||
VS_PGSCAN_DIRECT,
|
VS_PGSCAN_DIRECT,
|
||||||
VS_PGSCAN_DIRECT_THROTTLE,
|
VS_PGSCAN_DIRECT_THROTTLE,
|
||||||
|
VS_PGREFILL,
|
||||||
VS_FIELD_COUNT
|
VS_FIELD_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -479,6 +480,7 @@ static const char* const vmstat_field_names[VS_FIELD_COUNT] = {
|
||||||
"pgscan_kswapd",
|
"pgscan_kswapd",
|
||||||
"pgscan_direct",
|
"pgscan_direct",
|
||||||
"pgscan_direct_throttle",
|
"pgscan_direct_throttle",
|
||||||
|
"pgrefill",
|
||||||
};
|
};
|
||||||
|
|
||||||
union vmstat {
|
union vmstat {
|
||||||
|
|
@ -491,6 +493,7 @@ union vmstat {
|
||||||
int64_t pgscan_kswapd;
|
int64_t pgscan_kswapd;
|
||||||
int64_t pgscan_direct;
|
int64_t pgscan_direct;
|
||||||
int64_t pgscan_direct_throttle;
|
int64_t pgscan_direct_throttle;
|
||||||
|
int64_t pgrefill;
|
||||||
} field;
|
} field;
|
||||||
int64_t arr[VS_FIELD_COUNT];
|
int64_t arr[VS_FIELD_COUNT];
|
||||||
};
|
};
|
||||||
|
|
@ -2586,6 +2589,7 @@ static void mp_event_psi(int data, uint32_t events, struct polling_params *poll_
|
||||||
static int64_t base_file_lru;
|
static int64_t base_file_lru;
|
||||||
static int64_t init_pgscan_kswapd;
|
static int64_t init_pgscan_kswapd;
|
||||||
static int64_t init_pgscan_direct;
|
static int64_t init_pgscan_direct;
|
||||||
|
static int64_t init_pgrefill;
|
||||||
static bool killing;
|
static bool killing;
|
||||||
static int thrashing_limit = thrashing_limit_pct;
|
static int thrashing_limit = thrashing_limit_pct;
|
||||||
static struct zone_watermarks watermarks;
|
static struct zone_watermarks watermarks;
|
||||||
|
|
@ -2671,9 +2675,14 @@ static void mp_event_psi(int data, uint32_t events, struct polling_params *poll_
|
||||||
if (vs.field.pgscan_direct != init_pgscan_direct) {
|
if (vs.field.pgscan_direct != init_pgscan_direct) {
|
||||||
init_pgscan_direct = vs.field.pgscan_direct;
|
init_pgscan_direct = vs.field.pgscan_direct;
|
||||||
init_pgscan_kswapd = vs.field.pgscan_kswapd;
|
init_pgscan_kswapd = vs.field.pgscan_kswapd;
|
||||||
|
init_pgrefill = vs.field.pgrefill;
|
||||||
reclaim = DIRECT_RECLAIM;
|
reclaim = DIRECT_RECLAIM;
|
||||||
} else if (vs.field.pgscan_kswapd != init_pgscan_kswapd) {
|
} else if (vs.field.pgscan_kswapd != init_pgscan_kswapd) {
|
||||||
init_pgscan_kswapd = vs.field.pgscan_kswapd;
|
init_pgscan_kswapd = vs.field.pgscan_kswapd;
|
||||||
|
init_pgrefill = vs.field.pgrefill;
|
||||||
|
reclaim = KSWAPD_RECLAIM;
|
||||||
|
} else if (vs.field.pgrefill != init_pgrefill) {
|
||||||
|
init_pgrefill = vs.field.pgrefill;
|
||||||
reclaim = KSWAPD_RECLAIM;
|
reclaim = KSWAPD_RECLAIM;
|
||||||
} else if (workingset_refault_file == prev_workingset_refault) {
|
} else if (workingset_refault_file == prev_workingset_refault) {
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue