Printing kernel log when entering low memory condition with rate limit |
||||||||
Issue descriptionIn feedback report https://listnr.corp.google.com/product/208/report/85579932507, tab discarding is after oom-killer invocation. The "entering low_mem" message is not in the kernel log, it's hard to check the duration between kernel detected low memory and chrome got low memory notification. 2018-08-01 18:25:46.273 4 kernel : [ 2711.073306] chrome invoked oom-killer: gfp_mask=0x200da, order=0, oom_score_adj=300 [18:26:13.549] Memory: tab_manager_delegate_chromeos.cc:573 Target memory to free: -481280 KB "entering low_mem" is printed when anonymous memory is below it's previous lowest value. I propose to remove the lowest anonymous memory condition and print "entering low_mem" with rate limit (e.g. at most once per second). Reference: see _is_low_mem_situation() in https://cs.corp.google.com/chromeos_public/src/third_party/kernel/v4.4/include/linux/low-mem-notify.h
,
Aug 15
is this something memd would tell us?
,
Aug 16
memd would tell us when it got the low mem notification, but there could be some latency. E.g. when system is busy, execution of memd could be delayed. Log the timing of low memory detected in kernel should be more precise.
,
Aug 16
yeah but it would be good info to have in memd also -- we could do something like add an ftrace event and have memd look for that. It currently does this for OOM -- though it's using a fixed function name and not a trace event.
,
Aug 16
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/5abdfb289299003a7ae0f8f2f466a1b5fd08980d commit 5abdfb289299003a7ae0f8f2f466a1b5fd08980d Author: Kuo-Hsin Yang <vovoy@chromium.org> Date: Thu Aug 16 20:14:56 2018 CHROMIUM: low_mem: log low memory notification with rate limit Logging low memory notification for debugging the latency between kernel detected low memory and user got low memory notification. Remove the lowest anonymous memory condition and limit the logging to once per second. BUG= chromium:874000 TEST=check kernel log in low memory situation Change-Id: I9ee8ad670242f2f25d04c2c3f4c00bdcf0e1e777 Signed-off-by: Kuo-Hsin Yang <vovoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1175594 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/5abdfb289299003a7ae0f8f2f466a1b5fd08980d/include/linux/low-mem-notify.h [modify] https://crrev.com/5abdfb289299003a7ae0f8f2f466a1b5fd08980d/mm/low-mem-notify.c
,
Aug 21
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/f0187b60720982f2874f8a28fdbd9023d4cdb3e0 commit f0187b60720982f2874f8a28fdbd9023d4cdb3e0 Author: Kuo-Hsin Yang <vovoy@chromium.org> Date: Tue Aug 21 17:33:47 2018 CHROMIUM: low_mem: log low memory notification with rate limit Logging low memory notification for debugging the latency between kernel detected low memory and user got low memory notification. Remove the lowest anonymous memory condition and limit the logging to once per second. BUG= chromium:874000 TEST=check kernel log in low memory situation Change-Id: I9ee8ad670242f2f25d04c2c3f4c00bdcf0e1e777 Signed-off-by: Kuo-Hsin Yang <vovoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1175594 Commit-Ready: Vovo Yang <vovoy@chromium.org> Tested-by: Vovo Yang <vovoy@chromium.org> Reviewed-by: Sonny Rao <sonnyrao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1183007 Reviewed-by: Vovo Yang <vovoy@chromium.org> [modify] https://crrev.com/f0187b60720982f2874f8a28fdbd9023d4cdb3e0/include/linux/low-mem-notify.h [modify] https://crrev.com/f0187b60720982f2874f8a28fdbd9023d4cdb3e0/mm/low-mem-notify.c
,
Aug 21
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/5cf35f34d291ced2e52b9878bbbdcd9f648348f3 commit 5cf35f34d291ced2e52b9878bbbdcd9f648348f3 Author: Kuo-Hsin Yang <vovoy@chromium.org> Date: Tue Aug 21 17:33:54 2018 CHROMIUM: low_mem: log low memory notification with rate limit Logging low memory notification for debugging the latency between kernel detected low memory and user got low memory notification. Remove the lowest anonymous memory condition and limit the logging to once per second. BUG= chromium:874000 TEST=check kernel log in low memory situation Change-Id: I9ee8ad670242f2f25d04c2c3f4c00bdcf0e1e777 Signed-off-by: Kuo-Hsin Yang <vovoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1175594 Commit-Ready: Vovo Yang <vovoy@chromium.org> Tested-by: Vovo Yang <vovoy@chromium.org> Reviewed-by: Sonny Rao <sonnyrao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1183017 Reviewed-by: Vovo Yang <vovoy@chromium.org> [modify] https://crrev.com/5cf35f34d291ced2e52b9878bbbdcd9f648348f3/include/linux/low-mem-notify.h [modify] https://crrev.com/5cf35f34d291ced2e52b9878bbbdcd9f648348f3/mm/low-mem-notify.c
,
Aug 21
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/53514320826d8e99a98ad8cfda3a5c9a797cb4be commit 53514320826d8e99a98ad8cfda3a5c9a797cb4be Author: Kuo-Hsin Yang <vovoy@chromium.org> Date: Tue Aug 21 17:34:03 2018 CHROMIUM: low_mem: log low memory notification with rate limit Logging low memory notification for debugging the latency between kernel detected low memory and user got low memory notification. Remove the lowest anonymous memory condition and limit the logging to once per second. BUG= chromium:874000 TEST=check kernel log in low memory situation Change-Id: I9ee8ad670242f2f25d04c2c3f4c00bdcf0e1e777 Signed-off-by: Kuo-Hsin Yang <vovoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1175594 Commit-Ready: Vovo Yang <vovoy@chromium.org> Tested-by: Vovo Yang <vovoy@chromium.org> Reviewed-by: Sonny Rao <sonnyrao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1183018 Reviewed-by: Vovo Yang <vovoy@chromium.org> [modify] https://crrev.com/53514320826d8e99a98ad8cfda3a5c9a797cb4be/include/linux/low-mem-notify.h [modify] https://crrev.com/53514320826d8e99a98ad8cfda3a5c9a797cb4be/mm/low-mem-notify.c
,
Aug 21
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/688d2a48613146a529b2c4b839f14dacbff41644 commit 688d2a48613146a529b2c4b839f14dacbff41644 Author: Kuo-Hsin Yang <vovoy@chromium.org> Date: Tue Aug 21 17:33:50 2018 CHROMIUM: low_mem: log low memory notification with rate limit Logging low memory notification for debugging the latency between kernel detected low memory and user got low memory notification. Remove the lowest anonymous memory condition and limit the logging to once per second. BUG= chromium:874000 TEST=check kernel log in low memory situation Change-Id: I9ee8ad670242f2f25d04c2c3f4c00bdcf0e1e777 Signed-off-by: Kuo-Hsin Yang <vovoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1175594 Commit-Ready: Vovo Yang <vovoy@chromium.org> Tested-by: Vovo Yang <vovoy@chromium.org> Reviewed-by: Sonny Rao <sonnyrao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1183014 Reviewed-by: Vovo Yang <vovoy@chromium.org> [modify] https://crrev.com/688d2a48613146a529b2c4b839f14dacbff41644/include/linux/low-mem-notify.h [modify] https://crrev.com/688d2a48613146a529b2c4b839f14dacbff41644/mm/low-mem-notify.c
,
Aug 21
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/5e8db3fa02a590405a4fee7f70e092766b449a3f commit 5e8db3fa02a590405a4fee7f70e092766b449a3f Author: Kuo-Hsin Yang <vovoy@chromium.org> Date: Tue Aug 21 17:33:52 2018 CHROMIUM: low_mem: log low memory notification with rate limit Logging low memory notification for debugging the latency between kernel detected low memory and user got low memory notification. Remove the lowest anonymous memory condition and limit the logging to once per second. BUG= chromium:874000 TEST=check kernel log in low memory situation Change-Id: I9ee8ad670242f2f25d04c2c3f4c00bdcf0e1e777 Signed-off-by: Kuo-Hsin Yang <vovoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1175594 Commit-Ready: Vovo Yang <vovoy@chromium.org> Tested-by: Vovo Yang <vovoy@chromium.org> Reviewed-by: Sonny Rao <sonnyrao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1183020 Reviewed-by: Vovo Yang <vovoy@chromium.org> [modify] https://crrev.com/5e8db3fa02a590405a4fee7f70e092766b449a3f/include/linux/low-mem-notify.h [modify] https://crrev.com/5e8db3fa02a590405a4fee7f70e092766b449a3f/mm/low-mem-notify.c
,
Oct 9
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by vovoy@chromium.org
, Aug 15