Commit Graph

416 Commits

Author SHA1 Message Date
Wei Wang 1e030a55af [automerger skipped] lmkd: bump process priority and set to FOREGROUND group before kill
am: 6f2198b33c -s ours
am skip reason: change_id Iae7aa35483eb0e8bbeccaa425559c6021c845ee1 with SHA1 2d95c10847 is in history

Change-Id: Ie6edfd5e201455c5b1e55a38ba88cdf72d9519fd
2019-01-23 08:38:30 -08:00
Wei Wang 6dd07fcb53 lmkd: bump process priority and set to FOREGROUND group before kill
This should help speed up reclaim memory.

Bug: 118468011
Bug: 121439388
Test: run mem-pressure with lmkd
Change-Id: Iae7aa35483eb0e8bbeccaa425559c6021c845ee1
Merged-In: Iae7aa35483eb0e8bbeccaa425559c6021c845ee1
2019-01-23 05:20:36 +00:00
Suren Baghdasaryan 4b7173d4a3 [automerger skipped] Merge changes from topic "move sched_policy functions" am: ca50ee91b5 am: e8b2ac49bb
am: 6738419e09 -s ours
am skip reason: change_id Icc052080e1bce46ce06f7264446950cab0490a95 with SHA1 634e884419 is in history

Change-Id: I80026ca51b85fa55a4051acdfca216da040a714d
2019-01-22 14:06:44 -08:00
Suren Baghdasaryan f3c0a84339 Merge changes from topic "move sched_policy functions" am: ca50ee91b5
am: e8b2ac49bb

Change-Id: I9ba62bc4cce474b2a12af5a1035714ac9dd39703
2019-01-22 13:41:10 -08:00
Suren Baghdasaryan 8d13df7d38 Merge changes from topic "move sched_policy functions"
am: ca50ee91b5

Change-Id: I92310f7dd60384b95c056c98cdc616857ebcd1ec
2019-01-22 13:03:07 -08:00
Suren Baghdasaryan fb99b0a5f9 Add dependencies on libprocessgroup for sched_policy users
After moving sched_policy functions into libprocessgroup its users require
additional dependency and inclusion of sched_policy_ctrl.h header.

Exempt-From-Owner-Approval: janitorial

Bug: 111307099
Test: builds, boots

Merged-In: Icc052080e1bce46ce06f7264446950cab0490a95
Change-Id: Icc052080e1bce46ce06f7264446950cab0490a95
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-22 18:19:45 +00:00
Suren Baghdasaryan 74b8abcda7 Add dependencies on libprocessgroup for sched_policy users
After moving sched_policy functions into libprocessgroup its users require
additional dependency and inclusion of sched_policy_ctrl.h header.

Exempt-From-Owner-Approval: janitorial

Bug: 111307099
Test: builds, boots

Change-Id: Icc052080e1bce46ce06f7264446950cab0490a95
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-17 18:24:10 -08:00
Wei Wang 042400c4fc Merge "lmkd: bump process priority and set to FOREGROUND group before kill" am: 3f4b005022 am: 528f4a7e6f
am: 33c4d54eb1

Change-Id: I81299b8f335f0f9e79be3514bc55ddd08a81587d
2019-01-15 19:21:40 -08:00
Wei Wang 3807aa6560 Merge "lmkd: bump process priority and set to FOREGROUND group before kill" am: 3f4b005022
am: 528f4a7e6f

Change-Id: I0d052a83f04e5188980910f29e83b872b7d522f4
2019-01-15 19:17:58 -08:00
Wei Wang 2b34702a8b Merge "lmkd: bump process priority and set to FOREGROUND group before kill"
am: 3f4b005022

Change-Id: Ib77699153224bcc95c0929bc59361702c50bce94
2019-01-15 19:13:21 -08:00
Wei Wang 8c55f2b664 Merge "lmkd: bump process priority and set to FOREGROUND group before kill" 2019-01-16 03:06:21 +00:00
Tom Cherry bab7866015 Merge "lmkd: add missing libcutils library to test" am: 173a02b439 am: 5928869e6f
am: 9a05fb3d64

Change-Id: I7c4b303ed67a551c9148781345e4fae1f676503d
2019-01-15 18:03:23 -08:00
Tom Cherry 281f6bb95e Merge "lmkd: add missing libcutils library to test" am: 173a02b439
am: 5928869e6f

Change-Id: Iba2f41f1c83b58df0ecff2fd6cf5d395bfa051b4
2019-01-15 17:23:58 -08:00
Tom Cherry ef9cbe71b2 Merge "lmkd: add missing libcutils library to test"
am: 173a02b439

Change-Id: Ib3dc6e124cfc129145e43ae806de73061652cb08
2019-01-15 17:03:49 -08:00
Wei Wang f1ee2e1505 lmkd: bump process priority and set to FOREGROUND group before kill
This should help speed up reclaim memory.

Bug: 118468011
Test: run mem-pressure with lmkd
Change-Id: Iae7aa35483eb0e8bbeccaa425559c6021c845ee1
2019-01-15 14:50:19 -08:00
Tom Cherry 4a28d2a270 lmkd: add missing libcutils library to test
lmkd's test depends on the socket_local_client() function from
libcutils, but since liblog also exposes this symbol weakly, that is
the symbol that gets used instead of the intended libcutil's copy of
the symbol.

Test: build
Change-Id: I294fa157a7f50881bf6360922419976eb1ee3ac7
2019-01-15 14:14:20 -08:00
Jim Blackler 395ab797d0 [automerger skipped] Merge "Add start time to LmkKillOccurred" am: 34f55bd45a am: 258b220b01 -s ours
am: ad67d6fa3c -s ours
am skip reason: change_id I4ef6433391c8758626334731d2b5de038e4468ae with SHA1 34c3cb84a0 is in history

Change-Id: Id5209507ed48b71f963a3a23ac8f709b3bab3da1
2019-01-09 05:34:17 -08:00
Jim Blackler 5ce271a2c5 [automerger skipped] Merge "Add start time to LmkKillOccurred" am: 34f55bd45a
am: 258b220b01 -s ours
am skip reason: SHA1 258b220b01 skipped by user jimblackler

Change-Id: Iddcb13c6aacfefdc505c7fdcb1cd525c0713bb71
2019-01-09 05:19:00 -08:00
Jim Blackler 350fecb560 Merge "Add start time to LmkKillOccurred"
am: 34f55bd45a

Change-Id: I912af2f3ac71fda3d949deb5189ff1834340f08f
2019-01-09 00:57:22 -08:00
Jim Blackler f52bcb9c8f Add start time to LmkKillOccurred
This is to measure an application's behavior with respect to being LMKed
(the longer an app lives before being LMKed, the better).

Bug: 119854389
Test: Manual
Change-Id: I4ef6433391c8758626334731d2b5de038e4468ae
Merged-In: I4ef6433391c8758626334731d2b5de038e4468ae
(cherry picked from I4ef6433391c8758626334731d2b5de038e4468ae)
2019-01-04 11:36:54 +00:00
Xin Li e86b771c4f [automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master am: 2f2f638fdf -s ours am: 0acfc87001 -s ours
am: fc7913888a  -s ours

Change-Id: I8bf9db3fd0da5be1c9e20ececf3f7ef5e1ea6ead
2018-12-13 14:00:47 -08:00
Xin Li 4500cc1cce [automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master am: 2f2f638fdf -s ours
am: 0acfc87001  -s ours

Change-Id: I71bc8d4951bfdbbac6647f875827b7e1c217106e
2018-12-13 12:21:31 -08:00
Xin Li d45d6e6326 [automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
am: 2f2f638fdf  -s ours

Change-Id: Ieb3bb5fae81eebeca7596ca4901c2dc77ec8733e
2018-12-13 11:26:27 -08:00
Xin Li b40b4f9d70 [automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master am: 337a781009 -s ours
am: dc96985efb  -s ours

Change-Id: I32890669ed6301901d64e7c53b75da5939afee26
2018-12-11 15:40:51 -08:00
Xin Li f560590b92 [automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master
am: 337a781009  -s ours

Change-Id: If04c76722e7856c41ff9932970ad73617d06e720
2018-12-11 15:09:39 -08:00
Xin Li 85e4ce5ac7 DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
Bug: 120502534
Change-Id: Id4f4f66ffb8104d953957f1c44dff6f549a387bb
2018-12-11 14:46:12 -08:00
Xin Li 6778a6c07b DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master
Bug: 120502534
Change-Id: I0ab5735530d24f669cc43c961cf2118427b32a7b
2018-12-11 20:23:55 +00:00
Bill Rassieur 6bb974bc2a Merge PQ1A.181205.006 from Pi-QPR1-Release into ToT for Pi-Platform release.\n\nBUG: 120448245
Change-Id: Ia66dd2a90e074d2fcb0dbaeb424031a41752dd03
2018-12-04 17:00:05 +00:00
Jim Blackler 8ff3b902d5 Add start time to LmkKillOccurred
This is to measure an application's behavior with respect to being LMKed
(the longer an app lives before being LMKed, the better).

Bug: 119854389
Test: Manual
Change-Id: I4ef6433391c8758626334731d2b5de038e4468ae
2018-11-28 09:26:38 +00:00
Suren Baghdasaryan 7f923eda33 Merge "lmkd: Cleanup unused code for killing processes in bulk" am: d04b38b0e5 am: 46d6d26c6c
am: 76cc42248e

Change-Id: Id1faa246044963fac4c5d1b7a016d8eebd830751
2018-10-29 13:51:31 -07:00
Suren Baghdasaryan 46b654d258 Merge "lmkd: retune rate at which processes are killed" am: d5eaeffcf3 am: 4d8a9caf30
am: ea13ea4669

Change-Id: I2a1cfb849d8600dcbb3a6b180f48078a710825b4
2018-10-29 13:50:39 -07:00
Suren Baghdasaryan a8944aa6c5 Merge "lmkd: Cleanup unused code for killing processes in bulk" am: d04b38b0e5
am: 46d6d26c6c

Change-Id: I7ce93b79b64d43eae08a4b316e4cbb655e3d4e06
2018-10-29 13:44:53 -07:00
Suren Baghdasaryan 7d850ecac4 Merge "lmkd: retune rate at which processes are killed" am: d5eaeffcf3
am: 4d8a9caf30

Change-Id: Iba588d2de887372874bacb1f0a6dc829c0c021c7
2018-10-29 13:44:01 -07:00
Suren Baghdasaryan 68fe0cbc93 Merge "lmkd: Cleanup unused code for killing processes in bulk"
am: d04b38b0e5

Change-Id: Icbbc888b5a2049a94e55e48eaa9510981c114ebf
2018-10-29 13:31:26 -07:00
Suren Baghdasaryan f12fdbe1d6 Merge "lmkd: retune rate at which processes are killed"
am: d5eaeffcf3

Change-Id: I5012c959668b9bf2f6ea055e6186be551bf5db20
2018-10-29 13:30:42 -07:00
Tim Murray aa6ada0d0d [automerger skipped] DO NOT MERGE: lmkd: retune rate at which processes are killed am: afb3a15f39 -s ours
am: 82fa720305  -s ours

Change-Id: I623f5065081adf1a257ebfc1f1f527302fa96ea4
2018-10-29 10:19:11 -07:00
Tim Murray e0b5a53c5b [automerger skipped] DO NOT MERGE: lmkd: retune rate at which processes are killed
am: afb3a15f39  -s ours

Change-Id: I6f11779b2b686ac61f4444e2dfba311ac6b4a6c9
2018-10-29 10:14:09 -07:00
Suren Baghdasaryan 85c31b57c4 lmkd: Cleanup unused code for killing processes in bulk
find_and_kill_processes() does not kill multiple processes at a time
anymore. Remove support for bulk process killing.

Change-Id: Id09132a9cebe44589a1a3ebcbff800a16fa56557
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-10-29 16:20:50 +00:00
Tim Murray a79ec0f5bf lmkd: retune rate at which processes are killed
Kill a single process at a time and try to wait up to 100ms for
that process to reclaim memory before triggering another kill.

Test: boots, works
bug: 116877958
Change-Id: I6775d0534b3e3728c04389d3eae1a00e3cbf9f27
2018-10-29 16:20:29 +00:00
Tim Murray 9752ee8b29 DO NOT MERGE: lmkd: retune rate at which processes are killed
Kill a single process at a time and try to wait up to 100ms for
that process to reclaim memory before triggering another kill.

Test: boots, works
bug: 116877958
Change-Id: I6775d0534b3e3728c04389d3eae1a00e3cbf9f27
(cherry picked from commit afb3a15f39e73978c071a58d3466993293c6d3b1)
2018-10-26 20:57:25 +00:00
Suren Baghdasaryan d4dbf08947 lmkd: rate-limit and cleanup failed kill reports
Excessive number of failed kill reports when lmkd can't find an eligible
process to kill or frees not enough memory pollutes logs and bugreports.
Cleanup kill reports to remove duplicate information and rate limit failed
kill attempts at 1 report per sec. The number of suppressed failed kills
will be reported in the next lmkd report.

Bug: 113864581
Test: Verified using lmkd_unit_test
Change-Id: I67fa1fec97613f136c7582115edcbc56b1503c9c
Merged-In: I67fa1fec97613f136c7582115edcbc56b1503c9c
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
(cherry picked from commit d6cbf3f41d7cb54e7dc62f4c29f7a7cba05aa28b)
2018-10-26 20:57:23 +00:00
Tim Murray 6a9c142f1b DO NOT MERGE: lmkd: retune rate at which processes are killed
Kill a single process at a time and try to wait up to 100ms for
that process to reclaim memory before triggering another kill.

Test: boots, works
bug: 116877958
Change-Id: I6775d0534b3e3728c04389d3eae1a00e3cbf9f27
2018-10-26 13:21:17 -07:00
Bill Yi 44149bfe34 [automerger skipped] Merge pie-platform-release to aosp-master - DO NOT MERGE am: d4e20cd0f9 -s ours am: 6f691264b0 -s ours
am: ea149f0dad  -s ours

Change-Id: I077c643d9361721b7e8352be028161bffc995c7f
2018-10-24 20:38:44 -07:00
Suren Baghdasaryan 58c52acb36 Merge "lmkd: Add command to get number of kills" am: a1c684be4f am: e518e0a1b8
am: 50312e155b

Change-Id: Id63ec92116193c7a485dc6243fad8ac9c5e6679d
2018-10-24 20:33:11 -07:00
Bill Yi 75fc74cc6a [automerger skipped] Merge pie-platform-release to aosp-master - DO NOT MERGE am: d4e20cd0f9 -s ours
am: 6f691264b0  -s ours

Change-Id: I0e2fd6cf802c4b132d0b5d4daa1c7bde3b1f323d
2018-10-24 19:54:21 -07:00
Suren Baghdasaryan 0a31d7860a Merge "lmkd: Add command to get number of kills" am: a1c684be4f
am: e518e0a1b8

Change-Id: Ibe242de81e5e7cf027763a67dafde70621a7e152
2018-10-24 19:52:18 -07:00
Bill Yi a6426eb63b [automerger skipped] Merge pie-platform-release to aosp-master - DO NOT MERGE
am: d4e20cd0f9  -s ours

Change-Id: Ie17a382505e1b8f6fb135a415f6fa8c9671354e4
2018-10-24 16:38:21 -07:00
Bill Yi 5b3b22bbc2 Merge pie-platform-release to aosp-master - DO NOT MERGE
Change-Id: I413bb086f5ff064430c061bdd5d0fe3d02925304
2018-10-24 14:48:45 -07:00
Suren Baghdasaryan 301581b8af Merge "lmkd: Add command to get number of kills"
am: a1c684be4f

Change-Id: I0e22129a27765cacb7840a3c60b95b20c9d0d42d
2018-10-24 14:45:11 -07:00
Suren Baghdasaryan a7394ea37f lmkd: Add command to get number of kills
Intrduce LMK_GETKILLCNT command for ActivityManager to get the number of
kills from lmkd.

Bug: 117126077
Test: used lmkd_unit_test to verify correct reporting
Change-Id: I09c720a7176b4df95efc544177cd2694f8d791be
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-10-24 17:18:32 +00:00