Commit Graph

1107 Commits

Author SHA1 Message Date
Suren Baghdasaryan 8dbaf44242 [automerger skipped] lmkd: polling code cleanup am: 3f84a211e5 am: 8a6cf251b8 -s ours am: b8af60cf35 -s ours am: 017406d886 -s ours
am skip reason: Change-Id If0674eda954a25f0f6c9188501ff77db8ba0813b with SHA-1 3f84a211e5 is in history

Change-Id: Ia197f2ad13f9f48a2cef189fcba3267072a798be
2020-05-20 01:31:22 +00:00
Automerger Merge Worker e7cc0a8201 [automerger skipped] Merge changes from topic "am-a5100bc1a1c340719c31abf373ae0c6d" into rvc-qpr-dev-plus-aosp am: f31871b1cf -s ours
am skip reason: Change-Id Ia802dbd7abb167d66b76390e269e4a4418ca5def with SHA-1 5096d16091 is in history

Change-Id: I99639579f81858b7dccfd24fe78099a995c30fa9
2020-05-20 01:30:22 +00:00
Suren Baghdasaryan 8b7bd638e1 [automerger skipped] lmkd: Enable stricter compiler checks am: 5096d16091 am: 2b90436606 am: 15b83b66d1 -s ours am: 6d78423053 -s ours
am skip reason: Change-Id Ia802dbd7abb167d66b76390e269e4a4418ca5def with SHA-1 e538ba2df6 is in history

Change-Id: Ib4e8b09d98a67cf533ffa3958679f5b6d486acdb
2020-05-20 01:29:14 +00:00
Suren Baghdasaryan 9c90a34793 [automerger skipped] lmkd: Remove unused variables and fix type mismatches am: dd7ec447ab am: 9cc5e9624f am: aabfa71492 -s ours am: 62d3403507 -s ours
am skip reason: Change-Id I7f0839d803a6bf6532f077208ce54aba761dc9fe with SHA-1 ed715a3424 is in history

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

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

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

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

Change-Id: I86097aaaa185e1464d63274c7507207449af0669
2020-05-20 01:04:39 +00:00
Suren Baghdasaryan 5af3a0a53d [automerger skipped] lmkd: enable ro.lmk.kill_timeout_ms to be used with kill notifications am: c7e51b7b2a am: c5969c34b2 -s ours am: 9b76491496 -s ours
am skip reason: Change-Id Ia3eed3448fd6928a5e634c2737044722048b3578 with SHA-1 c7e51b7b2a is in history

Change-Id: Ia1833cc968f9309d5976501ada418211977b6773
2020-05-20 01:04:38 +00:00
Suren Baghdasaryan 017406d886 [automerger skipped] lmkd: polling code cleanup am: 3f84a211e5 am: 8a6cf251b8 -s ours am: b8af60cf35 -s ours
am skip reason: Change-Id If0674eda954a25f0f6c9188501ff77db8ba0813b with SHA-1 3f84a211e5 is in history

Change-Id: Ia174bdf991fcece8cebc9073757c54e747085d59
2020-05-20 01:04:35 +00:00
Automerger Merge Worker f31871b1cf Merge changes from topic "am-a5100bc1a1c340719c31abf373ae0c6d" into rvc-qpr-dev-plus-aosp
* changes:
  [automerger skipped] lmkd: Enable stricter compiler checks am: 5096d16091 -s ours am: 0d423bd611 -s ours am: 84f06d35e3 -s ours
  [automerger skipped] lmkd: Remove unused variables and fix type mismatches am: dd7ec447ab -s ours am: 742af8a026 -s ours am: e2a6306736 -s ours
  [automerger skipped] lmkd: enable ro.lmk.kill_timeout_ms to be used with kill notifications am: c7e51b7b2a -s ours am: f0e2037d23 -s ours am: cd54a7cdf4 -s ours
  [automerger skipped] lmkd: polling code cleanup am: 3f84a211e5 -s ours am: 3c092ca721 -s ours am: 8a32051ccf -s ours
2020-05-20 01:04:17 +00:00
Suren Baghdasaryan 7bdf5ad280 [automerger skipped] lmkd: Enable stricter compiler checks am: 5096d16091 -s ours am: 0d423bd611 -s ours am: 84f06d35e3 -s ours
am skip reason: Change-Id Ia802dbd7abb167d66b76390e269e4a4418ca5def with SHA-1 e538ba2df6 is in history

Change-Id: I9a67c359118c31f76b283c3836dae6d2f9d79943
2020-05-20 01:04:11 +00:00
Suren Baghdasaryan 3daeb697c3 [automerger skipped] lmkd: Remove unused variables and fix type mismatches am: dd7ec447ab -s ours am: 742af8a026 -s ours am: e2a6306736 -s ours
am skip reason: Change-Id I7f0839d803a6bf6532f077208ce54aba761dc9fe with SHA-1 ed715a3424 is in history

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

Change-Id: I64e1adbefe516fa4941ab65a6e90b260019a0e09
2020-05-20 01:04:08 +00:00
Suren Baghdasaryan 147a5437de [automerger skipped] lmkd: polling code cleanup am: 3f84a211e5 -s ours am: 3c092ca721 -s ours am: 8a32051ccf -s ours
am skip reason: Change-Id If0674eda954a25f0f6c9188501ff77db8ba0813b with SHA-1 9ca5334683 is in history

Change-Id: Ia47e26107096f1b4a6e049a43a76030f73bbfa01
2020-05-20 01:04:06 +00:00
Suren Baghdasaryan 6d78423053 [automerger skipped] lmkd: Enable stricter compiler checks am: 5096d16091 am: 2b90436606 am: 15b83b66d1 -s ours
am skip reason: Change-Id Ia802dbd7abb167d66b76390e269e4a4418ca5def with SHA-1 e538ba2df6 is in history

Change-Id: I0f0ac74b3337dc987ee0d1cb00b4ccd409624278
2020-05-20 01:04:01 +00:00
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 eb6080bbdb lmkd: Enable stricter compiler checks am: 5096d16091
Change-Id: Ida732ec9e0a08b67b962cd82deb08434790fc3f9
2020-05-20 00:28:56 +00:00
Suren Baghdasaryan 9926488b3f lmkd: Remove unused variables and fix type mismatches am: dd7ec447ab
Change-Id: If52410c79310156603e1859aee31e260f7b422b1
2020-05-20 00:28:54 +00:00
Suren Baghdasaryan 6a1b9fda36 lmkd: enable ro.lmk.kill_timeout_ms to be used with kill notifications am: c7e51b7b2a
Change-Id: If31328dc8eb050a22ef868c3e946e3bb5644fbc8
2020-05-20 00:28:52 +00:00
Suren Baghdasaryan 7753f8a530 lmkd: polling code cleanup am: 3f84a211e5
Change-Id: I819f245efbde6eccbf3141d900c8d6c98330ac0d
2020-05-20 00:28:51 +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 18e1efa4e5 lmkd: fix type warning from static analysis tools am: 65857db6a9 am: c93040a423 am: 63f45b46d6 am: 4dfdb42e92 am: 2fac11b44f
Change-Id: I6eb8ec1648b0ab7e61c363b2918a05518a1d5e32
2020-05-12 22:42:42 +00:00