ANDROID: vendor_hooks: tune reclaim swappiness or scan type
Add hooks for reclaim Bug: 185438290 Change-Id: Ib9eec302b1df4da7e98c77b94541af28c34a8613 Signed-off-by: xiaofeng <xiaofeng5@xiaomi.com>
This commit is contained in:

committed by
Hridya Valsaraju

parent
edb1a85895
commit
35dafe72dd
@@ -63,6 +63,9 @@
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/vmscan.h>
|
||||
|
||||
#undef CREATE_TRACE_POINTS
|
||||
#include <trace/hooks/vmscan.h>
|
||||
|
||||
struct scan_control {
|
||||
/* How many pages shrink_list() should reclaim */
|
||||
unsigned long nr_to_reclaim;
|
||||
@@ -2267,6 +2270,7 @@ static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc,
|
||||
goto out;
|
||||
}
|
||||
|
||||
trace_android_vh_tune_swappiness(&swappiness);
|
||||
/*
|
||||
* Global reclaim will swap to prevent OOM even with no
|
||||
* swappiness, but memcg users want to use this knob to
|
||||
@@ -2337,6 +2341,7 @@ static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc,
|
||||
fraction[1] = fp;
|
||||
denominator = ap + fp;
|
||||
out:
|
||||
trace_android_vh_tune_scan_type((char *)(&scan_balance));
|
||||
for_each_evictable_lru(lru) {
|
||||
int file = is_file_lru(lru);
|
||||
unsigned long lruvec_size;
|
||||
|
Reference in New Issue
Block a user