/* From page_alloc.c, for urgent allocations in preemptible situation */ extern void show_free_areas_minimum(void); #ifdef CONFIG_ZRAM extern void mlog(int type); #endif #ifdef CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES #define CONVERT_ADJ(x) ((x * OOM_SCORE_ADJ_MAX) / -OOM_DISABLE) #define REVERT_ADJ(x) (x * (-OOM_DISABLE + 1) / OOM_SCORE_ADJ_MAX) #else #define CONVERT_ADJ(x) (x) #define REVERT_ADJ(x) (x) #endif // CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES static short lowmem_debug_adj = CONVERT_ADJ(1); #ifdef CONFIG_MT_ENG_BUILD static short lowmem_kernel_warn_adj = CONVERT_ADJ(0); #define output_expect(x) likely(x) static uint32_t enable_candidate_log = 1; #else #define output_expect(x) unlikely(x) static uint32_t enable_candidate_log = 0; #endif static DEFINE_SPINLOCK(lowmem_shrink_lock); static uint32_t lowmem_debug_level = 1; static short lowmem_adj[9] = { 0, 1, 6,
/* From page_alloc.c, for urgent allocations in preemptible situation */ extern void show_free_areas_minimum(void); #ifdef CONFIG_ZRAM extern void mlog(int type); #endif #ifdef CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES #define CONVERT_ADJ(x) ((x * OOM_SCORE_ADJ_MAX) / -OOM_DISABLE) #define REVERT_ADJ(x) (x * (-OOM_DISABLE + 1) / OOM_SCORE_ADJ_MAX) #else #define CONVERT_ADJ(x) (x) #define REVERT_ADJ(x) (x) #endif // CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES static short lowmem_debug_adj = CONVERT_ADJ(1); #ifdef CONFIG_MT_ENG_BUILD static short lowmem_kernel_warn_adj = CONVERT_ADJ(0); #define output_expect(x) likely(x) static uint32_t enable_candidate_log = 1; #else #define output_expect(x) unlikely(x) static uint32_t enable_candidate_log = 0; #endif static DEFINE_SPINLOCK(lowmem_shrink_lock); static uint32_t lowmem_debug_level = 1; #ifdef CONFIG_MTK_LCA_RAM_OPTIMIZE static short lowmem_adj[9] = { CONVERT_ADJ(0), CONVERT_ADJ(1),