Commit Graph

786 Commits

Author SHA1 Message Date
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 deee65f222 lmkd: Set the default free swap threshold to 10% for all devices am: c2b228e498
Change-Id: Ie1d59e0bd1b840a3cb6644682e69ae3a33b7206e
2020-05-20 18:59:54 +00:00
Suren Baghdasaryan 025396b2c2 lmkd: Fix min_score_adj to exclude killing foreground processes am: 0e589f61ba
Change-Id: I06966970b96007f50689aa0b100cd11ef1f610a5
2020-05-20 18:59:49 +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 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 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