最終更新:2016-09-13 (火) 17:03:14 (1478d)  

lowmemorykiller
Top / lowmemorykiller

Linuxカーネル

.config

Linux 3.19

sysfs

  • Android/sys/module/lowmemorykiller
     * For example, write "0,8" to /sys/module/lowmemorykiller/parameters/adj and
     * "1024,4096" to /sys/module/lowmemorykiller/parameters/minfree to kill
     * processes with a oom_score_adj value of 8 or higher when the free memory
     * drops below 4096 pages and kill processes with a oom_score_adj value of 0 or
     * higher when the free memory drops below 1024 pages.

dmesg

  • lowmem_print(1, "Killing '%s' (%d), adj %hd,\n" \
    				"   to free %ldkB on behalf of '%s' (%d) because\n" \
    				"   cache %ldkB is below limit %ldkB for oom_score_adj %hd\n" \
    				"   Free memory is %ldkB above reserved\n",
    			     selected->comm, selected->pid,
    			     selected_oom_score_adj,
    			     selected_tasksize * (long)(PAGE_SIZE / 1024),
    			     current->comm, current->pid,
    			     cache_size, cache_limit,
    			     min_score_adj,
    			     free);
  • selected - task_struct

Android

AOSP

アクセス

  • Android/dev/memcg?