Suren Baghdasaryan
eb09287574
lmkd: Allow lmkd to kill perceptible apps during heavy thrashing am: 0142b3c166 am: 7ccd2c10ee
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1653491
Change-Id: I3bd353b448a3a6f886805704d64ffd23bc8f46a4
2021-03-31 20:32:29 +00:00
Suren Baghdasaryan
7ccd2c10ee
lmkd: Allow lmkd to kill perceptible apps during heavy thrashing am: 0142b3c166
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1653491
Change-Id: I1e014a9ccf2b1d6db1407c01feb3bc9794243c05
2021-03-31 19:56:50 +00:00
Suren Baghdasaryan
0142b3c166
lmkd: Allow lmkd to kill perceptible apps during heavy thrashing
...
Occasionally a system can get into heavy file cache thrashing situation
and become unresponsive. In these situations we observe lmkd wakeups,
however it does not kill because all non-perceptible apps are already
killed and the system manages to reclaim enough memory to stay above
min watermark.
Add ro.lmk.thrashing_limit_critical property which when breached will
allow lmkd to kill perceptible apps. The property represents the
percentage of refaulted workingset pages as a fraction of overall file
cache size. By default it is disabled.
Bug: 181778155
Test: thrashing.py 500 10 200
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Icb38ef6c90adaa4f5c956593b6ea0c4febc91dc0
2021-03-25 17:00:09 -07:00
Josh Gao
46b431749e
Switch to Bionic's pidfd wrappers. am: 84623bef7b am: 7e7793b48d
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1646355
Change-Id: Ib9c7982acf005a17d113bd36d96635884d531bde
2021-03-19 18:58:24 +00:00
Josh Gao
7e7793b48d
Switch to Bionic's pidfd wrappers. am: 84623bef7b
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1646355
Change-Id: I14598a17121770a9175b3ac1e6f46c31b21751de
2021-03-19 18:38:42 +00:00
Josh Gao
84623bef7b
Switch to Bionic's pidfd wrappers.
...
Bug: http://b/172518739
Test: treehugger
Change-Id: Ib6cac8f31ec64343c6eec6b82dac52888890c688
2021-03-18 17:16:08 -07:00
Suren Baghdasaryan
e1bfcc3cac
lmkd: choose the heaviest task when killing perceptible processes am: 858e8c6373 am: c71ce3fed4
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1619563
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I95dc9527835a28e38feb689ba872ee1101eb5a1a
2021-03-05 19:10:12 +00:00
Suren Baghdasaryan
4847bb51f5
lmkd: fix log message reporting the breached watermark am: 236781873f am: e452c6be98
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1619562
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I32a69fc6bcb77d5adfc426455e945c9bb047f9d5
2021-03-05 19:10:06 +00:00
Suren Baghdasaryan
c71ce3fed4
lmkd: choose the heaviest task when killing perceptible processes am: 858e8c6373
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1619563
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ib919f6de91c1634dd7c6cff70a23d17ac52b91e7
2021-03-05 18:27:14 +00:00
Suren Baghdasaryan
e452c6be98
lmkd: fix log message reporting the breached watermark am: 236781873f
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1619562
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I9e7f62d919466d83d5c3bf085f0b70b6c690cec5
2021-03-05 18:27:10 +00:00
Suren Baghdasaryan
858e8c6373
lmkd: choose the heaviest task when killing perceptible processes
...
When killing a task at or lower than oom_score_adj PERCEPTIBLE_APP_ADJ
choose the heaviest task among the ones at that level to try minimizing
the number of required kills. Because killing a perceptible app will
affect user experience anyway, it makes sense to choose the one that
will release the most memory and therefore no more kills might be
necessary.
Bug: 181778155
Test: running thrashing.py script
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I775ff774430b6fde4d619ede794825dbae59fd8e
2021-03-05 17:45:30 +00:00
Suren Baghdasaryan
236781873f
lmkd: fix log message reporting the breached watermark
...
Wrong condition causes reporting low watermark breach when min watermark
is breached and visa versa. Fix the condition to make reporting correct.
Bug: 181778155
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I684141c38f961fce99d17cfb3a83706fcd84ea10
2021-03-05 17:45:10 +00:00
Ioannis Ilkos
76b91a1a15
Reorder swap field in killinfo am: 282437fbbe am: b26c239bd9
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1619719
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ic4923c5e286c873dcfcba276440f6aeb1e819b9a
2021-03-05 05:42:29 +00:00
Ioannis Ilkos
b26c239bd9
Reorder swap field in killinfo am: 282437fbbe
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1619719
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I0fc10cfb4dfcee922cb43a11660538b974b9e2b9
2021-03-05 04:53:55 +00:00
Ioannis Ilkos
282437fbbe
Reorder swap field in killinfo
...
Some tools might parse killinfo entries based on the field order. Move
the newly added swap field to the end to ensure compatibility.
Test: build
Change-Id: Id6dad850beba6835f061da95e84190d00a1b26a0
2021-03-04 17:50:05 +00:00
Ioannis Ilkos
f69765b15a
Log killed process swap size am: 4884890305 am: bd6991af02
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1595271
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Iedf9e57c6cfb1f55665b7e648e9ba5e691017374
2021-02-26 20:29:28 +00:00
Ioannis Ilkos
bd6991af02
Log killed process swap size am: 4884890305
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1595271
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I57719767560f040d95508b86719ab4ee92cde599
2021-02-26 19:11:07 +00:00
Chris Morin
8ae13ca324
Replace mentions of "oom_adj" with "oom_score_adj" am: 74b4df95b4 am: 2c432eaf62
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1607288
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I0f3dc88df88e2166c6e801ab66b7c1b1c095718b
2021-02-26 18:16:15 +00:00
Chris Morin
2c432eaf62
Replace mentions of "oom_adj" with "oom_score_adj" am: 74b4df95b4
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1607288
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I25d37095e413f5e62f327f0275ae888ac7a1be41
2021-02-26 17:15:37 +00:00
Ioannis Ilkos
4884890305
Log killed process swap size
...
We already log the rss size for the process. Given lmkd strategies also consider low swap, it will be beneficial to record the swap size too.
Test: build, manual test
Change-Id: I923f733f7a3aa77fc5968827693b0fc085819174
2021-02-26 17:05:35 +00:00
Chris Morin
74b4df95b4
Replace mentions of "oom_adj" with "oom_score_adj"
...
Some log messages mention "oom_adj" instead of "oom_score_adj" when
referring to oom_score_adj. This is confusing because "oom_adj" is a
separate value which was supplanted by oom_score_adj, but can still be
used.
Test: trigger memory pressure and view logs
Change-Id: I23825083cecfff6bd32bfb39c6dac1f2b17a72a7
2021-02-26 00:07:16 -08:00
Xin Li
93f513941c
[automerger skipped] Mark ab/7061308 as merged in stage. am: b88ab3d63f -s ours
...
am skip reason: Change-Id Iaf7197de5b8b1632357d239aedc58589dfa01ca8 with SHA-1 019502f8ff is in history
Original change: undetermined
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I6d3d72caea3176493f55efa85c643e0e12b796ad
2021-02-20 09:30:00 +00:00
Xin Li
b88ab3d63f
Mark ab/7061308 as merged in stage.
...
Bug: 180401296
Merged-In: Iaf7197de5b8b1632357d239aedc58589dfa01ca8
Change-Id: Ief78eca564efa0a41297a15c21f7e8e14fe57bdf
2021-02-20 00:24:41 -08:00
Bob Badour
bcdf5072a2
[LSC] Add LOCAL_LICENSE_KINDS to system/memory/lmkd am: 0bc044bc32 am: 04cea7c607
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1589007
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Iebc769459ca7acd508c9d84f7af4895abbc6905c
2021-02-16 18:48:28 +00:00
Bob Badour
04cea7c607
[LSC] Add LOCAL_LICENSE_KINDS to system/memory/lmkd am: 0bc044bc32
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1589007
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I1e0fd1880b7b45a980877b88ac26c53763b8e340
2021-02-16 18:18:47 +00:00
Bob Badour
0bc044bc32
[LSC] Add LOCAL_LICENSE_KINDS to system/memory/lmkd
...
Added SPDX-license-identifier-Apache-2.0 to:
Android.bp
libpsi/Android.bp
tests/Android.bp
Bug: 68860345
Bug: 151177513
Bug: 151953481
Test: m all
Exempt-From-Owner-Approval: janitorial work
Change-Id: I5fed190764c763388c50c2fea58c5c421579bd30
2021-02-12 18:10:32 -08:00
Suren Baghdasaryan
2db83f29b7
lmkd_test: remove memcg creation on non-AndroidGo devices am: d7146e0f54 am: 475a02ffac
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1556790
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: If82deacac7b7ef0a4569042c12e4c72f681085f0
2021-01-22 19:30:48 +00:00
Suren Baghdasaryan
475a02ffac
lmkd_test: remove memcg creation on non-AndroidGo devices am: d7146e0f54
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1556790
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ifb5b2ab44681912dd7f70679f3c350f6b27b0be4
2021-01-22 19:10:26 +00:00
Suren Baghdasaryan
d7146e0f54
lmkd_test: remove memcg creation on non-AndroidGo devices
...
Memory cgroups are disabled on non-AndroidGo devices. Change the test
not to fail due to missing in-kernel memory cgroup support.
Bug: 172296409
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I35d724c23c22e97458976c1cad45fe9d993326f9
2021-01-21 22:37:03 +00:00
Ioannis Ilkos
3236ba21dd
Change lmkd defaults for statsd events am: dab3944256 am: ae7021b38f
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1555318
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ia289cf09f63d9d2cc1830b46664d74fb9809c90c
2021-01-21 01:17:32 +00:00
Ioannis Ilkos
ae7021b38f
Change lmkd defaults for statsd events am: dab3944256
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1555318
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I07d9136c5bb3467f6538b8d91a952d0a32db4fcf
2021-01-21 00:58:30 +00:00
Ioannis Ilkos
dab3944256
Change lmkd defaults for statsd events
...
LMK events are an important platform memory monitoring signal. Enable
them by default.
Changes:
- Compile lmkd with statsd by default
- Signal lmkd by default
Test: build, statsd cts
Bug: 177985094
Change-Id: I070660767db6e3bc8926ff82b64b99c7ee9a0108
2021-01-20 20:08:19 +00:00
Treehugger Robot
019502f8ff
Merge "lmkd: Add clang format symlink" am: 9fc38629dc am: b7315ea3b6
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1510010
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Iaf7197de5b8b1632357d239aedc58589dfa01ca8
2020-12-30 20:18:48 +00:00
Treehugger Robot
b7315ea3b6
Merge "lmkd: Add clang format symlink" am: 9fc38629dc
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1510010
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: If0aabdfd37af4d3d128d592a0dbbcf275ed98663
2020-12-30 19:52:48 +00:00
Treehugger Robot
9fc38629dc
Merge "lmkd: Add clang format symlink"
2020-12-30 19:38:28 +00:00
Suren Baghdasaryan
e82fa8c9a0
lmkd: Handle workingset_refault vmstat field change in 5.9 kernel am: dc60f9717b am: fcebcf44c3
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1528739
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ifa11e51578b8ce4a96c18680360f51e3b902a0f3
2020-12-15 02:00:59 +00:00
Suren Baghdasaryan
d689fdd8d4
lmkd: Remove unused workingset_refault parsing from zoneinfo am: 9f8d3dec72 am: a723c343d2
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1528738
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ic88201a020a6eda7fe905fd4ac1f3df0e89d6b15
2020-12-15 02:00:58 +00:00
Suren Baghdasaryan
fcebcf44c3
lmkd: Handle workingset_refault vmstat field change in 5.9 kernel am: dc60f9717b
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1528739
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ic3a3a5292dcacca866c9a1ef973e644cc00f4aba
2020-12-15 01:50:59 +00:00
Suren Baghdasaryan
a723c343d2
lmkd: Remove unused workingset_refault parsing from zoneinfo am: 9f8d3dec72
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1528738
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I57e18b751209779cf5f17ab784b54f2a7741129a
2020-12-15 01:50:58 +00:00
Suren Baghdasaryan
dc60f9717b
lmkd: Handle workingset_refault vmstat field change in 5.9 kernel
...
Linux kernel 5.9 change some vmstat fields including workingset_refault
which affects lmkd operation. Update vmstat parsing to handle both
old (workingset_refault) and new (workingset_refault_file) names for
that field.
Bug: 175617952
Test: lmkd_unit_test
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I8f9b3d027ca96154f07e7252902a5aa04cf05a9f
2020-12-14 13:38:48 -08:00
Suren Baghdasaryan
9f8d3dec72
lmkd: Remove unused workingset_refault parsing from zoneinfo
...
workingset_refault field in zoneinfo is currently being parsed but
is not used. Instead the same field in vmstat is being used to
capture the number of file-backed workingset refaults. Remove the
unused field parsing code.
Bug: 175617952
Test: lmkd_unit_test
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I79641a833c252cf50ac08c0c7d17c8294236d82d
2020-12-14 13:10:59 -08:00
Kalesh Singh
5015275acf
lmkd: Add clang format symlink
...
Bug: 174144799
Test: clang-format -i <file>
Change-Id: I56afa2b58891fbc1786669afa7d442343dbc6f19
2020-11-24 13:09:01 -05:00
Xin Li
51ce688cf3
Mark ab/6881855 as merged am: 07acc19c82
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/memory/lmkd/+/13113095
Change-Id: I87d9d415c57bf723e40190c9e168fbdeeeb67ca7
2020-11-24 00:25:53 +00:00
Xin Li
07acc19c82
Mark ab/6881855 as merged
...
Bug: 172690556
Change-Id: I3f3d51c5ec32369ba0c31113822118d4bffe4147
2020-11-23 11:33:00 -08:00
Xin Li
7d88c39e7e
[automerger skipped] Skip ab/6749736 in stage. am: e6ad9cc974 -s ours am: 5f53b6182a -s ours
...
am skip reason: Change-Id I21557b59bcb67736b552b7f5fa3b37045851a4dd with SHA-1 5ac19eb471 is in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/memory/lmkd/+/12797482
Change-Id: Ic0a4ce9ec9aacc805f9dafe2f3f5f8a58d04ec90
2020-10-09 04:17:56 +00:00
Xin Li
5f53b6182a
[automerger skipped] Skip ab/6749736 in stage. am: e6ad9cc974 -s ours
...
am skip reason: Change-Id I21557b59bcb67736b552b7f5fa3b37045851a4dd with SHA-1 5ac19eb471 is in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/memory/lmkd/+/12797482
Change-Id: I48f4da311c68103df2f205d1127bb3470001e461
2020-10-09 03:39:58 +00:00
Xin Li
e6ad9cc974
Skip ab/6749736 in stage.
...
Merged-In: I21557b59bcb67736b552b7f5fa3b37045851a4dd
Change-Id: I4ba2e0df4785cafd998a73ac73520c5ac06cc700
2020-10-08 17:24:04 -07:00
Sudarshan Rajagopalan
b94cc1c4d3
libpsi: Export library to vendor am: c467601098 am: 54c3db5d70 am: 449b0f229f am: c9703e8e18
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1437955
Change-Id: I82b31efaf6b8347019fc934d154493a132cdec0d
2020-09-29 02:22:19 +00:00
Sudarshan Rajagopalan
c9703e8e18
libpsi: Export library to vendor am: c467601098 am: 54c3db5d70 am: 449b0f229f
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1437955
Change-Id: I63af4bea59653360e6db2014f7d48b4478e03b48
2020-09-29 01:56:06 +00:00
Sudarshan Rajagopalan
449b0f229f
libpsi: Export library to vendor am: c467601098 am: 54c3db5d70
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1437955
Change-Id: I59b45e92823d544f77c7dc207b0c836d2d56280d
2020-09-29 01:39:26 +00:00