Commit Graph

721 Commits

Author SHA1 Message Date
Suren Baghdasaryan 62d3403507 [automerger skipped] lmkd: Remove unused variables and fix type mismatches am: dd7ec447ab am: 9cc5e9624f am: aabfa71492 -s ours
am skip reason: Change-Id I7f0839d803a6bf6532f077208ce54aba761dc9fe with SHA-1 ed715a3424 is in history

Change-Id: I64e0be8b341ca3fab1c71923cd2ec79a544f2870
2020-05-20 01:03:59 +00:00
Suren Baghdasaryan 628a00239d [automerger skipped] lmkd: enable ro.lmk.kill_timeout_ms to be used with kill notifications am: c7e51b7b2a am: c5969c34b2 am: de6c2612e2 -s ours
am skip reason: Change-Id Ia3eed3448fd6928a5e634c2737044722048b3578 with SHA-1 03dccf35a1 is in history

Change-Id: I14fefb57c64b51f4f887ccb254bb22b48295a382
2020-05-20 01:03:58 +00:00
Suren Baghdasaryan e282df7461 [automerger skipped] lmkd: polling code cleanup am: 3f84a211e5 am: 8a6cf251b8 am: 0425267bf2 -s ours
am skip reason: Change-Id If0674eda954a25f0f6c9188501ff77db8ba0813b with SHA-1 9ca5334683 is in history

Change-Id: I9d76756abab15c1557bc067f0a6dad64d4c96ccc
2020-05-20 01:03:56 +00:00
Suren Baghdasaryan 4f28667d38 [automerger skipped] lmkd: Enable stricter compiler checks am: 5096d16091 am: 2b90436606 -s ours
am skip reason: Change-Id Ia802dbd7abb167d66b76390e269e4a4418ca5def with SHA-1 5096d16091 is in history

Change-Id: I6b9c0d0668a63c89441933a7f766c3bb7ea68047
2020-05-20 00:54:21 +00:00
Suren Baghdasaryan 6c907defc8 [automerger skipped] lmkd: Remove unused variables and fix type mismatches am: dd7ec447ab am: 9cc5e9624f -s ours
am skip reason: Change-Id I7f0839d803a6bf6532f077208ce54aba761dc9fe with SHA-1 dd7ec447ab is in history

Change-Id: Ib2c44a73986b23a40653307ab8c4b56d8bf187b7
2020-05-20 00:54:19 +00:00
Suren Baghdasaryan 9b76491496 [automerger skipped] lmkd: enable ro.lmk.kill_timeout_ms to be used with kill notifications am: c7e51b7b2a am: c5969c34b2 -s ours
am skip reason: Change-Id Ia3eed3448fd6928a5e634c2737044722048b3578 with SHA-1 03dccf35a1 is in history

Change-Id: Ic10f46ff6d4dd97abcc2dd2f2f03c91fa20d7ad9
2020-05-20 00:54:18 +00:00
Suren Baghdasaryan b8af60cf35 [automerger skipped] lmkd: polling code cleanup am: 3f84a211e5 am: 8a6cf251b8 -s ours
am skip reason: Change-Id If0674eda954a25f0f6c9188501ff77db8ba0813b with SHA-1 9ca5334683 is in history

Change-Id: I51519fa2f1de0bef6f24c01f3dd48babac65e22d
2020-05-20 00:54:16 +00:00
Suren Baghdasaryan 84f06d35e3 [automerger skipped] lmkd: Enable stricter compiler checks am: 5096d16091 -s ours am: 0d423bd611 -s ours
am skip reason: Change-Id Ia802dbd7abb167d66b76390e269e4a4418ca5def with SHA-1 e538ba2df6 is in history

Change-Id: Ie4e12064bee0fc2500b3d8aa04d142e46e954a3b
2020-05-20 00:54:08 +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 e2a6306736 [automerger skipped] lmkd: Remove unused variables and fix type mismatches am: dd7ec447ab -s ours am: 742af8a026 -s ours
am skip reason: Change-Id I7f0839d803a6bf6532f077208ce54aba761dc9fe with SHA-1 ed715a3424 is in history

Change-Id: If75e1b9d12ebde9a6d792846c0da6e7955f09640
2020-05-20 00:54:06 +00:00
Suren Baghdasaryan cd54a7cdf4 [automerger skipped] lmkd: enable ro.lmk.kill_timeout_ms to be used with kill notifications am: c7e51b7b2a -s ours am: f0e2037d23 -s ours
am skip reason: Change-Id Ia3eed3448fd6928a5e634c2737044722048b3578 with SHA-1 03dccf35a1 is in history

Change-Id: I913ad2359d6ece928a446d5fa787f04ed05f345a
2020-05-20 00:54:05 +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 8a32051ccf [automerger skipped] lmkd: polling code cleanup am: 3f84a211e5 -s ours am: 3c092ca721 -s ours
am skip reason: Change-Id If0674eda954a25f0f6c9188501ff77db8ba0813b with SHA-1 9ca5334683 is in history

Change-Id: I406ea70ae399a248ba0ab57f04e0200a83c3b08f
2020-05-20 00:54:03 +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 0d423bd611 [automerger skipped] lmkd: Enable stricter compiler checks am: 5096d16091 -s ours
am skip reason: Change-Id Ia802dbd7abb167d66b76390e269e4a4418ca5def with SHA-1 e538ba2df6 is in history

Change-Id: I71c445fc44e2da54b6e2016d21a77c6a1f34d964
2020-05-20 00:28:38 +00:00
Suren Baghdasaryan 742af8a026 [automerger skipped] lmkd: Remove unused variables and fix type mismatches am: dd7ec447ab -s ours
am skip reason: Change-Id I7f0839d803a6bf6532f077208ce54aba761dc9fe with SHA-1 ed715a3424 is in history

Change-Id: I4d3ef9cfe36b68a2aa177c7660974a8f31c29bf0
2020-05-20 00:28:36 +00:00
Suren Baghdasaryan f0e2037d23 [automerger skipped] lmkd: enable ro.lmk.kill_timeout_ms to be used with kill notifications am: c7e51b7b2a -s ours
am skip reason: Change-Id Ia3eed3448fd6928a5e634c2737044722048b3578 with SHA-1 03dccf35a1 is in history

Change-Id: I5fe0b9d7a442a0d729b0eec34719f004fcf0dfd1
2020-05-20 00:28:35 +00:00
Suren Baghdasaryan 3c092ca721 [automerger skipped] lmkd: polling code cleanup am: 3f84a211e5 -s ours
am skip reason: Change-Id If0674eda954a25f0f6c9188501ff77db8ba0813b with SHA-1 9ca5334683 is in history

Change-Id: I65d3c8f3f36cec703fb60bf44e7f098369ce9bf3
2020-05-20 00:28:34 +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
Kyeongdon Kim 2fac11b44f lmkd: fix type warning from static analysis tools am: 65857db6a9 am: c93040a423 am: 63f45b46d6 am: 4dfdb42e92
Change-Id: I4c27b9817cfb11a5af04c11e1166231cda323078
2020-05-12 21:02:38 +00:00
Kyeongdon Kim 4dfdb42e92 lmkd: fix type warning from static analysis tools am: 65857db6a9 am: c93040a423 am: 63f45b46d6
Change-Id: I38a74decb492f3f3fbf0fd2484a0c2d1060719fa
2020-05-12 20:41:50 +00:00
Kyeongdon Kim 63f45b46d6 lmkd: fix type warning from static analysis tools am: 65857db6a9 am: c93040a423
Change-Id: I67b40b195018c4da66b3bd7e375b0228412fcbc2
2020-05-12 20:22:31 +00:00
Kyeongdon Kim c93040a423 lmkd: fix type warning from static analysis tools am: 65857db6a9
Change-Id: Ie174a997b4f41b0d582893182b15039d8638f9ee
2020-05-12 20:09:12 +00:00
Suren Baghdasaryan f928ee979e lmkd: Enable stricter compiler checks am: e538ba2df6 am: 38855fe192 am: 8e064f1260 am: 53dad9cddd
Change-Id: I84cb97786c61f0d5cd7abc94799a54c9f7b79d33
2020-05-12 20:08:51 +00:00
Suren Baghdasaryan 5075e67ac7 lmkd: Remove unused variables and fix type mismatches am: ed715a3424 am: 8fa0ac5c64 am: 9fad9a82c7 am: 5de46f6109
Change-Id: I0a92f445533ee6b52cf9a0816977b9f8899ff48f
2020-05-12 20:08:48 +00:00
Kyeongdon Kim 65857db6a9 lmkd: fix type warning from static analysis tools
In memcg process stat path,
%u in format string (no.2) requires 'unsigned int'
but the argument type is 'signed int'.

Bug: NA
Test: check statslog with lmkd operation
Signed-off-by: Kyeongdon Kim <kyeongdon.kim@lge.com>
Change-Id: I3fcee57efbf26724878a81c8e1acd419aab8b95b
2020-05-12 19:56:46 +00:00
Suren Baghdasaryan 53dad9cddd lmkd: Enable stricter compiler checks am: e538ba2df6 am: 38855fe192 am: 8e064f1260
Change-Id: Ic18ac4b6bda1fb4b036a68499b21b57c6100f884
2020-05-12 19:50:08 +00:00
Suren Baghdasaryan 5de46f6109 lmkd: Remove unused variables and fix type mismatches am: ed715a3424 am: 8fa0ac5c64 am: 9fad9a82c7
Change-Id: Ief5e642d3ba5cf52a57dcfb5cdb931ea239fb578
2020-05-12 19:50:06 +00:00
Suren Baghdasaryan 8e064f1260 lmkd: Enable stricter compiler checks am: e538ba2df6 am: 38855fe192
Change-Id: Ifc5b0fae35155aabee00007609296a11bfb8e855
2020-05-12 19:36:13 +00:00
Suren Baghdasaryan 9fad9a82c7 lmkd: Remove unused variables and fix type mismatches am: ed715a3424 am: 8fa0ac5c64
Change-Id: I8477920456afad113a20c0053c88d69463689d30
2020-05-12 19:36:12 +00:00
Suren Baghdasaryan 38855fe192 lmkd: Enable stricter compiler checks am: e538ba2df6
Change-Id: Ife625c2ab0886cd9333269edb92d5e39447b15f8
2020-05-12 19:19:55 +00:00
Suren Baghdasaryan 8fa0ac5c64 lmkd: Remove unused variables and fix type mismatches am: ed715a3424
Change-Id: Ibcce20a6b9d724e102740683df45a16a0dfb3708
2020-05-12 19:19:53 +00:00
Suren Baghdasaryan e538ba2df6 lmkd: Enable stricter compiler checks
Enable -Wall and -Wextra compiler flags to catch compilation warnings.

Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ia802dbd7abb167d66b76390e269e4a4418ca5def
2020-05-12 02:56:41 +00:00
Suren Baghdasaryan ed715a3424 lmkd: Remove unused variables and fix type mismatches
Fix compilation warnings by removing unused variables and add typecasting
whenever mixed type comparisons are performed.

Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I7f0839d803a6bf6532f077208ce54aba761dc9fe
2020-05-11 19:52:52 -07:00
Suren Baghdasaryan a3d2757d5b [automerger skipped] lmkd: Add property re-initialization support am: c4081918a7 am: a84a5e5801 am: f8ea710bef -s ours
am skip reason: Change-Id Ic60331f3368f5a7fdfe09ad7d47c7ccf0a497685 with SHA-1 c4081918a7 is in history

Change-Id: I22e05f7613603b94d173a6dcae9fe96cfad45bfc
2020-05-08 22:53:03 +00:00
Suren Baghdasaryan 2282d1efc0 [automerger skipped] lmkd: Add property re-initialization support am: c4081918a7 am: a84a5e5801 -s ours am: 46bb94d5e9 -s ours
am skip reason: Change-Id Ic60331f3368f5a7fdfe09ad7d47c7ccf0a497685 with SHA-1 c4081918a7 is in history

Change-Id: Ib23814248b28e546feda81fc01539b4f3066c723
2020-05-08 22:48:59 +00: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 46bb94d5e9 [automerger skipped] lmkd: Add property re-initialization support am: c4081918a7 am: a84a5e5801 -s ours
am skip reason: Change-Id Ic60331f3368f5a7fdfe09ad7d47c7ccf0a497685 with SHA-1 c4081918a7 is in history

Change-Id: I076eb3d336076fa64c8b6a863d6ef1043a51bc2c
2020-05-08 22:40:13 +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 3e9990c57e [automerger skipped] lmkd: Add property re-initialization support am: c4081918a7 -s ours am: 350685e461 -s ours am: 2fe36b0246 -s ours
am skip reason: Change-Id Ic60331f3368f5a7fdfe09ad7d47c7ccf0a497685 with SHA-1 1d0ebeaa9c is in history

Change-Id: I3be12db25996167fa1dc29c19763a9b5f086be04
2020-05-08 18:07:05 +00:00