Lines Matching refs:mi
1715 static bool meminfo_parse_line(char *line, union meminfo *mi) { in meminfo_parse_line() argument
1736 mi->arr[field_idx] = val / page_k; in meminfo_parse_line()
1741 static int meminfo_parse(union meminfo *mi) { in meminfo_parse() argument
1750 memset(mi, 0, sizeof(union meminfo)); in meminfo_parse()
1758 if (!meminfo_parse_line(line, mi)) { in meminfo_parse()
1763 mi->field.nr_file_pages = mi->field.cached + mi->field.swap_cached + in meminfo_parse()
1764 mi->field.buffers; in meminfo_parse()
1858 int kill_reason, union meminfo *mi, in killinfo_log() argument
1870 android_log_write_int32(ctx, (int32_t)min(mi->arr[field_idx] * page_k, INT32_MAX)); in killinfo_log()
2045 const char *kill_desc, union meminfo *mi, struct wakeup_info *wi, in kill_one_process() argument
2102 killinfo_log(procp, min_oom_score, tasksize, kill_reason, mi, wi, tm); in kill_one_process()
2132 union meminfo *mi, struct wakeup_info *wi, struct timespec *tm) { in find_and_kill_process() argument
2148 mi, wi, tm); in find_and_kill_process()
2189 void record_low_pressure_levels(union meminfo *mi) { in record_low_pressure_levels() argument
2191 low_pressure_mem.min_nr_free_pages > mi->field.nr_free_pages) { in record_low_pressure_levels()
2194 low_pressure_mem.min_nr_free_pages, mi->field.nr_free_pages); in record_low_pressure_levels()
2196 low_pressure_mem.min_nr_free_pages = mi->field.nr_free_pages; in record_low_pressure_levels()
2205 (low_pressure_mem.max_nr_free_pages < mi->field.nr_free_pages && in record_low_pressure_levels()
2206 mi->field.nr_free_pages - low_pressure_mem.max_nr_free_pages < in record_low_pressure_levels()
2210 low_pressure_mem.max_nr_free_pages, mi->field.nr_free_pages); in record_low_pressure_levels()
2212 low_pressure_mem.max_nr_free_pages = mi->field.nr_free_pages; in record_low_pressure_levels()
2242 static enum zone_watermark get_lowest_watermark(union meminfo *mi, in get_lowest_watermark() argument
2245 int64_t nr_free_pages = mi->field.nr_free_pages - mi->field.cma_free; in get_lowest_watermark()
2278 static int calc_swap_utilization(union meminfo *mi) { in calc_swap_utilization() argument
2279 int64_t swap_used = mi->field.total_swap - mi->field.free_swap; in calc_swap_utilization()
2280 int64_t total_swappable = mi->field.active_anon + mi->field.inactive_anon + in calc_swap_utilization()
2281 mi->field.shmem + swap_used; in calc_swap_utilization()
2314 union meminfo mi; in mp_event_psi() local
2354 if (meminfo_parse(&mi) < 0) { in mp_event_psi()
2371 swap_low_threshold = mi.field.total_swap * swap_free_low_percentage / 100; in mp_event_psi()
2373 swap_is_low = mi.field.free_swap < swap_low_threshold; in mp_event_psi()
2419 wmark = get_lowest_watermark(&mi, &watermarks); in mp_event_psi()
2446 mi.field.free_swap * page_k, swap_low_threshold * page_k, thrashing); in mp_event_psi()
2456 mi.field.free_swap * page_k, swap_low_threshold * page_k); in mp_event_psi()
2462 (swap_util = calc_swap_utilization(&mi)) > swap_util_max) { in mp_event_psi()
2491 int pages_freed = find_and_kill_process(min_score_adj, kill_reason, kill_desc, &mi, in mp_event_psi()
2537 union meminfo mi; in mp_event_common() local
2621 if (meminfo_parse(&mi) < 0 || zoneinfo_parse(&zi) < 0) { in mp_event_common()
2629 other_free = mi.field.nr_free_pages - zi.totalreserve_pages; in mp_event_common()
2630 … if (mi.field.nr_file_pages > (mi.field.shmem + mi.field.unevictable + mi.field.swap_cached)) { in mp_event_common()
2631 other_file = (mi.field.nr_file_pages - mi.field.shmem - in mp_event_common()
2632 mi.field.unevictable - mi.field.swap_cached); in mp_event_common()
2660 record_low_pressure_levels(&mi); in mp_event_common()
2690 if (mi.field.free_swap >= in mp_event_common()
2691 mi.field.total_swap * swap_free_low_percentage / 100) { in mp_event_common()
2711 if (find_and_kill_process(level_oomadj[level], -1, NULL, &mi, &wi, &curr_tm) == 0) { in mp_event_common()
2723 if (mi.field.nr_free_pages >= low_pressure_mem.max_nr_free_pages) { in mp_event_common()
2727 mi.field.nr_free_pages, low_pressure_mem.max_nr_free_pages); in mp_event_common()
2734 pages_freed = find_and_kill_process(min_score_adj, -1, NULL, &mi, &wi, &curr_tm); in mp_event_common()
2749 other_file * page_k, mi.field.nr_free_pages * page_k, in mp_event_common()