Reduce OOM rate |
|||||||||||||
Issue descriptionFrom UMA stats, we see 2~4% of users experiencing OOM at once every day. OOM might causes chrome/system crash. We have to find a better memory policy to reduce the OOM occurrences. In addition, we have to add more test metrics to monitor the OOM from crosbolt as well.
,
May 4 2018
It is a very good tool for us to understand the problem. For example, one of the report - https://crash.corp.google.com/browse?q=&stbtiq=product:ChromeOS%20oom&reportid=9744b3c8c69b79b3&index=4#7 tells us * oom_score problem * oom_killer is not functioning as expected(34 processes killed, but still not help the situation) * respawning services should not be killed at all, this could easily causes machine crash(as init could not allocate memory). === <3>[17655.772053] Out of memory: Kill process 2673 (metrics_daemon) score 0 or sacrifice child <3>[17655.772088] Killed process 2673 (metrics_daemon) total-vm:27868kB, anon-rss:76kB, file-rss:1292kB <12>[17655.778552] init: metrics_daemon main process (2673) killed by KILL signal <12>[17655.779027] init: metrics_daemon main process ended, respawning <5>[17655.811298] audit: type=1400 audit(1525393475.330:137): avc: denied { dac_read_search } for pid=2474 comm="main" capability=2 scontext=u:r:zygote:s0 tcontext=u:r:zygote:s0 tclass=capability permissive=0 <4>[17655.812597] init invoked oom-killer: gfp_mask=0x2000d0, order=2, oom_score_adj=-1000 <6>[17655.812644] init cpuset=/ mems_allowed=0 <4>[17655.812661] CPU: 1 PID: 1 Comm: init Not tainted 3.18.0-16510-gb08afe9c5feb-dirty #1
,
May 4 2018
This one has more complete log since booting and has only 2GB RAM - https://crash.corp.google.com/browse?q=&stbtiq=product:ChromeOS%20oom&reportid=51ece3ca84ef7ca5&index=12#7
,
May 4 2018
re #2, in the crash report (CrOS 65.10323.67.0), there are a lot of anonymous memory when system oom (~800MB). The root cause may be: The chrome process used a lot of gpu memory (600MB+) and is not killable (oom_score_adj -1000), the oom killer could not find a process with oom_score >= 0 to kill. The following patch on CrOS 66.10435.0.0 would make it easier to track gpu memory usage: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/899385
,
May 7 2018
5 sample OOM crash reports: https://crash.corp.google.com/browse?q=ReportID%3Daaf50b736d58e1c0 https://crash.corp.google.com/browse?q=ReportID%3D7b1290fbbe06a807 https://crash.corp.google.com/browse?q=ReportID%3Dd55e9add11eea150 https://crash.corp.google.com/browse?q=ReportID%3D6268730156958b08 https://crash.corp.google.com/browse?q=ReportID%3Df6ee28cb89b7055a swap free = 0 in 4 samples, anon ~= 0 in 1 sample (the third report)
,
May 7 2018
,
May 7 2018
,
May 7 2018
,
May 8 2018
The report in #2 has a 1GB unkillable (-1000) chrome process, maybe the browser process? I agree that killing all chrome processes before rebooting seems like a good idea. (Not my proposal---this was proposed either by email or on another bug.)
,
May 10 2018
re #9, I created a separate bug https://crbug.com/840315 to handle the unkillable chrome process issue.
,
May 10 2018
In this bug report: https://listnr.corp.google.com/product/208/report/85419030956 oom killer invoked because there is almost no anon memory (anon: 3556KB) and cannot swap. The current low-mem-notify formula doesn't handle the case that anon is close to 0. This autotest: https://crrev.com/c/1015587 reproduce the issue that anon is close to 0 and oom-killer invoked. [29048.520593] chrome invoked oom-killer: gfp_mask=0x240c0d0, order=3, oom_score_adj=-1000 [29048.520885] Mem-Info: [29048.520892] active_anon:603 inactive_anon:286 isolated_anon:0 [29048.520892] active_file:44484 inactive_file:45365 isolated_file:0 [29048.520892] unevictable:7713 dirty:0 writeback:0 unstable:0 [29048.520892] slab_reclaimable:8906 slab_unreclaimable:20261 [29048.520892] mapped:66679 shmem:7919 pagetables:11491 bounce:0 [29048.520892] free:56590 free_pcp:491 free_cma:0 [29048.520905] DMA free:15904kB min:264kB low:328kB high:396kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15996kB managed:15904kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes [29048.520908] lowmem_reserve[]: 0 1866 7853 7853 [29048.520924] DMA32 free:73964kB min:32088kB low:40108kB high:48132kB active_anon:2412kB inactive_anon:1124kB active_file:40384kB inactive_file:42960kB unevictable:28588kB isolated(anon):0kB isolated(file):0kB present:1992244kB managed:1913432kB mlocked:28588kB dirty:0kB writeback:0kB mapped:66080kB shmem:29392kB slab_reclaimable:6472kB slab_unreclaimable:19492kB kernel_stack:6512kB pagetables:13616kB unstable:0kB bounce:0kB free_pcp:1008kB local_pcp:684kB free_cma:0kB writeback_tmp:0kB pages_scanned:29388 all_unreclaimable? yes [29048.520927] lowmem_reserve[]: 0 0 5986 5986 [29048.520942] Normal free:136492kB min:102812kB low:128512kB high:154216kB active_anon:0kB inactive_anon:20kB active_file:137552kB inactive_file:138500kB unevictable:2264kB isolated(anon):0kB isolated(file):0kB present:6275072kB managed:6130672kB mlocked:2264kB dirty:0kB writeback:0kB mapped:200636kB shmem:2284kB slab_reclaimable:29152kB slab_unreclaimable:61552kB kernel_stack:8768kB pagetables:32348kB unstable:0kB bounce:0kB free_pcp:956kB local_pcp:728kB free_cma:0kB writeback_tmp:0kB pages_scanned:236 all_unreclaimable? yes [29048.520945] lowmem_reserve[]: 0 0 0 0 [29048.520952] DMA: 0*4kB 0*8kB 0*16kB 1*32kB (U) 2*64kB (U) 1*128kB (U) 1*256kB (U) 0*512kB 1*1024kB (U) 1*2048kB (U) 3*4096kB (M) = 15904kB [29048.520981] DMA32: 9069*4kB (UME) 4181*8kB (UME) 265*16kB (ME) 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 73964kB [29048.521003] Normal: 28689*4kB (UME) 2715*8kB (UME) 1*16kB (U) 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 136492kB [29048.521025] 97906 total pagecache pages [29048.521029] 138 pages in swap cache [29048.521032] Swap cache stats: add 186064881, delete 186064743, find 711574/81132921 [29048.521034] Free swap = 507128kB [29048.521037] Total swap = 11806652kB [29048.521039] 2070828 pages RAM
,
May 10 2018
#11 I am not sure why anon near zero by itself would cause problems. Do you have a theory? Also, if anon is near zero, what's using up all the memory? The situation you reproduce with the autotest is known: if the memory content is not compressible, swap will take up a lot more RAM than expected, but the low-mem notifier (the non-caroline version) will NOT trigger because it thinks there is free swap. We can fix it by monitoring how much RAM is actually used by zram. We have not bothered to fix it because the histograms show that the compression ratio stays within safe limits in most cases. Are you suspecting that in this case compression ratio is bad? It would be useful to print it at OOM-kill time. At some point there was chromebook dedicated photo app which may have created this situation by trying to keep a lot of jpegs in memory.
,
May 11 2018
re #12, when anon is close to zero, the system cannot swap, if dropping cache is also limited by min_filelist_kbytes, system couldn't reclaim memory and oom killer invoked. The bug report in #11 is an example. Yes, I am suspecting compression ratio is bad in this case. From https://listnr.corp.google.com/product/208/report/85419030956 zram new stats names=orig_size compr_size used_total limit used_max zero_pages migrated zram new stats values=6434856960 2388333538 2610094080 0 7163727872 5412 9127417 The peak memory used by zram is 7163727872 = 6831 MB, the compress ratio at this moment < SWAP_TOTAL_SIZE / MAX_USED = 11529 MB / 6831 MB = 168% According to UMA Platform.ZramCompressionRatioPercent, there are 1.79% cases with compression ratio < 150%, although 1.79% is small, we should handle these cases to avoid oom killer invocation. I think it can be handled by replacing SwapFree with min(SwapFree, anon) in the low-mem-notify formula. https://uma.googleplex.com/p/chrome/histograms/?endDate=20180509&dayCount=1&histograms=Platform.ZramCompressionRatioPercent&fixupData=true&showMax=true&filters=platform%2Ceq%2CC%2Cchannel%2Ceq%2C4%2Cisofficial%2Ceq%2CTrue&implicitFilters=isofficial
,
May 11 2018
Do we have any way of finding out how many of those 1.79% samples are actually using a lot of swap? Because if you look at Platform.ZramCompressedSize, 99% of samples use less than 1GB for swap. So if the distribution is random, this would be a problem for less than 2 of 10,000 samples. In fact it is likely much less than that, because about 2/3 of our devices have 4GB RAM and 1/3 have 2GB (see Platform.MemInfoMemTotal). It doesn't hurt to try to be more precise though, but then we should also include RAM usage by swap. For instance you might want to signal low mem when we're short of free RAM AND (we're short of swap OR swap is taking too much RAM OR there's nothing left to swap). That's because you could still have a lot of anon left, but a bad compression ratio. If you have suggestions for better histograms, that might help too.
,
May 12 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/8c605420ea73877f7473bbe896bdd8fb54e166f7 commit 8c605420ea73877f7473bbe896bdd8fb54e166f7 Author: Kuo-Hsin Yang <vovoy@chromium.org> Date: Sat May 12 11:00:51 2018 Add Low Memory Test This test open several web pages until tab discarding or OOM killer is invoked. Test failed if OOM is triggered. This test triggers OOM killer on most boards with M68 CrOS. BUG=chromium:830587 TEST=manually run test Change-Id: I8a20ffd8f3460b926671dbb3010c1880938bda67 Reviewed-on: https://chromium-review.googlesource.com/1015587 Commit-Ready: Vovo Yang <vovoy@chromium.org> Tested-by: Vovo Yang <vovoy@chromium.org> Reviewed-by: Cheng-Yu Lee <cylee@google.com> [add] https://crrev.com/8c605420ea73877f7473bbe896bdd8fb54e166f7/client/site_tests/platform_LowMemoryTest/control [add] https://crrev.com/8c605420ea73877f7473bbe896bdd8fb54e166f7/client/site_tests/platform_LowMemoryTest/platform_LowMemoryTest.py [add] https://crrev.com/8c605420ea73877f7473bbe896bdd8fb54e166f7/client/site_tests/platform_LowMemoryTest/alloc.html
,
May 13 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/aa77780a7814646d555ae008131a97f54856ea27 commit aa77780a7814646d555ae008131a97f54856ea27 Author: Kuo-Hsin Yang <vovoy@chromium.org> Date: Sun May 13 21:09:18 2018 chromiumos-overlay: autotest-chrome: add low memory test BUG=chromium:830587 TEST=precq passes Change-Id: Id2a5107a89f6798b750fe6e31399d5fad5dfd493 Reviewed-on: https://chromium-review.googlesource.com/1053614 Commit-Ready: Vovo Yang <vovoy@chromium.org> Tested-by: Vovo Yang <vovoy@chromium.org> Reviewed-by: Cheng-Yu Lee <cylee@google.com> [modify] https://crrev.com/aa77780a7814646d555ae008131a97f54856ea27/chromeos-base/autotest-chrome/autotest-chrome-9999.ebuild
,
May 16 2018
#14, I checked 1000 recent kernel crash reports caused by out of memory. About 74% crashes are caused by free swap ~= 0. About 10% crashes are caused by anon ~= 0. 16% crashes are other cases. It suggest that tab discarding shall be triggered for the anon ~= 0 cases. For the 74% free swap ~= 0 cases, I still don't know how to reproduce it consistently. About the formula: Free ~= 0 AND (swap_free ~= 0 OR swap is taking too much RAM OR anon ~= 0). It could be simplified to short of free RAM AND (short of swap OR anon ~= 0). If swap is taking too much RAM, there is little RAM for anon and anon will be low. (anon: Active(anon) + Inactive(anon) in /proc/meminfo) PS: Browsing kernel crash reports caused by out of memory: https://crash.corp.google.com/browse?q=expanded_custom_data.ChromeCrashProto.magic_signature_1.name%3D%27oom%27+AND+product.name%3D%27ChromeOS%27
,
May 16 2018
The attachment is the detailed anon, swap_free status of 1055 crash reports.
,
May 16 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/44474fa4c6846d3ba3df7a3d915231615d92e72a commit 44474fa4c6846d3ba3df7a3d915231615d92e72a Author: Kuo-Hsin Yang <vovoy@chromium.org> Date: Wed May 16 19:41:42 2018 platform_LowMemoryTest: add to nightly suite BUG=chromium:830587 TEST=none Change-Id: Ifb48b0426e2b6a0fddc505135fc6737e303f3228 Reviewed-on: https://chromium-review.googlesource.com/1056773 Commit-Ready: Vovo Yang <vovoy@chromium.org> Tested-by: Vovo Yang <vovoy@chromium.org> Reviewed-by: Cheng-Yu Lee <cylee@google.com> [modify] https://crrev.com/44474fa4c6846d3ba3df7a3d915231615d92e72a/client/site_tests/platform_LowMemoryTest/control
,
May 18 2018
The scripts to generate oom_results.txt are available on https://user.git.corp.google.com/vovoy/utils/+/master/dev_utils/crash
,
Jun 28 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/cd63548f925cfa8349e68752f1bfa8af9f75e510 commit cd63548f925cfa8349e68752f1bfa8af9f75e510 Author: Kuo-Hsin Yang <vovoy@chromium.org> Date: Thu Jun 28 23:47:30 2018 CHROMIUM: low_mem: notify low memory when anonymous is low In recent kernel crash reports caused by out of memory and no killable process, about 10% oom-killer is invoked because anonymous memory is close to 0 and thus no memory to swap. The low memory notification formula should also consider the remaining anonymous memory. Swappable memory is equal to the smaller of swap free and remaining anonymous memory. BUG=chromium:830587 TEST=pass autotest platform_LowMemoryTest Signed-off-by: Kuo-Hsin Yang <vovoy@chromium.org> Change-Id: Ief98667f313922799ece1bd75f48c814d7e2815c Reviewed-on: https://chromium-review.googlesource.com/1118199 Commit-Ready: Vovo Yang <vovoy@chromium.org> Tested-by: Vovo Yang <vovoy@chromium.org> Reviewed-by: Luigi Semenzato <semenzato@chromium.org> [modify] https://crrev.com/cd63548f925cfa8349e68752f1bfa8af9f75e510/include/linux/low-mem-notify.h
,
Jun 29 2018
,
Jun 30 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/99f13e7cfede99619be19872d164085ae8772f79 commit 99f13e7cfede99619be19872d164085ae8772f79 Author: Kuo-Hsin Yang <vovoy@chromium.org> Date: Sat Jun 30 11:13:08 2018 platform_LowMemoryTest: export test result BUG=chromium:830587 TEST=manually run test Change-Id: Ibb946e4582c484287e59fe42e97af085aeb3eea8 Reviewed-on: https://chromium-review.googlesource.com/1119612 Commit-Ready: Vovo Yang <vovoy@chromium.org> Tested-by: Vovo Yang <vovoy@chromium.org> Reviewed-by: Chung-yih Wang <cywang@chromium.org> [modify] https://crrev.com/99f13e7cfede99619be19872d164085ae8772f79/client/site_tests/platform_LowMemoryTest/platform_LowMemoryTest.py
,
Jul 18
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/6d916036f18215bce90bb1280aa896c9884def6d commit 6d916036f18215bce90bb1280aa896c9884def6d Author: Kuo-Hsin Yang <vovoy@chromium.org> Date: Wed Jul 18 08:40:04 2018 CHROMIUM: low_mem: use enum node_stat_item directly to get memory status lru_base can be removed to simplify global_node_page_state() usage. BUG=chromium:830587 TEST=check that low memory notification was sent correctly Signed-off-by: Kuo-Hsin Yang <vovoy@chromium.org> Change-Id: Ib7e2abfbf6f0f7950082ca9205a4ec79f6d0d293 Reviewed-on: https://chromium-review.googlesource.com/1137963 Commit-Ready: Vovo Yang <vovoy@chromium.org> Tested-by: Vovo Yang <vovoy@chromium.org> Reviewed-by: Sonny Rao <sonnyrao@chromium.org> [modify] https://crrev.com/6d916036f18215bce90bb1280aa896c9884def6d/include/linux/low-mem-notify.h [modify] https://crrev.com/6d916036f18215bce90bb1280aa896c9884def6d/mm/low-mem-notify.c
,
Jul 24
,
Jul 24
,
Jul 25
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/1ff50a68dec06ff81cb6b853ebd89d24e8dc8b07 commit 1ff50a68dec06ff81cb6b853ebd89d24e8dc8b07 Author: Kuo-Hsin Yang <vovoy@chromium.org> Date: Wed Jul 25 07:14:25 2018 CHROMIUM: low_mem: use enum zone_stat_item directly to get memory status lru_base can be removed to simplify global_page_state() usage. BUG=chromium:830587 TEST=check that low memory notification was sent correctly Signed-off-by: Kuo-Hsin Yang <vovoy@chromium.org> Change-Id: Ib7e2abfbf6f0f7950082ca9205a4ec79f6d0d293 Reviewed-on: https://chromium-review.googlesource.com/1148038 Commit-Ready: Vovo Yang <vovoy@chromium.org> Tested-by: Vovo Yang <vovoy@chromium.org> Reviewed-by: Sonny Rao <sonnyrao@chromium.org> [modify] https://crrev.com/1ff50a68dec06ff81cb6b853ebd89d24e8dc8b07/include/linux/low-mem-notify.h [modify] https://crrev.com/1ff50a68dec06ff81cb6b853ebd89d24e8dc8b07/mm/low-mem-notify.c
,
Jul 25
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/28904e4813ce5bcb65bc6430a7de1ce2199bc64b commit 28904e4813ce5bcb65bc6430a7de1ce2199bc64b Author: Kuo-Hsin Yang <vovoy@chromium.org> Date: Wed Jul 25 07:14:43 2018 CHROMIUM: low_mem: use enum zone_stat_item directly to get memory status lru_base can be removed to simplify global_page_state() usage. BUG=chromium:830587 TEST=check that low memory notification was sent correctly Signed-off-by: Kuo-Hsin Yang <vovoy@chromium.org> Change-Id: Ib7e2abfbf6f0f7950082ca9205a4ec79f6d0d293 Reviewed-on: https://chromium-review.googlesource.com/1148036 Commit-Ready: Vovo Yang <vovoy@chromium.org> Tested-by: Vovo Yang <vovoy@chromium.org> Reviewed-by: Sonny Rao <sonnyrao@chromium.org> [modify] https://crrev.com/28904e4813ce5bcb65bc6430a7de1ce2199bc64b/include/linux/low-mem-notify.h [modify] https://crrev.com/28904e4813ce5bcb65bc6430a7de1ce2199bc64b/mm/low-mem-notify.c
,
Jul 25
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/806071db4dfbb67d22ca0808376ce0acb2b313ad commit 806071db4dfbb67d22ca0808376ce0acb2b313ad Author: Kuo-Hsin Yang <vovoy@chromium.org> Date: Wed Jul 25 07:14:38 2018 CHROMIUM: low_mem: use enum zone_stat_item directly to get memory status lru_base can be removed to simplify global_page_state() usage. BUG=chromium:830587 TEST=check that low memory notification was sent correctly Signed-off-by: Kuo-Hsin Yang <vovoy@chromium.org> Change-Id: Ib7e2abfbf6f0f7950082ca9205a4ec79f6d0d293 Reviewed-on: https://chromium-review.googlesource.com/1148039 Commit-Ready: Vovo Yang <vovoy@chromium.org> Tested-by: Vovo Yang <vovoy@chromium.org> Reviewed-by: Sonny Rao <sonnyrao@chromium.org> [modify] https://crrev.com/806071db4dfbb67d22ca0808376ce0acb2b313ad/include/linux/low-mem-notify.h [modify] https://crrev.com/806071db4dfbb67d22ca0808376ce0acb2b313ad/mm/low-mem-notify.c
,
Jul 25
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/17067c06842fde73cf338978c47761494be3bee9 commit 17067c06842fde73cf338978c47761494be3bee9 Author: Kuo-Hsin Yang <vovoy@chromium.org> Date: Wed Jul 25 07:14:35 2018 CHROMIUM: low_mem: use enum zone_stat_item directly to get memory status lru_base can be removed to simplify global_page_state() usage. BUG=chromium:830587 TEST=check that low memory notification was sent correctly Signed-off-by: Kuo-Hsin Yang <vovoy@chromium.org> Change-Id: Ib7e2abfbf6f0f7950082ca9205a4ec79f6d0d293 Reviewed-on: https://chromium-review.googlesource.com/1148034 Commit-Ready: Vovo Yang <vovoy@chromium.org> Tested-by: Vovo Yang <vovoy@chromium.org> Reviewed-by: Sonny Rao <sonnyrao@chromium.org> [modify] https://crrev.com/17067c06842fde73cf338978c47761494be3bee9/include/linux/low-mem-notify.h [modify] https://crrev.com/17067c06842fde73cf338978c47761494be3bee9/mm/low-mem-notify.c
,
Jul 25
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/d6ca5fbfab52dd5188762a5030c51c4021bc011e commit d6ca5fbfab52dd5188762a5030c51c4021bc011e Author: Kuo-Hsin Yang <vovoy@chromium.org> Date: Wed Jul 25 07:14:31 2018 CHROMIUM: low_mem: use enum zone_stat_item directly to get memory status lru_base can be removed to simplify global_page_state() usage. BUG=chromium:830587 TEST=check that low memory notification was sent correctly Signed-off-by: Kuo-Hsin Yang <vovoy@chromium.org> Change-Id: Ib7e2abfbf6f0f7950082ca9205a4ec79f6d0d293 Reviewed-on: https://chromium-review.googlesource.com/1148032 Commit-Ready: Vovo Yang <vovoy@chromium.org> Tested-by: Vovo Yang <vovoy@chromium.org> Reviewed-by: Sonny Rao <sonnyrao@chromium.org> [modify] https://crrev.com/d6ca5fbfab52dd5188762a5030c51c4021bc011e/include/linux/low-mem-notify.h [modify] https://crrev.com/d6ca5fbfab52dd5188762a5030c51c4021bc011e/mm/low-mem-notify.c
,
Jul 25
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/a49024095a0813289ea62f55419352db409a1a41 commit a49024095a0813289ea62f55419352db409a1a41 Author: Kuo-Hsin Yang <vovoy@chromium.org> Date: Wed Jul 25 23:35:20 2018 CHROMIUM: low_mem: notify low memory when anonymous is low In recent kernel crash reports caused by out of memory and no killable process, about 10% oom-killer is invoked because anonymous memory is close to 0 and thus no memory to swap. The low memory notification formula should also consider the remaining anonymous memory. Swappable memory is equal to the smaller of swap free and remaining anonymous memory. BUG=chromium:830587 TEST=pass autotest platform_LowMemoryTest Signed-off-by: Kuo-Hsin Yang <vovoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1118199 Commit-Ready: Vovo Yang <vovoy@chromium.org> Tested-by: Vovo Yang <vovoy@chromium.org> Reviewed-by: Luigi Semenzato <semenzato@chromium.org> (cherry picked from commit cd63548f925cfa8349e68752f1bfa8af9f75e510) Change-Id: Ief98667f313922799ece1bd75f48c814d7e2815c Reviewed-on: https://chromium-review.googlesource.com/1149944 [modify] https://crrev.com/a49024095a0813289ea62f55419352db409a1a41/include/linux/low-mem-notify.h
,
Jul 25
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/67edbd81eed71b81eeff0dbaf5f1081c067f56b1 commit 67edbd81eed71b81eeff0dbaf5f1081c067f56b1 Author: Kuo-Hsin Yang <vovoy@chromium.org> Date: Wed Jul 25 23:35:29 2018 CHROMIUM: low_mem: notify low memory when anonymous is low In recent kernel crash reports caused by out of memory and no killable process, about 10% oom-killer is invoked because anonymous memory is close to 0 and thus no memory to swap. The low memory notification formula should also consider the remaining anonymous memory. Swappable memory is equal to the smaller of swap free and remaining anonymous memory. BUG=chromium:830587 TEST=pass autotest platform_LowMemoryTest Signed-off-by: Kuo-Hsin Yang <vovoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1118199 Commit-Ready: Vovo Yang <vovoy@chromium.org> Tested-by: Vovo Yang <vovoy@chromium.org> Reviewed-by: Luigi Semenzato <semenzato@chromium.org> (cherry picked from commit cd63548f925cfa8349e68752f1bfa8af9f75e510) Change-Id: Ief98667f313922799ece1bd75f48c814d7e2815c Reviewed-on: https://chromium-review.googlesource.com/1119736 Reviewed-by: Vovo Yang <vovoy@chromium.org> [modify] https://crrev.com/67edbd81eed71b81eeff0dbaf5f1081c067f56b1/include/linux/low-mem-notify.h
,
Jul 25
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/d339c8651821a6e248d4b830efcd08b795793180 commit d339c8651821a6e248d4b830efcd08b795793180 Author: Kuo-Hsin Yang <vovoy@chromium.org> Date: Wed Jul 25 23:35:12 2018 CHROMIUM: low_mem: notify low memory when anonymous is low In recent kernel crash reports caused by out of memory and no killable process, about 10% oom-killer is invoked because anonymous memory is close to 0 and thus no memory to swap. The low memory notification formula should also consider the remaining anonymous memory. Swappable memory is equal to the smaller of swap free and remaining anonymous memory. BUG=chromium:830587 TEST=pass autotest platform_LowMemoryTest Signed-off-by: Kuo-Hsin Yang <vovoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1118199 Commit-Ready: Vovo Yang <vovoy@chromium.org> Tested-by: Vovo Yang <vovoy@chromium.org> Reviewed-by: Luigi Semenzato <semenzato@chromium.org> (cherry picked from commit cd63548f925cfa8349e68752f1bfa8af9f75e510) Change-Id: Ief98667f313922799ece1bd75f48c814d7e2815c Reviewed-on: https://chromium-review.googlesource.com/1149764 Reviewed-by: Vovo Yang <vovoy@chromium.org> [modify] https://crrev.com/d339c8651821a6e248d4b830efcd08b795793180/include/linux/low-mem-notify.h
,
Jul 26
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/e6786dd300024a00ae22d08647c0d0db7210c5a3 commit e6786dd300024a00ae22d08647c0d0db7210c5a3 Author: Kuo-Hsin Yang <vovoy@chromium.org> Date: Thu Jul 26 02:45:38 2018 CHROMIUM: low_mem: notify low memory when anonymous is low In recent kernel crash reports caused by out of memory and no killable process, about 10% oom-killer is invoked because anonymous memory is close to 0 and thus no memory to swap. The low memory notification formula should also consider the remaining anonymous memory. Swappable memory is equal to the smaller of swap free and remaining anonymous memory. BUG=chromium:830587 TEST=pass autotest platform_LowMemoryTest Signed-off-by: Kuo-Hsin Yang <vovoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1118199 Commit-Ready: Vovo Yang <vovoy@chromium.org> Tested-by: Vovo Yang <vovoy@chromium.org> Reviewed-by: Luigi Semenzato <semenzato@chromium.org> (cherry picked from commit cd63548f925cfa8349e68752f1bfa8af9f75e510) Change-Id: Ief98667f313922799ece1bd75f48c814d7e2815c Reviewed-on: https://chromium-review.googlesource.com/1149941 Reviewed-by: Vovo Yang <vovoy@chromium.org> [modify] https://crrev.com/e6786dd300024a00ae22d08647c0d0db7210c5a3/include/linux/low-mem-notify.h
,
Jul 26
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/0e80f8965ca828dbe16a85ca70dde26175c48ea2 commit 0e80f8965ca828dbe16a85ca70dde26175c48ea2 Author: Kuo-Hsin Yang <vovoy@chromium.org> Date: Thu Jul 26 02:45:36 2018 CHROMIUM: low_mem: notify low memory when anonymous is low In recent kernel crash reports caused by out of memory and no killable process, about 10% oom-killer is invoked because anonymous memory is close to 0 and thus no memory to swap. The low memory notification formula should also consider the remaining anonymous memory. Swappable memory is equal to the smaller of swap free and remaining anonymous memory. BUG=chromium:830587 TEST=pass autotest platform_LowMemoryTest Signed-off-by: Kuo-Hsin Yang <vovoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1118199 Commit-Ready: Vovo Yang <vovoy@chromium.org> Tested-by: Vovo Yang <vovoy@chromium.org> Reviewed-by: Luigi Semenzato <semenzato@chromium.org> (cherry picked from commit cd63548f925cfa8349e68752f1bfa8af9f75e510) Change-Id: Ief98667f313922799ece1bd75f48c814d7e2815c Reviewed-on: https://chromium-review.googlesource.com/1149943 Reviewed-by: Vovo Yang <vovoy@chromium.org> [modify] https://crrev.com/0e80f8965ca828dbe16a85ca70dde26175c48ea2/include/linux/low-mem-notify.h |
|||||||||||||
►
Sign in to add a comment |
|||||||||||||
Comment 1 by vovoy@chromium.org
, May 3 2018