New issue
Advanced search Search tips

Issue 862847 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 13
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

platform_CompressedSwap test fails on Chrome OS 4.14 kernel

Project Member Reported by sonnyrao@chromium.org, Jul 12

Issue description

This was originally reported by a partner

It seems that CrOS low mem notifications are broken on 4.14
I ran platform_CompressedSwap on a Samus running 4.14 and it consistently fails

17:51:23 INFO | Writing results to /usr/local/autotest/results/default
17:51:23 INFO | START   ----    ----    timestamp=1531356683    localtime=Jul 11 17:51:23
17:51:23 INFO | File /var/lib/cleanup_logs_paused was already present
17:51:23 INFO |         START   platform_CompressedSwap platform_CompressedSwap timestamp=1531356683    localtime=Jul 11 17:51:23  
17:51:23 INFO | Starting before_hook for platform_CompressedSwap
17:51:23 INFO | before_hook completed
17:51:23 INFO | ChromeOS BOARD = samus_2.7GHz_2GB
17:51:23 INFO | Swap enable (nonexistent), requested 2987683, total 2917656
17:53:21 INFO | Finished creating 58 hogs, SwapFree 0, MemFree 121824, low mem at 0, oom at 0
17:53:26 INFO | SwapFree was 0 before cleanup, 2442236 after.
17:53:26 WARNI| The test failed with the following exception
Traceback (most recent call last):
  File "/usr/local/autotest/common_lib/test.py", line 631, in _exec
    _call_test_function(self.execute, *p_args, **p_dargs)
  File "/usr/local/autotest/common_lib/test.py", line 831, in _call_test_function
    return func(*args, **dargs)
  File "/usr/local/autotest/common_lib/test.py", line 495, in execute
    dargs)
  File "/usr/local/autotest/common_lib/test.py", line 362, in _call_run_once_with_retry
    postprocess_profiled_run, args, dargs)
  File "/usr/local/autotest/common_lib/test.py", line 400, in _call_run_once
    self.run_once(*args, **dargs)
  File "/usr/local/autotest/tests/platform_CompressedSwap/platform_CompressedSwap.py", line 162, in run_once
    raise error.TestFail('We did not get low memory notification!')
TestFail: We did not get low memory notification!
17:53:26 INFO | Starting after_hook for platform_CompressedSwap

The system is running with only 2GB of memory and the margin was set to 101 
I tried raising it to 200 and 400 and the test was still failing

I had originally thought the notifications were working because platform_MemoryPressure was reporting discards but it may have actually been hitting OOMs.
 
Owner: sonnyrao@chromium.org
Status: Assigned (was: Untriaged)
Cc: diand...@chromium.org
So far it looks like the values being reported by "available" are incorrect.  They don't seem to drop nearly enough as platform_CompressedSwap is chewing up memory
Cc: groeck@chromium.org
found the problem -- will upload CL tomorrow
Project Member

Comment 6 by bugdroid1@chromium.org, Jul 13

Labels: merge-merged-chromeos-4.14
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/48791e9aea0e836c4862a4c0ba632aca867f988f

commit 48791e9aea0e836c4862a4c0ba632aca867f988f
Author: Sonny Rao <sonnyrao@chromium.org>
Date: Fri Jul 13 15:14:31 2018

CHROMIUM: mm: low-mem-notify: fix LRU counter usage for 4.14

Between 4.4 and 4.14 LRU management shifted from a zone-centric
approach to a node-centric approach with
commit 599d0c954f91d0 ("mm, vmscan: move LRU lists to node")

and later the global_page_state array was later re-named to be
global_zone_page_state with
commit c41f012ade0b95 ("mm: rename global_page_state to global_zone_page_state")

So, we should be using the node based counters for our calculations of
file and anonymous memory, but not for free memory which is not LRU
and is still stored in the global_zone_page_state.

BUG= chromium:862847 
BUG=b:111248290
TEST=platform_CompressedSwap and platform_MemoryPressure pass on samus
 running 4.14

Change-Id: I0dfcd306e8dcc6249481e869bb22889cf744ca07
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1135717
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/48791e9aea0e836c4862a4c0ba632aca867f988f/include/linux/low-mem-notify.h

Status: Fixed (was: Assigned)

Sign in to add a comment