Suren Baghdasaryan
3fc2bcd6ad
[automerger skipped] lmkd: Allow lmkd to kill perceptible apps during heavy thrashing am: e68bfe9a73 -s ours am: 0107f3c655 -s ours
...
am skip reason: skip tag Change-Id Icb38ef6c90adaa4f5c956593b6ea0c4febc91dc0 with SHA-1 0142b3c166 is already in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/memory/lmkd/+/14108657
Change-Id: I166723399de996ccfcd2eececd6ad8bc7ae557e7
2021-04-08 06:20:01 +00:00
Suren Baghdasaryan
09a988ee63
[automerger skipped] lmkd: choose the heaviest task when killing perceptible processes am: 720abce177 -s ours am: c5bc8cb7fa -s ours
...
am skip reason: skip tag Change-Id I775ff774430b6fde4d619ede794825dbae59fd8e with SHA-1 858e8c6373 is already in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/memory/lmkd/+/14108656
Change-Id: Ib28ff7ce4e4b7f20b2fb6758b9d50320d6d9afad
2021-04-08 06:20:01 +00:00
Suren Baghdasaryan
0107f3c655
[automerger skipped] lmkd: Allow lmkd to kill perceptible apps during heavy thrashing am: e68bfe9a73 -s ours
...
am skip reason: skip tag Change-Id Icb38ef6c90adaa4f5c956593b6ea0c4febc91dc0 with SHA-1 0142b3c166 is already in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/memory/lmkd/+/14108657
Change-Id: Ic33eb574acd23965cb6f7742ccc2093b3e0033b3
2021-04-08 05:52:00 +00:00
Suren Baghdasaryan
c5bc8cb7fa
[automerger skipped] lmkd: choose the heaviest task when killing perceptible processes am: 720abce177 -s ours
...
am skip reason: skip tag Change-Id I775ff774430b6fde4d619ede794825dbae59fd8e with SHA-1 858e8c6373 is already in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/memory/lmkd/+/14108656
Change-Id: I38ceae15c85ab3e02f4bb3e25d88729ed779406e
2021-04-08 05:51:59 +00:00
Suren Baghdasaryan
e68bfe9a73
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>
Merged-In: Icb38ef6c90adaa4f5c956593b6ea0c4febc91dc0
Change-Id: Icb38ef6c90adaa4f5c956593b6ea0c4febc91dc0
2021-04-07 11:55:04 +08:00
Suren Baghdasaryan
720abce177
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>
Merged-In: I775ff774430b6fde4d619ede794825dbae59fd8e
Change-Id: I775ff774430b6fde4d619ede794825dbae59fd8e
2021-04-07 11:50:57 +08:00
Suren Baghdasaryan
dda9c07f98
lmkd: Allow lmkd to kill perceptible apps during heavy thrashing am: 0142b3c166 am: 7ccd2c10ee am: eb09287574 am: dff35b7973
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1653491
Change-Id: I9bc8321ba0d306bac0a78693355501aaf80c44ef
2021-03-31 21:54:35 +00:00
Suren Baghdasaryan
87da516822
lmkd: Allow lmkd to kill perceptible apps during heavy thrashing am: 0142b3c166 am: 7ccd2c10ee am: eb09287574 am: dff35b7973
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1653491
Change-Id: I6d1a1ca31455c8da156b6527016ec484f709bfe3
2021-03-31 21:53:14 +00:00
Suren Baghdasaryan
dff35b7973
lmkd: Allow lmkd to kill perceptible apps during heavy thrashing am: 0142b3c166 am: 7ccd2c10ee am: eb09287574
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1653491
Change-Id: I993499fa1c3b3fc8e0ff278ea31df8ff9c606af7
2021-03-31 21:18:13 +00:00
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
27e61cbf4a
Switch to Bionic's pidfd wrappers. am: 84623bef7b am: 7e7793b48d am: 46b431749e am: dfd2dff7cb
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1646355
Change-Id: Ic36605f82ee6e0df8ce227fdc4cf52eff0dcc2d0
2021-03-19 19:58:06 +00:00
Josh Gao
e3c33315f2
Switch to Bionic's pidfd wrappers. am: 84623bef7b am: 7e7793b48d am: 46b431749e am: dfd2dff7cb
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1646355
Change-Id: I150c51aa021f79b5597d5c472ca0561792312c4f
2021-03-19 19:57:58 +00:00
Josh Gao
dfd2dff7cb
Switch to Bionic's pidfd wrappers. am: 84623bef7b am: 7e7793b48d am: 46b431749e
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1646355
Change-Id: I7ea977c432125052ba7d845f3a59587806c355cb
2021-03-19 19:21:06 +00: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
488929daf0
lmkd: choose the heaviest task when killing perceptible processes am: 858e8c6373 am: c71ce3fed4 am: e1bfcc3cac am: 5498a6e98d
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1619563
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I7adf5dae9b119e09cf8a116aed804d26abf75565
2021-03-05 20:35:03 +00:00
Suren Baghdasaryan
f9d7b22e31
lmkd: fix log message reporting the breached watermark am: 236781873f am: e452c6be98 am: 4847bb51f5 am: 8d0351f6d5
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1619562
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I5170247334482f83a96062239535316ee01adfbc
2021-03-05 20:35:02 +00:00
Suren Baghdasaryan
094c37f632
lmkd: choose the heaviest task when killing perceptible processes am: 858e8c6373 am: c71ce3fed4 am: e1bfcc3cac am: 5498a6e98d
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1619563
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I492d727e5ec65e6424b239078000680250f59497
2021-03-05 20:34:46 +00:00
Suren Baghdasaryan
cf2926f976
lmkd: fix log message reporting the breached watermark am: 236781873f am: e452c6be98 am: 4847bb51f5 am: 8d0351f6d5
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1619562
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Iae33263d785c931a027d1d959ef50c7267af245b
2021-03-05 20:34:44 +00:00
Suren Baghdasaryan
5498a6e98d
lmkd: choose the heaviest task when killing perceptible processes am: 858e8c6373 am: c71ce3fed4 am: e1bfcc3cac
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1619563
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I537cdd9772fb16cc06a62c0865049dea06d5d70e
2021-03-05 20:01:44 +00:00
Suren Baghdasaryan
8d0351f6d5
lmkd: fix log message reporting the breached watermark am: 236781873f am: e452c6be98 am: 4847bb51f5
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1619562
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I45a8f6971ef73f2a53c1d5fd4fca6c0da52ba4b9
2021-03-05 20:01:43 +00: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
ed7e71b67b
Reorder swap field in killinfo am: 282437fbbe am: b26c239bd9 am: 76b91a1a15 am: 47878e1ebb
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1619719
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I5487ff58c0cb6e4ae655aa52f19f6520b4636c23
2021-03-05 07:04:14 +00:00
Ioannis Ilkos
95667efce8
Reorder swap field in killinfo am: 282437fbbe am: b26c239bd9 am: 76b91a1a15 am: 47878e1ebb
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1619719
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I525415e8d90d8e1f09a48ee51056b80d52defed7
2021-03-05 07:04:14 +00:00
Ioannis Ilkos
47878e1ebb
Reorder swap field in killinfo am: 282437fbbe am: b26c239bd9 am: 76b91a1a15
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1619719
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ia04ebf15d391b1b114e720606f04560775027039
2021-03-05 06:22:44 +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
c7fb95915f
Log killed process swap size am: 4884890305 am: bd6991af02 am: f69765b15a am: 2f24fff28a
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1595271
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ic78a67ef3e927dae8d711dc3caa031a6ca272434
2021-02-26 21:59:57 +00:00
Ioannis Ilkos
447a46349d
Log killed process swap size am: 4884890305 am: bd6991af02 am: f69765b15a am: 2f24fff28a
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1595271
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ia9908987837d7f3317a6ba767c6ca9c18528cf07
2021-02-26 21:59:32 +00:00
Ioannis Ilkos
2f24fff28a
Log killed process swap size am: 4884890305 am: bd6991af02 am: f69765b15a
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1595271
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I56ef58881a886fe25d550ed3944f3bfc46573f08
2021-02-26 21:18:44 +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
Chris Morin
5fa20f25de
Replace mentions of "oom_adj" with "oom_score_adj" am: 74b4df95b4 am: 2c432eaf62 am: 8ae13ca324 am: ca2012d0e8
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1607288
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I75fa5b82483a095a97b30651aef7f611f35d6045
2021-02-26 19:37:27 +00:00
Chris Morin
5d3d99cdf6
Replace mentions of "oom_adj" with "oom_score_adj" am: 74b4df95b4 am: 2c432eaf62 am: 8ae13ca324 am: ca2012d0e8
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1607288
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ia5ba330b31a1e2f484203ad4b2474e9f108ebfde
2021-02-26 19:35:59 +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
ca2012d0e8
Replace mentions of "oom_adj" with "oom_score_adj" am: 74b4df95b4 am: 2c432eaf62 am: 8ae13ca324
...
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1607288
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I553ab21c2e461666414cdd43fe94601e6d3336b2
2021-02-26 18:56:53 +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
2bbb44e3cd
[automerger skipped] Mark ab/7061308 as merged in stage. am: b88ab3d63f -s ours am: 93f513941c -s ours am: 4bad06df3e -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: I0871dec7097aff925697b2e93c2a708b18f472a6
2021-02-20 12:01:10 +00:00
Xin Li
e88ce23a6e
[automerger skipped] Mark ab/7061308 as merged in stage. am: b88ab3d63f -s ours am: 93f513941c -s ours am: 4bad06df3e -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: I6ddf84acd974db38b561ebf880b988445ba7b2a3
2021-02-20 11:57:34 +00:00