Suren Baghdasaryan
10be4c368e
lmkd: Set the default free swap threshold to 10% for all devices am: c2b228e498 am: b0027daa8a
...
Change-Id: I6e2a4793cf262628a6788d5c0ecae1b30919ec61
2020-05-20 19:16:03 +00:00
Suren Baghdasaryan
0b210fe185
lmkd: Fix min_score_adj to exclude killing foreground processes am: 0e589f61ba am: 3125ebc794
...
Change-Id: I2c718dfb23f06010ce56c7bb9f8fdc346523494e
2020-05-20 19:15:57 +00:00
Suren Baghdasaryan
b0027daa8a
lmkd: Set the default free swap threshold to 10% for all devices am: c2b228e498
...
Change-Id: I750cb3aa52c7341374ed692040d9ff88b5ae907c
2020-05-20 18:59:48 +00:00
Suren Baghdasaryan
3125ebc794
lmkd: Fix min_score_adj to exclude killing foreground processes am: 0e589f61ba
...
Change-Id: I1d8d38af4a50239721428bd2bff008cf1b00e198
2020-05-20 18:59:19 +00:00
Suren Baghdasaryan
15b83b66d1
lmkd: Enable stricter compiler checks am: 5096d16091 am: 2b90436606
...
Change-Id: If46294fade5d9c122e78e65d359aec784f3e052e
2020-05-20 00:54:07 +00:00
Suren Baghdasaryan
aabfa71492
lmkd: Remove unused variables and fix type mismatches am: dd7ec447ab am: 9cc5e9624f
...
Change-Id: I811f18d5574be6a09045d4e8d5d15b4d33166612
2020-05-20 00:54:05 +00:00
Suren Baghdasaryan
de6c2612e2
lmkd: enable ro.lmk.kill_timeout_ms to be used with kill notifications am: c7e51b7b2a am: c5969c34b2
...
Change-Id: I09b3b29ac5e3cbd37ed4c0d72c1061ae79fbc540
2020-05-20 00:54:03 +00:00
Suren Baghdasaryan
0425267bf2
lmkd: polling code cleanup am: 3f84a211e5 am: 8a6cf251b8
...
Change-Id: I1b7e6c55b8a188b7a40cb618bb0c1b7a1fef0e5b
2020-05-20 00:54:01 +00:00
Suren Baghdasaryan
2b90436606
lmkd: Enable stricter compiler checks am: 5096d16091
...
Change-Id: I36d6b5276ac8cc8012c584069fe546584a592fb8
2020-05-20 00:28:32 +00:00
Suren Baghdasaryan
9cc5e9624f
lmkd: Remove unused variables and fix type mismatches am: dd7ec447ab
...
Change-Id: I7703e61d915ba89190030e2f1e302b17b749369c
2020-05-20 00:28:30 +00:00
Suren Baghdasaryan
c5969c34b2
lmkd: enable ro.lmk.kill_timeout_ms to be used with kill notifications am: c7e51b7b2a
...
Change-Id: Ica5909a02fd969771df38b37b85dd9e768c8b430
2020-05-20 00:28:29 +00:00
Suren Baghdasaryan
8a6cf251b8
lmkd: polling code cleanup am: 3f84a211e5
...
Change-Id: I5265d3370371ea5b4c07dce31af732f6d4f29c71
2020-05-20 00:28:27 +00:00
Suren Baghdasaryan
c2b228e498
lmkd: Set the default free swap threshold to 10% for all devices
...
Lower the min swap threshold to 10% for all devices to limit kills while
swap still has enough space.
Bug: 155709603
Test: memory stress test with multiple foreground apps
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I443486763c034ed0603ea52b81c060c3969af9a5
2020-05-20 00:20:40 +00:00
Suren Baghdasaryan
0e589f61ba
lmkd: Fix min_score_adj to exclude killing foreground processes
...
In the cases when foreground processes should not be killed
min_score_adjust should be set above PERCEPTIBLE_APP_ADJ to prevent such
kills.
Bug: 155709603
Test: memory stress test with multiple foreground apps
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: If187654b8001ce843ec6085ccd2042d75a986dae
2020-05-20 00:20:14 +00:00
Suren Baghdasaryan
5096d16091
lmkd: Enable stricter compiler checks
...
Enable -Wall and -Wextra compiler flags to catch compilation warnings.
Bug: 147315292
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Merged-In: Ia802dbd7abb167d66b76390e269e4a4418ca5def
Change-Id: Ia802dbd7abb167d66b76390e269e4a4418ca5def
2020-05-19 15:53:36 -07:00
Suren Baghdasaryan
dd7ec447ab
lmkd: Remove unused variables and fix type mismatches
...
Fix compilation warnings by removing unused variables and add typecasting
whenever mixed type comparisons are performed.
Bug: 147315292
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Merged-In: I7f0839d803a6bf6532f077208ce54aba761dc9fe
Change-Id: I7f0839d803a6bf6532f077208ce54aba761dc9fe
2020-05-19 15:52:19 -07:00
Suren Baghdasaryan
c7e51b7b2a
lmkd: enable ro.lmk.kill_timeout_ms to be used with kill notifications
...
Allow lmkd to stop waiting for a kill notification if a kill takes longer
than ro.lmk.kill_timeout_ms.
Bug: 147315292
Test: lmkd_unit_test with ro.lmk.kill_timeout_ms set to 100
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Merged-In: Ia3eed3448fd6928a5e634c2737044722048b3578
Change-Id: Ia3eed3448fd6928a5e634c2737044722048b3578
2020-05-19 15:51:27 -07:00
Suren Baghdasaryan
3f84a211e5
lmkd: polling code cleanup
...
- Remove unused POLLING_STOP state
- Simplify POLLING_DO_NOT_CHANGE state handling
- Correct last_poll_tm assignment logic
Bug: 147315292
Test: lmkd_unit_test
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Merged-In: If0674eda954a25f0f6c9188501ff77db8ba0813b
Change-Id: If0674eda954a25f0f6c9188501ff77db8ba0813b
2020-05-19 15:50:18 -07:00
Suren Baghdasaryan
f8ea710bef
lmkd: Add property re-initialization support am: c4081918a7 am: a84a5e5801
...
Change-Id: Id3001f3ea024c9bf30ae919949c709f2776923e5
2020-05-08 22:40:41 +00:00
Suren Baghdasaryan
a84a5e5801
lmkd: Add property re-initialization support am: c4081918a7
...
Change-Id: I538cee8d0825d61ad5283e8a504e8cc74e5aa69a
2020-05-08 22:24:38 +00:00
Suren Baghdasaryan
c4081918a7
lmkd: Add property re-initialization support
...
Add --reinit command-line option to allow updating lmkd properties. For
example to enable debug logging in the running lmkd process user should
issue:
setprop ro.lmk.debug true
lmkd --reinit
Bug: 155149944
Test: lmkd_unit_test after resetting lmkd properties
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Merged-In: Ic60331f3368f5a7fdfe09ad7d47c7ccf0a497685
Change-Id: Ic60331f3368f5a7fdfe09ad7d47c7ccf0a497685
2020-05-07 09:46:42 -07:00
Muhammad Qureshi
0eefbff7b9
Link libstatssocket as a shared library. am: 87168c0e26 am: 2171a0c2f4 am: e18b6d0b90
...
Change-Id: I3c9c5d48f57fc57e34c059a4863856a90607ae03
2020-02-14 22:37:37 +00:00
Muhammad Qureshi
e18b6d0b90
Link libstatssocket as a shared library. am: 87168c0e26 am: 2171a0c2f4
...
Change-Id: Idb85f7875499f727744bd7b6cbe2f40ff7991efe
2020-02-14 22:19:30 +00:00
Muhammad Qureshi
2171a0c2f4
Link libstatssocket as a shared library. am: 87168c0e26
...
Change-Id: I02b53349508cfead1d6a43704b39ad648bf8e3f0
2020-02-14 22:00:51 +00:00
Muhammad Qureshi
87168c0e26
Link libstatssocket as a shared library.
...
As part of moving libstatssocket into statsd apex, libstatssocket will
only be available as a shared library.
Bug: 145923416
Test: m
Change-Id: Ia6b13dcd378011c201b2595d2b3f3fc14213011b
2020-02-12 16:42:53 -08:00
Automerger Merge Worker
5ce5183e22
[automerger skipped] DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp-without-vendor (6129114) into stage-aosp-master am: 45cb77c5bc am: 5759b94152 -s ours
...
am skip reason: subject contains skip directive
Change-Id: Id1f72e87196c7e6e20c65a3110f2719c8adf373a
2020-01-16 01:58:50 +00:00
Automerger Merge Worker
5759b94152
DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp-without-vendor (6129114) into stage-aosp-master am: 45cb77c5bc
...
Change-Id: Id74bdff1f30e8a1a6da7ddd6c2c989eb1e0f889e
2020-01-16 01:46:18 +00:00
Xin Li
45cb77c5bc
DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp-without-vendor (6129114) into stage-aosp-master
...
Bug: 146167222
Change-Id: I0adb962a42c190f863a301731f8cf53237821555
2020-01-15 15:59:17 -08:00
Automerger Merge Worker
80db5e76e1
Use generated code for logging events to statsd am: ed8fe8465a am: 0ecafff527 am: 08a1f55b5c
...
Change-Id: Ia4cfd02666dbd8269f4dcde0fec6309e00dd9069
2020-01-15 23:32:46 +00:00
Automerger Merge Worker
08a1f55b5c
Use generated code for logging events to statsd am: ed8fe8465a am: 0ecafff527
...
Change-Id: I3a438b1f43acd9e02031f1da3c66927ace16e607
2020-01-15 23:21:52 +00:00
Muhammad Qureshi
0ecafff527
Use generated code for logging events to statsd
...
am: ed8fe8465a
Change-Id: I7c80056a8453345552042728e3eea7c5ef5ccdca
2020-01-15 15:03:59 -08:00
Muhammad Qureshi
ed8fe8465a
Use generated code for logging events to statsd
...
Use the autogenerated libstatslog_lmkd to send events to statsd
The logging schema for statsd is changing as part of statsd becoming
a Mainline module in R. The autogenerated code will handle the schema
change.
Bug: 145887874
Test: m -j
Test: atest android.cts.statsd.atom.UidAtomTests#testLmkKillOccurred
Change-Id: Ibae4cd822807369a799d5c1f6a9c51272e38a074
2020-01-13 12:16:47 -08:00
Automerger Merge Worker
81ac3f6b11
lmkd: Restrict lmkd unsolicited notifications only to subscribed recipients am: 36baf44179 am: 9c7233e6c7 am: 1c18c3396b
...
Change-Id: I068d6335c7a0e09756cc343fb198261b0050472e
2019-12-23 23:26:38 +00:00
Automerger Merge Worker
1c18c3396b
lmkd: Restrict lmkd unsolicited notifications only to subscribed recipients am: 36baf44179 am: 9c7233e6c7
...
Change-Id: Ib77c400f901477dce48127fc87e3531c113db2d9
2019-12-23 23:15:52 +00:00
Suren Baghdasaryan
9c7233e6c7
lmkd: Restrict lmkd unsolicited notifications only to subscribed recipients
...
am: 36baf44179
Change-Id: Iccb0b07c089bcf345e2dd8b5b08f412f3a891b9a
2019-12-23 15:02:33 -08:00
Suren Baghdasaryan
36baf44179
lmkd: Restrict lmkd unsolicited notifications only to subscribed recipients
...
lmkd unsolicited notifications can cause lmkd to block if clients are not
consuming them. Fix that by sending notifications to only subscribed
clients. Introduce LMK_SUBSCRIBE command to allow lmkd clients to subscribe
to event notifications. The only asynchronous event currently supported is
LMK_ASYNC_EVENT_KILL.
Bug: 146597855
Test: fill up send buffer using lmkd_unit_test
Test: confirm lmkd does not block after the fix
Change-Id: I014159aa55b59081f4b9ed53ecd160a49c0682bb
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-12-23 12:35:29 -08:00
Automerger Merge Worker
a09aecfe6a
lmkd_test: align proc_name with lmkd am: f2ead0ca1a am: 3cfaed6e43 am: 6b9bcd6944
...
Change-Id: I9a6e9d497f281000578512d9ec9a0abdf8433e23
2019-12-21 04:36:15 +00:00
Automerger Merge Worker
6b9bcd6944
lmkd_test: align proc_name with lmkd am: f2ead0ca1a am: 3cfaed6e43
...
Change-Id: I78837e4a72b0086498a5b6824d2a7c4ad5b86e86
2019-12-21 04:22:51 +00:00
Martin Liu
3cfaed6e43
lmkd_test: align proc_name with lmkd
...
am: f2ead0ca1a
Change-Id: If6fa397d5b2a2292270cec666bf8b05dd1bac183
2019-12-20 20:04:21 -08:00
Martin Liu
f2ead0ca1a
lmkd_test: align proc_name with lmkd
...
This change is to align how we get proc_name
between lmkd and lmkd_unit_test or it will always
fail when we run command such as ./lmkd_unit_test
under the device shell.
Bug: 146415484
Test: Verified using lmkd_unit_test
Change-Id: I3a6ebf0747a1054c5758b91fbacf3179b66b56c3
2019-12-20 11:12:06 +08:00
Automerger Merge Worker
053c05d93d
Build lmkd as C++ am: 43f3d2b190 am: 9309a1b376 am: bd6dddceaf
...
Change-Id: I5adc4aa6051b636e5e166ad162193c2d18a5b616
2019-12-16 17:47:17 +00:00
Automerger Merge Worker
bd6dddceaf
Build lmkd as C++ am: 43f3d2b190 am: 9309a1b376
...
Change-Id: I44b4400d1d499a773e1ec0d716e417a189085724
2019-12-16 17:35:43 +00:00
Tom Cherry
9309a1b376
Build lmkd as C++
...
am: 43f3d2b190
Change-Id: I372c6b437070c09952dc4c84863db324d4aad912
2019-12-16 09:21:23 -08:00
Tom Cherry
43f3d2b190
Build lmkd as C++
...
Bug: 145669697
Test: build
Change-Id: I4fb2a9a900c8a6915ee84cc3d82434596301b24b
2019-12-13 08:40:30 -08:00
Automerger Merge Worker
908ad06a0f
lmkd: Support to send unsolicited message to clients am: 5c48096d8d am: 3123c4746c am: 2b3ba70636
...
Change-Id: If6b12904d3bd8dd62b4762c00c11b1cb12f1fbbb
2019-12-13 02:25:46 +00:00
Automerger Merge Worker
2b3ba70636
lmkd: Support to send unsolicited message to clients am: 5c48096d8d am: 3123c4746c
...
Change-Id: I3f81a8cc8fb2f81a20e84a27334082a36d4af991
2019-12-13 01:47:08 +00:00
Jing Ji
3123c4746c
lmkd: Support to send unsolicited message to clients
...
am: 5c48096d8d
Change-Id: Idf8184718f6e5a1ed13c1ce3476df81a59335d7d
2019-12-12 16:38:17 -08:00
Jing Ji
5c48096d8d
lmkd: Support to send unsolicited message to clients
...
For now the only unsolicited message from lmkd is the process
kills on memory pressure.
Bug: 136036078
Test: atest ApplicationExitInfoTest
Change-Id: I503fd6a45ebab5276460b0ab978ebb2b8431dc0d
Signed-off-by: Jing Ji <jji@google.com>
2019-12-12 08:53:04 -08:00
George Burgess IV
dc399add21
lmkd: fix an overallocation am: a5845e7b60 am: 7b28974872
...
am: 66e5e052f4
Change-Id: I8f8ff65ed45f7c8bfdafcd6f9ea85bd035178f26
2019-12-09 14:07:40 -08:00
George Burgess IV
66e5e052f4
lmkd: fix an overallocation am: a5845e7b60
...
am: 7b28974872
Change-Id: Ic0fab4e8d6aaa68fa82f926c6bbc7aed5656810e
2019-12-09 14:04:34 -08:00