即使有足够的可用内存,也会调用oom

时间:2019-05-27 06:52:22

标签: linux linux-kernel out-of-memory

我使用Android P-OS。内核版本是msm-4.14

自启动以来,

oom被调用并杀死进程。但是,内存丰富。 我的内存大小为8GB,交换为1GB。 我什至没有使用交换。

[   59.901334] Killing 'ndroid.keychain' (2011), adj 906,\x0a   to free 87268kB on behalf of 'Binder:883_2' (938)\x0a   Free CMA is 246200kB\x0a   Total reserve is 242332kB\x0a   Total free pages is 5100764kB\x0a   Total file cache is 978224kB
[   59.903948] Killing 'Jit thread pool' (2016), adj 906,\x0a   to free 88676kB on behalf of 'ActivityManager' (960)\x0a   Free CMA is 246200kB\x0a   Total reserve is 242332kB\x0a   Total free pages is 5100764kB\x0a   Total file cache is 978224kB
[   60.007328] oom_reaper: reaped process 2011 (ndroid.keychain), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB

$美元免费

        total        used        free      shared     buffers
Mem:       7842377728  3144630272  4697747456     2084864    14852096
-/+ buffers/cache:     3129778176  4712599552
Swap:      1073737728           0  1073737728

$ meminfo

MemTotal:        7658572 kB
MemFree:         4589120 kB
MemAvailable:    5800580 kB
Buffers:           14416 kB
Cached:          1415944 kB
SwapCached:            0 kB
Active:           630232 kB
Inactive:        1299508 kB
Active(anon):     501820 kB
Inactive(anon):     1876 kB
Active(file):     128412 kB
Inactive(file):  1297632 kB
Unevictable:        2888 kB
Mlocked:            2888 kB
SwapTotal:       1048572 kB
SwapFree:        1048572 kB
Dirty:                92 kB
Writeback:             0 kB
AnonPages:        502148 kB
Mapped:           745728 kB
Shmem:              2036 kB
Slab:             520776 kB
SReclaimable:     130688 kB
SUnreclaim:       390088 kB
KernelStack:       28336 kB
PageTables:        40972 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     4877856 kB
Committed_AS:   95986336 kB
VmallocTotal:   263061440 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
CmaTotal:         303104 kB
CmaFree:          246200 kB

我不了解这种情况。 为什么会这样?有办法避免吗?

1 个答案:

答案 0 :(得分:0)

回答自己

它不是内存不足。 只是oom_reaper通过sigkill信号工作。 内存足够

谢谢