Commit Graph

560 Commits

Author SHA1 Message Date
Suren Baghdasaryan 6e7368e80c [automerger skipped] lmkd: Fix min_score_adj to exclude killing foreground processes am: 5c039b53d8 am: d9ba0c99ae -s ours am: e58fd35c27 -s ours
am skip reason: Change-Id If187654b8001ce843ec6085ccd2042d75a986dae with SHA-1 0e589f61ba is in history

Change-Id: I465380f7a63d085ab082582d6a0cf2a3a2527e77
2020-05-20 21:38:12 +00:00
Suren Baghdasaryan e58fd35c27 [automerger skipped] lmkd: Fix min_score_adj to exclude killing foreground processes am: 5c039b53d8 am: d9ba0c99ae -s ours
am skip reason: Change-Id If187654b8001ce843ec6085ccd2042d75a986dae with SHA-1 0e589f61ba is in history

Change-Id: I007c16b6a8bc5de7a906b8ab4424d42212f5b3ce
2020-05-20 21:25:25 +00:00
Suren Baghdasaryan d9ba0c99ae lmkd: Fix min_score_adj to exclude killing foreground processes am: 5c039b53d8
Change-Id: Iebe3f5c02c882cc47e5fb25cd14bff4ee9667482
2020-05-20 20:59:11 +00:00
Suren Baghdasaryan 5c039b53d8 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>
Merged-In: If187654b8001ce843ec6085ccd2042d75a986dae
Change-Id: If187654b8001ce843ec6085ccd2042d75a986dae
2020-05-20 12:21:10 -07:00
Suren Baghdasaryan 181ec2d13d lmkd: Set the default free swap threshold to 10% for all devices am: c2b228e498 am: deee65f222
Change-Id: I70e72054d67ec0cdf01df87cff2453d5ae4e7746
2020-05-20 19:17:34 +00:00
Suren Baghdasaryan 95b5673a5d lmkd: Fix min_score_adj to exclude killing foreground processes am: 0e589f61ba am: 025396b2c2
Change-Id: I58c0ee0f8e1a4f9176749720bf6199912db20b49
2020-05-20 19:17:00 +00:00
Suren Baghdasaryan 7f2ddf5ff0 lmkd: Set the default free swap threshold to 10% for all devices am: c2b228e498 am: b0027daa8a
Change-Id: If41581e301554ecf24b97a89bb174303326a5c99
2020-05-20 19:16:25 +00:00
Suren Baghdasaryan 4ad5bad680 lmkd: Fix min_score_adj to exclude killing foreground processes am: 0e589f61ba am: 3125ebc794
Change-Id: I5ae3a21e6cc9f61806a66ab995e101f16674cee7
2020-05-20 19:16:06 +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 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 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 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 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 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
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 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 2fe36b0246 [automerger skipped] lmkd: Add property re-initialization support am: c4081918a7 -s ours am: 350685e461 -s ours
am skip reason: Change-Id Ic60331f3368f5a7fdfe09ad7d47c7ccf0a497685 with SHA-1 1d0ebeaa9c is in history

Change-Id: I2a3b1c355edbdbe56e7036273d8398f6354ef309
2020-05-08 17:55:35 +00:00
Suren Baghdasaryan 350685e461 [automerger skipped] lmkd: Add property re-initialization support am: c4081918a7 -s ours
am skip reason: Change-Id Ic60331f3368f5a7fdfe09ad7d47c7ccf0a497685 with SHA-1 1d0ebeaa9c is in history

Change-Id: Ia0eb7d23137c74f72b251034902fd0ed9faf8a28
2020-05-08 17:40:35 +00:00