Commit Graph

378 Commits

Author SHA1 Message Date
Tim Murray 6e8bb64ce9 Merge "lmkd: set PSI_POLL_PERIOD to 40ms" am: 92dcfb3187 am: 90cfb547d2
am: 8f66fc9000

Change-Id: I66d8ed75fb820edcd369e17eee4c83056edbea64
2019-03-13 16:43:58 -07:00
Tim Murray 6aa9241282 Merge "lmkd: set PSI_POLL_PERIOD to 40ms" am: 92dcfb3187
am: 90cfb547d2

Change-Id: I3bcad580bb095c186d990de98723ec78463ba2d4
2019-03-13 16:39:49 -07:00
Tim Murray f71c9beded Merge "lmkd: set PSI_POLL_PERIOD to 40ms"
am: 92dcfb3187

Change-Id: Ib8d6a2dc535e9cccad95c790da9454d5550b4cd2
2019-03-13 16:35:39 -07:00
Tim Murray 55e117bd2e Merge "lmkd: set PSI_POLL_PERIOD to 40ms" 2019-03-13 23:27:13 +00:00
Tim Murray 0fca3629ca lmkd: set PSI_POLL_PERIOD to 40ms
200ms was too lenient when under severe memory pressure.

Test: boots, works
Bug: 127765309

Change-Id: I8e047de6318574a107720c56473ed0f25582e182
Signed-off-by: Tim Murray <timmurray@google.com>
2019-03-13 10:13:19 -07:00
The Android Open Source Project 6faf98ff88 [automerger skipped] DO NOT MERGE - Merge PPRL.190305.001 into master am: 4d916a1ece -s ours am: 8ba23f2a77 -s ours
am: e4660ddc99 -s ours
am skip reason: subject contains skip directive

Change-Id: I5d90725e75f140c111188e13dba76dae683f3ba7
2019-03-12 23:02:09 -07:00
The Android Open Source Project 4ca7e05e68 [automerger skipped] DO NOT MERGE - Merge PPRL.190305.001 into master am: 4d916a1ece -s ours
am: 8ba23f2a77 -s ours
am skip reason: subject contains skip directive

Change-Id: I448cd15c59dac97660765fc2a02e5ff611a3ed70
2019-03-12 22:34:21 -07:00
The Android Open Source Project 62324f3b00 [automerger skipped] DO NOT MERGE - Merge PPRL.190305.001 into master
am: 4d916a1ece -s ours
am skip reason: subject contains skip directive

Change-Id: I31a0756b75ab6d657dc26807ce8baeb42c40d232
2019-03-12 21:47:32 -07:00
The Android Open Source Project 8199c0f1ca DO NOT MERGE - Merge PPRL.190305.001 into master
Bug: 127812889
Change-Id: I16a546dc24d3cf980ad7ab09895c0d97ee436224
2019-03-11 11:57:28 -07:00
Suren Baghdasaryan 0a966657f9 Merge "Add min_score_adj into LmkKillOccurred event" am: a953ae0546 am: efcab54b55
am: a4bd8777d3

Change-Id: I1c55bd0e3ab771e20cd77250ade6ee20f9e50cce
2019-03-05 16:23:28 -08:00
Jim Blackler b8d21d5d2b [automerger skipped] Add start time to LmkKillOccurred
am: e7a9fabd64 -s ours
am skip reason: change_id I4ef6433391c8758626334731d2b5de038e4468ae with SHA1 1417cdbddb is in history

Change-Id: I0b6eb14568d480b13fd0cea14863a9ad4c14c0cd
2019-03-05 16:15:29 -08:00
Suren Baghdasaryan da0073abd4 Merge "Add min_score_adj into LmkKillOccurred event" am: a953ae0546
am: efcab54b55

Change-Id: I0c1f8f60ef70181e4d3e1399eae45723040174f5
2019-03-05 16:14:07 -08:00
Rajeev Kumar 4255742795 [automerger skipped] Read memory stats from /proc/pid/stat file.
am: e7cfa67a05 -s ours
am skip reason: change_id Ie555933aafa6a6b7aa1dbf5518ebe804376e0afd with SHA1 fe31bef940 is in history

Change-Id: I3c357f360da2969e1850f32419e4b074bbe17e21
2019-03-05 16:10:57 -08:00
Jim Blackler dcdb43747e [automerger skipped] Add start time to LmkKillOccurred am: 962e0442d1 -s ours
am: b68fe506e0 -s ours
am skip reason: change_id I4ef6433391c8758626334731d2b5de038e4468ae with SHA1 34c3cb84a0 is in history

Change-Id: I2521241013c39d3cc16f45b1df996135f92a053f
2019-03-05 15:48:51 -08:00
Rajeev Kumar b14f9f3b46 [automerger skipped] Read memory stats from /proc/pid/stat file. am: 2bc24f88ca -s ours
am: 9eee2302ee -s ours
am skip reason: change_id Ie555933aafa6a6b7aa1dbf5518ebe804376e0afd with SHA1 4dbc24d393 is in history

Change-Id: I42d2080003936bcf99fec6917fe5e52366855c07
2019-03-05 15:48:03 -08:00
Jim Blackler 306de0dba5 Add start time to LmkKillOccurred
This is to measure an application's behavior with respect to being LMKed
(the longer an app lives before being LMKed, the better).

Bug: 119854389
Test: Manual
Change-Id: I4ef6433391c8758626334731d2b5de038e4468ae
Merged-In: I4ef6433391c8758626334731d2b5de038e4468ae
(cherry picked from I4ef6433391c8758626334731d2b5de038e4468ae)
2019-03-05 15:47:56 -08:00
Rajeev Kumar 160e50c6f6 Read memory stats from /proc/pid/stat file.
(cherry pick from commit 0301683e49ab255769b15469487feaab3466167a)
Bug: 117333340
Test: Manual testing using alloc-stress tool
Merged-In: Ie555933aafa6a6b7aa1dbf5518ebe804376e0afd

Change-Id: I8ab08606dba7de2f65711204453067dbfbdcbdd8
2019-03-05 15:46:07 -08:00
Jim Blackler d3b9beb3cd [automerger skipped] Add start time to LmkKillOccurred
am: 962e0442d1 -s ours
am skip reason: change_id I4ef6433391c8758626334731d2b5de038e4468ae with SHA1 1417cdbddb is in history

Change-Id: I56f76418a5c6a3435dec766d731068f60bd4b642
2019-03-05 15:27:13 -08:00
Rajeev Kumar 096ef04338 [automerger skipped] Read memory stats from /proc/pid/stat file.
am: 2bc24f88ca -s ours
am skip reason: change_id Ie555933aafa6a6b7aa1dbf5518ebe804376e0afd with SHA1 4dbc24d393 is in history

Change-Id: I5676596b2ee9f7448faa0b0274ac9425c7525fb0
2019-03-05 15:26:28 -08:00
Suren Baghdasaryan e754f1d762 Merge "Add min_score_adj into LmkKillOccurred event"
am: a953ae0546

Change-Id: Ib1a35290221974736f86eda9db57e27e831a4813
2019-03-05 15:11:38 -08:00
Jim Blackler 9388d9d918 Add start time to LmkKillOccurred
This is to measure an application's behavior with respect to being LMKed
(the longer an app lives before being LMKed, the better).

Bug: 119854389
Test: Manual
Change-Id: I4ef6433391c8758626334731d2b5de038e4468ae
Merged-In: I4ef6433391c8758626334731d2b5de038e4468ae
(cherry picked from I4ef6433391c8758626334731d2b5de038e4468ae)
2019-03-05 11:53:17 -08:00
Rajeev Kumar eb7208fbf6 Read memory stats from /proc/pid/stat file.
(cherry pick from commit 0301683e49ab255769b15469487feaab3466167a)
Bug: 117333340
Test: Manual testing using alloc-stress tool
Merged-In: Ie555933aafa6a6b7aa1dbf5518ebe804376e0afd

Change-Id: I8ab08606dba7de2f65711204453067dbfbdcbdd8
2019-03-05 11:53:14 -08:00
Suren Baghdasaryan e1228bd545 Add min_score_adj into LmkKillOccurred event
Log min_score_adj when lmkd kills a process to determine the oom_score
levels that lmkd considers during the kill.

Bug: 123024834
Change-Id: I986ae8f2808199b1654bc8d2a32dd88046c79aa3
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-03-05 09:51:06 +00:00
Juju Sung 7bd3ac3290 Merge "lmkd: Remove redundant free swap and free memory check" am: 89a7cc48cc am: ab0319ece8
am: e8cce305b4

Change-Id: Ie9ad61bcd4de78cf72b05b7075e526afaf4e1252
2019-02-26 04:19:40 -08:00
Juju Sung 045248a43a Merge "lmkd: Remove redundant free swap and free memory check" am: 89a7cc48cc
am: ab0319ece8

Change-Id: I727d624f1149452ce755c0145f13a286f6422048
2019-02-26 02:54:06 -08:00
Juju Sung 405fe42b53 Merge "lmkd: Remove redundant free swap and free memory check"
am: 89a7cc48cc

Change-Id: I905a1d573d2fa66588a4dd436f4d1bd4cdf009ff
2019-02-26 02:08:59 -08:00
Xin Li 64435abd03 [automerger skipped] DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master am: 2d544cf8ce -s ours
am: dfa2db058b -s ours
am skip reason: subject contains skip directive

Change-Id: Ia7f209fe6fe25558172c57e29df92c72f2e76991
2019-02-25 17:20:40 -08:00
Xin Li a95647cbfb [automerger skipped] DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master
am: 2d544cf8ce -s ours
am skip reason: subject contains skip directive

Change-Id: I3f850473d57c1de65ef13055bf4c1ea8110c7b9f
2019-02-25 16:20:07 -08:00
Xin Li 32bc2d15ec DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master
Bug: 120848293
Change-Id: I92822048a7862acaa669847b2fa9c8f708159952
2019-02-21 11:28:44 -08:00
Juju Sung 94cd15bf22 lmkd: Remove redundant free swap and free memory check
lmkd can't kill processes because it has compare the size between free swap and free memory. Free swap is often larger than the free memory when system is under low memory with less swap-backed or swappable pages and finally leads to I/O thrashing.

Test: TreeHugger
Bug: 124727769
Change-Id: Ia2848859aa97a24bd13c704acee4b86cd2d3f647
2019-02-19 17:04:07 +00:00
Xin Li a3c2a8eecd [automerger skipped] Merge "DO NOT MERGE - Skip pi-platform-release (PPRL.190205.001) into stage-aosp-master" into stage-aosp-master am: 1c06c1e2de -s ours
am: cecb83d0f9 -s ours
am skip reason: subject contains skip directive

Change-Id: I6ae930275dd15e24b356a7cd76c9f5975679d33a
2019-02-14 21:51:04 -08:00
Xin Li 1ea0349f8b [automerger skipped] DO NOT MERGE - Skip pi-platform-release (PPRL.190205.001) into stage-aosp-master am: caa079eb65 -s ours
am: 2eafbb0d48 -s ours
am skip reason: subject contains skip directive

Change-Id: Ifc49e24f39b0d2a6d4c77812e8a4ddb2609fa4cf
2019-02-14 21:13:08 -08:00
Xin Li c7382e6b32 [automerger skipped] Merge "DO NOT MERGE - Skip pi-platform-release (PPRL.190205.001) into stage-aosp-master" into stage-aosp-master
am: 1c06c1e2de -s ours
am skip reason: subject contains skip directive

Change-Id: If7474ebb1d64133d48f89623ba8c93b8030dcd29
2019-02-14 17:01:59 -08:00
Xin Li 091ed68777 [automerger skipped] DO NOT MERGE - Skip pi-platform-release (PPRL.190205.001) into stage-aosp-master
am: caa079eb65 -s ours
am skip reason: subject contains skip directive

Change-Id: Iabd23608baea52bf58e62389bfc60ea2c6944a12
2019-02-14 14:46:51 -08:00
Xin Li 27d4026e81 Merge "DO NOT MERGE - Skip pi-platform-release (PPRL.190205.001) into stage-aosp-master" into stage-aosp-master 2019-02-14 22:11:39 +00:00
Pirama Arumuga Nainar 0cf218bec0 Merge "Make inlines static" am: 68c5ce22fb am: 4834824a37
am: cc419e4be5

Change-Id: I37482f133909015781990bdd5a1e8817b0330a4b
2019-02-12 22:50:40 -08:00
Pirama Arumuga Nainar 31606a56ce Merge "Make inlines static" am: 68c5ce22fb
am: 4834824a37

Change-Id: I508d68ff366f3deefa02f0cbb58e585ef8e3f9a9
2019-02-12 22:46:30 -08:00
Pirama Arumuga Nainar 65cc057be1 Merge "Make inlines static"
am: 68c5ce22fb

Change-Id: I08c066b7c49015b07aa46cff884a97d9dd2f675d
2019-02-12 22:42:21 -08:00
Xin Li 4f97674892 DO NOT MERGE - Skip pi-platform-release (PPRL.190205.001) into stage-aosp-master
Bug: 124234733
Change-Id: I10ec04a9bb7e61400796db3d9993ac870b792c99
2019-02-12 16:36:41 -08:00
android-build-team Robot 8600b07f2a Snap for 5180536 from cddcc0d9cf7cbba53e54d67455737a3900ae5d9f to pi-platform-release
Change-Id: Ie01971579962cce36d3170df9c1cb09f8b152520
2019-02-09 02:22:24 +00:00
Pirama Arumuga Nainar f85d4216fd Make inlines static
Bug: http://b/116873221

If not, building with coverage (and -O0) is broken since Clang does not
inline these functions, and does not emit a definition because they are
not static or extern.

Test: Build with coverage (-O0)

Change-Id: I2880119834f764164a1aac10b696e76a2b462b71
2019-02-06 15:19:00 -08:00
Greg Kaiser 3639a3b7d4 Merge "lmdk: Remove redundant 'if' check" am: 6cb668b992 am: 164ea570b3
am: 6aec0d1491

Change-Id: Ibeb8d778575e30d0672b0d7034f1ec2c4a36bb09
2019-02-04 22:57:56 -08:00
Greg Kaiser 673f2f9632 Merge "lmdk: Remove redundant 'if' check" am: 6cb668b992
am: 164ea570b3

Change-Id: Idb3f3a4aa875909eacc48e03717f170e560261c0
2019-02-04 22:07:32 -08:00
Greg Kaiser c5296202ff Merge "lmdk: Remove redundant 'if' check"
am: 6cb668b992

Change-Id: I119eac076221143d673867e2ed54e4c9cc0c2e73
2019-02-04 12:27:27 -08:00
Greg Kaiser 584f3fd35f lmdk: Remove redundant 'if' check
We already know that "polling" must be non-zero at this point,
because it hasn't been modified since our check on line 1960.
So we remove this check for code clarity.

Test: TreeHugger
Change-Id: I069d9fd0eef70748a5333733dd0518d1ac8021b7
2019-02-04 08:50:10 -08:00
Suren Baghdasaryan 2e28615782 Merge "lmkd: Add support for psi monitors" am: bec585440c am: b32788fc5e
am: 92a5149a3b

Change-Id: I613401d77e33313ba9df7a71ce79938ed7f2538b
2019-02-01 12:19:38 -08:00
Suren Baghdasaryan 8e9d64875f Merge "lmkd: Add support for psi monitors" am: bec585440c
am: b32788fc5e

Change-Id: I9dcaae34a493d17216cbd27b40422faa2dc6a665
2019-02-01 11:41:50 -08:00
Suren Baghdasaryan 627180e7c1 Merge "lmkd: Add support for psi monitors"
am: bec585440c

Change-Id: I68f6210177b96083990631da6d41795c948aeae5
2019-02-01 11:11:04 -08:00
Suren Baghdasaryan 55e3150842 lmkd: Add support for psi monitors
With new psi monitor support in the kernel lmkd can use it to register
custom pressure levels. Add lmkd support for psi monitors when they are
provided by the kernel and use them by default. When kernel does not
support psi lmkd will fall back to vmpressure usage.
Add ability to poll memory status after the initial psi event is triggered
because kernel throttles psi memory pressure events to one per PSI tracking
window (currently set to 1sec). Current implementation polls every 200ms
for 1sec duration after the initial event is triggered.
If ro.lmk.use_psi is set to false psi logic will be disabled even when psi
is supported in kernel.

Bug: 111308141
Test: lmkd_unit_test
Change-Id: I685774b176f393bab7412161773f5c9af51e0163
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-01 18:40:32 +00:00
Suren Baghdasaryan 21a7d9da19 Merge "libpsi: initial revision" am: bb405bf986 am: b9550970ef
am: 2b063925d1

Change-Id: I24f70b6f846a90dede9c964f309f76fcc04f98e7
2019-01-29 21:33:14 -08:00