Commit Graph

1072 Commits

Author SHA1 Message Date
Yongqin Liu bf819b5593 lmkd: fix the cgroup attribute name to MemCgroupEventControl
which was CgroupEventControl before, but it's not the one
that definied in system/core/libprocessgroup/profiles/task_profiles.json.

And it causes lmkd crash for some setups like 4.19q + AOSP Master

Bug: 230642311

Test: boot the 4.19q + AOSP master setup with hikey960 board

Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Change-Id: I87b1ea2040f21c52d549db58692fc8a2b114f8e6
2022-04-29 18:50:20 +08:00
전윤재 f70a8a260f lmkd: Fix a comparison operation with uninitialized variable.
Prevent comparing uninitialized poll_start_tm with curr_tm in call_handler().
The bug caused by this has been fixed by the commit: d816ab.
But the main bug is not fixed yet and it may cause problem
in later if we add another operations in this if block.

Change-Id: Id13318297a2cbf2f9784134a2ccd648cc221e8c4
Signed-off-by: Yoonjae Jeon <yj213.jeon@samsung.com>
2022-04-25 00:51:47 +00:00
Bart Van Assche 759943643f lmkd: Add support for cgroups v2 memcg hierarchy
Use the /sys/fs/cgroup/uid_%u/pid_%u path instead of
/dev/memcg/apps/uid_%u/pid_%u" if the memcg controller is mounted in the
v2 cgroup hierarchy. Skip the code that refers to memcg attributes that
only exist in the cgroup v1 hierarchy when using the v2 memcg. Complain
if it is attempted to use the old kill strategy in combination with
memcg v2 since only the new strategy is compatible with the v2 cgroup
hiearchy.

Bug: 213617178
Test: Tested lmkd inside the Cuttlefish emulator. Triggered an
Test: out-of-memory condition as follows:
Test: i=0; while [ $i -lt 16 ]; do dd if=/dev/zero of=/dev/null bs=1G count=1 & ((i++)) done
Test: That caused the following output to appear in logcat:
Test: 02-03 18:13:02.772   241   241 I lowmemorykiller: Kill 'com.android.packageinstaller' (3031), uid 10022, oom_score_adj 975 to free 29348kB rss, 21232kB swap; reason: min watermark is breached and swap is low (135016kB < 150384kB)
Test: 02-03 18:13:02.772   241   241 I killinfo: [3031,10022,975,0,29348,3,73644,98460,8,1000,33448,40220,1503848,135016,81720,1387040,27268,29520,50348,103164,20176,57664,0,0,0,519,103,5,0,21232,30016,0,2]
Test: From the kernel log:
Test: [  302.834958] Out of memory: Killed process 3017 (ADB-JDWP Connec) total-vm:13522856kB, anon-rss:0kB, file-rss:0kB, shmem-rss:560kB, UID:10052 pgtables:1008kB oom_score_adj:975
Test: [  303.223702] Out of memory: Killed process 2859 (HeapTaskDaemon) total-vm:13534452kB, anon-rss:0kB, file-rss:0kB, shmem-rss:560kB, UID:10051 pgtables:1060kB oom_score_adj:965
Test: [  303.478833] Out of memory: Killed process 2816 (Signal Catcher) total-vm:13524108kB, anon-rss:0kB, file-rss:0kB, shmem-rss:564kB, UID:10073 pgtables:1016kB oom_score_adj:965
Test: [  304.823796] Out of memory: Killed process 2438 (ReferenceQueueD) total-vm:13529180kB, anon-rss:0kB, file-rss:0kB, shmem-rss:568kB, UID:10015 pgtables:1056kB oom_score_adj:955
Test: [  305.226728] Out of memory: Killed process 3126 (DefaultDispatch) total-vm:13532596kB, anon-rss:0kB, file-rss:0kB, shmem-rss:528kB, UID:10019 pgtables:1064kB oom_score_adj:945
Test: [  305.935615] Out of memory: Killed process 2637 (Jit thread pool) total-vm:13523084kB, anon-rss:0kB, file-rss:0kB, shmem-rss:0kB, UID:10024 pgtables:1036kB oom_score_adj:935
Test: [  307.055895] Out of memory: Killed process 2063 (HeapTaskDaemon) total-vm:13755876kB, anon-rss:0kB, file-rss:0kB, shmem-rss:11600kB, UID:10074 pgtables:1552kB oom_score_adj:0
Test: [  307.398512] Out of memory: Killed process 2298 (rs.media.module) total-vm:13560404kB, anon-rss:12924kB, file-rss:0kB, shmem-rss:720kB, UID:10076 pgtables:1156kB oom_score_adj:-700
Test: [  309.888679] Out of memory: Killed process 1745 (droid.bluetooth) total-vm:13720424kB, anon-rss:11084kB, file-rss:0kB, shmem-rss:208kB, UID:1002 pgtables:1220kB oom_score_adj:-700
Test: [  311.050133] Out of memory: Killed process 1759 (ndroid.systemui) total-vm:13852268kB, anon-rss:26468kB, file-rss:0kB, shmem-rss:6988kB, UID:10075 pgtables:1628kB oom_score_adj:-800
Test: [  313.520057] Out of memory: Killed process 2000 (m.android.phone) total-vm:13593404kB, anon-rss:14600kB, file-rss:236kB, shmem-rss:340kB, UID:1001 pgtables:1312kB oom_score_adj:-800
Test: [  314.337744] Out of memory: Killed process 1911 (rkstack.process) total-vm:13540420kB, anon-rss:8232kB, file-rss:0kB, shmem-rss:180kB, UID:1073 pgtables:1128kB oom_score_adj:-800
Test: [  314.745542] Out of memory: Killed process 1984 (com.android.se) total-vm:13525236kB, anon-rss:6944kB, file-rss:0kB, shmem-rss:188kB, UID:1068 pgtables:1012kB oom_score_adj:-800
Test: [  315.007212] Out of memory: Killed process 677 (system_server) total-vm:15049836kB, anon-rss:1856kB, file-rss:0kB, shmem-rss:240kB, UID:1000 pgtables:2084kB oom_score_adj:-900
Change-Id: I78821bcd332af7b3f642f037faa2df15a937dc26
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-03-29 13:38:04 -07:00
Bart Van Assche b4d26bb22b lmkd: Look up cgroup attribute paths instead of hardcoding these
Retrieve cgroup attribute paths from task_profiles.json instead of
hardcoding these paths.

Bug: 213617178
Test: Tested lmkd in Cuttlefish.
Change-Id: I03f40ac8ccd4635f21432214e1acf997c505d1e9
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-03-24 15:58:02 -07:00
Bart Van Assche 16ba8bc773 statslog: Make this library compatible with the cgroups v2 hierarchy
Call memcg_apps_dir() instead of hard-coding the top-level directory of
the memcg controller.

Bug: 213617178
Test: Verified lmkd operation inside Cuttlefish.
Change-Id: I659610ebdabe3b69b0b1097aa5cf248d6f3273c5
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-03-24 15:58:00 -07:00
Bart Van Assche 911f106a4a liblmkd_utils: Use libprocessgroup to create cgroups
Bug: 213617178
Test: Ran lmkd_tests inside Cuttlefish
Change-Id: Ic34b731dfe5d6b1e90d258c2b0af538a216b054a
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-03-21 15:57:37 -07:00
Bart Van Assche 75a98b56ab lmkd: Fix a potential buffer overflow am: 5ebc4e8f51
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1972105

Change-Id: I4dca955fd118a16fc3bd1a37beeb8fe317bcbcc2
2022-02-23 18:55:06 +00:00
Bart Van Assche f9489027a1 lmkd: Use std::array<> and remove the ARRAY_SIZE() definition am: 545067957c
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1972104

Change-Id: Icb6ad2718ff8170bc457268688b9ae94e53a4c1f
2022-02-23 18:55:05 +00:00
Bart Van Assche c53ab08bf5 lmkd: Use std::min() and std::max() instead of defining min() and max() macros am: 80a3dba57a
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1972103

Change-Id: Ifd1a8218fd0d6fbb4bbca9b0cc65b39c8b0e7226
2022-02-23 18:55:04 +00:00
Bart Van Assche 5ebc4e8f51 lmkd: Fix a potential buffer overflow
Prevent that the statement that writes '\0' past the read data can write
past the end of the buffer.

Bug: 213617178
Test: Compile-tested only.
Change-Id: I6922c343a6bcb52dce0b5cf54f09b2850e9dfde2
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-02-23 17:05:11 +00:00
Bart Van Assche 545067957c lmkd: Use std::array<> and remove the ARRAY_SIZE() definition
Using ARRAY_SIZE() on a pointer yields 1 while applying .size() to a
pointer triggers a compiler error. Hence use .size() instead of
ARRAY_SIZE().

Bug: 213617178
Test: Compile-tested only.
Change-Id: Ie0f9740f59470c943f8d62b9475f7f987ed8707b
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-02-23 17:05:11 +00:00
Bart Van Assche 80a3dba57a lmkd: Use std::min() and std::max() instead of defining min() and max() macros
std::min() and std::max() check whether the argument types match but
min() and max() not. Hence switch to std::min() and std::max().

Bug: 213617178
Test: Compile-tested only.
Change-Id: Iaf1f63360c9360938db56d485dbd1e504129c52d
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-02-23 17:05:10 +00:00
Suren Baghdasaryan 58fa91d0cf lmkd: Log psi averages in killinfo reports am: 014dd7156e
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1992291

Change-Id: I4c0d6094b137cb996d48f07bd528db4c346d1ee1
2022-02-22 19:47:43 +00:00
Suren Baghdasaryan 744462fdf0 lmkd: Allow killing perceptible apps when recorded stall is too high am: 5ae47a9563
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1992290

Change-Id: I5f5c75c6673b9d72b18a1730cf3e5a9c34c9562c
2022-02-22 11:19:32 +00:00
Suren Baghdasaryan 014dd7156e lmkd: Log psi averages in killinfo reports
Add psi memory, io and cpu 10sec averages into killinfo reports.

Bug: 205182133
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ifbcf47cab291fb20dbf0b5d32f1965f4e6462b49
2022-02-21 20:30:50 -08:00
Suren Baghdasaryan 5ae47a9563 lmkd: Allow killing perceptible apps when recorded stall is too high
When system is under heavy memory pressure the system might be able
to keep free memory above the min watermark avoiding perceptible app
kills. In such situation system might end up using all its cpu
capacity on memory reclaim and not doing productive work. To detect
this condition, check memory full stall and compare it with the new
ro.lmk.stall_limit_critical tunable representing the stall threshold.
When the recorded level is over ro.lmk.stall_limit_critical, lmkd will
be allowed to kill perceptible apps. ro.lmk.stall_limit_critical
represents the max memory full stall in % that is allowed before
perceptible apps will get killed. By default it is set to 100%, which
effectively disables the feature.
Currently system stall is measured based on psi memory stall 10s average
value, however this definition might change in the future if better
metrics are developed. Setting ro.lmk.stall_limit_critical to 5 means
the system should be fully stalled (no productive work is done) for 5%
of the 10sec period, resulting in 0.5 sec loss due to the stall.

Bug: 205182133
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I9713e30d82641d86d1b7edb5e1ba2971b935c898
2022-02-21 20:27:45 -08:00
Xin Li 2a6c586684 Empty merge of sc-v2-dev-plus-aosp-without-vendor@8084891
Bug: 214455710
Merged-In: I56a55834582e11c06cc6cf9da3bc7380e634b301
Change-Id: I797ed9d8872a2bdef27a9f2e4053874f88bdd56c
2022-02-11 06:17:36 +00:00
Suren Baghdasaryan 99cb321008 lmkd/tests: Consume memory more aggressively to avoid test timeout am: 2bf5487381
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1972099

Change-Id: I16cbef5d2680d974604c27b5940c5dadaf9395e9
2022-02-04 00:26:37 +00:00
Suren Baghdasaryan 2bf5487381 lmkd/tests: Consume memory more aggressively to avoid test timeout
Increase the allocation step to 5MB and decrease the delay between
allocations to 200ms in order to speed up memory consumption and
avoid the test timing out.

Bug: 217478668
Test: atest lmkd_tests:lmkd_tests.LmkdTest#TargetReaping -- --abi x86_64
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ia36229b280d79acd9d93a5ca1961d6cf1ef223df
2022-02-03 14:53:00 -08:00
Suren Baghdasaryan baeb509b2e lmkd/tests: Move tests into presubmit-large category to avoid timeouts am: c58acac201
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1969139

Change-Id: I5adb706b3a6f70bdded22a11ca3eb3709573554e
2022-02-02 19:44:08 +00:00
Suren Baghdasaryan c58acac201 lmkd/tests: Move tests into presubmit-large category to avoid timeouts
Since lmkd tests require time to build up memory pressure, they cause
timeouts when run as part of presubmits. Move them into the
presubmit-large category with higher timeout to prevent such failures.

Bug: 217478668
Bug: 203597692
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I690133c9f849da58b85884a7d7b463f5b518c12f
2022-02-02 09:27:47 -08:00
Suren Baghdasaryan 4805030ba6 lmkd/tests: Add a test to check for lmkd process reaping capability am: 683d6cbc2d
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1964686

Change-Id: I87df80195eb51d156930e98d3ae862fe4a40cd12
2022-02-02 01:58:40 +00:00
Suren Baghdasaryan 683d6cbc2d lmkd/tests: Add a test to check for lmkd process reaping capability
Add a test to verify a process killed by lmkd is being reaped when
kernel supports process_mrelease syscall.

Bug: 203597692
Test: atest LmkdTest
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Iac46f68c811e6e89378952ce1d29daf8a47514e2
2022-02-01 11:40:47 -08:00
Suren Baghdasaryan a734b3bff1 lmkd: Set task profiles to the entire process am: 2bdf7f0c74
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1956501

Change-Id: I752c7df4c1bc4fe9867f88da95081949eaaa51b3
2022-01-25 05:32:53 +00:00
Suren Baghdasaryan 2bdf7f0c74 lmkd: Set task profiles to the entire process
set_process_group_and_prio sets task profiles for each thread in the
process separately. This can be avoided by setting task profiles to
the entire process using its pid.

Bug: 215557553
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I9c1917172019a42809385f6c9c084b8cb343b520
2022-01-24 13:43:42 -08:00
Yi Kong 7fb6b9cfb3 Turn on AFDO for lmkd am: edd3325830
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1951041

Change-Id: Iedc6b4d34d9489a66807d791261b4fa909cfab02
2022-01-18 21:16:51 +00:00
Yi Kong edd3325830 Turn on AFDO for lmkd
Enable PGO (profile guided optimisation) for better performance.

Bug: 195134194
Bug: 175205560
Test: presubmit
Change-Id: I97fb9945bfe9afa3396b850518fadaf7b9f38eaa
2022-01-17 07:36:59 +00:00
Suren Baghdasaryan bdb7ccf532 lmkd: Implement watchdog thread am: af1b0e0627 am: ac20c53b63 am: c871dc1afc
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1894200

Change-Id: I13e24f1b7dfe92359d56344e133843f0f64cec4e
2022-01-06 22:39:07 +00:00
Suren Baghdasaryan 4253f17b9d lmkd: Use process_mrelease to reap the target process from a thread am: 7c3addb2a1 am: c4067fc9f2 am: 0fee08b289
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1904583

Change-Id: I24dc3a14edb46028b1768b7e5e9244a48559216d
2022-01-06 22:39:06 +00:00
Suren Baghdasaryan c871dc1afc lmkd: Implement watchdog thread am: af1b0e0627 am: ac20c53b63
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1894200

Change-Id: I66fc6bd55480517fd1374e376476ffef174f6679
2022-01-06 22:24:04 +00:00
Suren Baghdasaryan 0fee08b289 lmkd: Use process_mrelease to reap the target process from a thread am: 7c3addb2a1 am: c4067fc9f2
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1904583

Change-Id: I224057073a3fd0c569eb5803eb2c56710b01fc77
2022-01-06 22:24:03 +00:00
Suren Baghdasaryan ac20c53b63 lmkd: Implement watchdog thread am: af1b0e0627
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1894200

Change-Id: Ic96fb2bed49eb019d8163cd31671beb3176afd43
2022-01-06 22:02:58 +00:00
Suren Baghdasaryan c4067fc9f2 lmkd: Use process_mrelease to reap the target process from a thread am: 7c3addb2a1
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1904583

Change-Id: I21a13a46890d2eee9ddd66cbeaec1c8f3e9317f4
2022-01-06 22:02:57 +00:00
Suren Baghdasaryan af1b0e0627 lmkd: Implement watchdog thread
To detect lmkd being stuck on a syscall for prolonged period of time,
introduce a watchdog thread which gets set when lmkd starts handling of
events and is reset after handling is done. If it takes more than the
timeout period (2 sec) to handle an event, watchdog wakes up and kills
the least important process to prevent mounting memory pressure caused
by lmkd lockup. After a kill, watchdog will wait for the reset for
another timeout period and kill again. This repeats until lmkd unlocks
and resets the watchdog.

Bug: 201671997
Test: induce random sleep in lmkd main handler and observe watchdog kills
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I56a55834582e11c06cc6cf9da3bc7380e634b301
2022-01-06 18:14:25 +00:00
Suren Baghdasaryan 7c3addb2a1 lmkd: Use process_mrelease to reap the target process from a thread
process_mrelease syscall can be used to expedite memory release of
a process after it was killed. This allows memory to be released
without the target process being scheduled, therefore does not depend
on target's priority or the CPU it's running on.
However process_mrelease syscall can take considerable time. Blocking
lmkd main thread during that time can cause memory pressure events
being missed while lmkd is busy reaping previous target's memory.
For this reason reaping should be done in a separate thread. This way
lmkd main thread can keep monitoring memory pressure while memory is
being released.
Introduce Reaper class which maintains a pool of threads to perform
process killing and reaping. The main thread submits a request to the
Reaper to kill and reap the process without blocking. If all the threads
in the pool are busy at the time the next kill is needed, the kill is
performed by the main thread without reaping.

Bug: 130172058
Bug: 189803002
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: If7b10fdd1838bdfeea3fed3031565feffe0b52be
2022-01-06 18:14:14 +00:00
Suren Baghdasaryan 57cdc19e34 [automerger skipped] lmkd: Do not re-initialize lmkd when persistent properties are loaded am: aced711991 -s ours am: 2b9d78486a -s ours am: 521ecf770e -s ours
am skip reason: Merged-In Iba34fc719a18d58b890549c7415bec869d471901 with SHA-1 fcb9cb6de4 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/memory/lmkd/+/15738844

Change-Id: Ic8216d7b3cbf98eb4f3d8629056d177b8a4e4224
2021-12-22 21:01:50 +00:00
Suren Baghdasaryan 9a5d09e4f7 [automerger skipped] lmkd: Add support for persist.device_config.lmkd_native.* properties am: b91ecaa3e8 -s ours am: e01b07d4a7 -s ours am: 4056ed3b29 -s ours
am skip reason: Merged-In Ia48fd51eab126d307a1604530b642e86cf250688 with SHA-1 e7d82ee7e7 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/memory/lmkd/+/15738843

Change-Id: I91db060dc84b1d403c21f8cff24b4f0c32d01ab4
2021-12-22 21:01:49 +00:00
Suren Baghdasaryan 521ecf770e [automerger skipped] lmkd: Do not re-initialize lmkd when persistent properties are loaded am: aced711991 -s ours am: 2b9d78486a -s ours
am skip reason: Merged-In Iba34fc719a18d58b890549c7415bec869d471901 with SHA-1 fcb9cb6de4 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/memory/lmkd/+/15738844

Change-Id: I64fbffc972ef685cb42314ae9c272165b7735eae
2021-12-22 20:51:46 +00:00
Suren Baghdasaryan 4056ed3b29 [automerger skipped] lmkd: Add support for persist.device_config.lmkd_native.* properties am: b91ecaa3e8 -s ours am: e01b07d4a7 -s ours
am skip reason: Merged-In Ia48fd51eab126d307a1604530b642e86cf250688 with SHA-1 e7d82ee7e7 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/memory/lmkd/+/15738843

Change-Id: I05a07bc6ccd42c8cb809bfed6863d2992ae97371
2021-12-22 20:51:45 +00:00
Suren Baghdasaryan 3ffa7f5391 [automerger skipped] lmkd: Do not re-initialize lmkd when persistent properties are loaded am: aced711991 -s ours am: 2b9d78486a -s ours am: 931bf0954f -s ours
am skip reason: Merged-In Iba34fc719a18d58b890549c7415bec869d471901 with SHA-1 fcb9cb6de4 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/memory/lmkd/+/15738844

Change-Id: I8b849ade888210c334e1e1bdc783c906094d520d
2021-12-22 20:34:06 +00:00
Suren Baghdasaryan 6cba2d654c [automerger skipped] lmkd: Add support for persist.device_config.lmkd_native.* properties am: b91ecaa3e8 -s ours am: e01b07d4a7 -s ours am: 4fe0d250e8 -s ours
am skip reason: Merged-In Ia48fd51eab126d307a1604530b642e86cf250688 with SHA-1 e7d82ee7e7 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/memory/lmkd/+/15738843

Change-Id: I5e0b25a603424ac0e2c22839704c212e0b6a0133
2021-12-22 20:34:05 +00:00
Suren Baghdasaryan 931bf0954f [automerger skipped] lmkd: Do not re-initialize lmkd when persistent properties are loaded am: aced711991 -s ours am: 2b9d78486a -s ours
am skip reason: Merged-In Iba34fc719a18d58b890549c7415bec869d471901 with SHA-1 fcb9cb6de4 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/memory/lmkd/+/15738844

Change-Id: Ic3c8969383c707767e286ba25cfb15f747aa5a7b
2021-12-22 20:29:15 +00:00
Suren Baghdasaryan 4fe0d250e8 [automerger skipped] lmkd: Add support for persist.device_config.lmkd_native.* properties am: b91ecaa3e8 -s ours am: e01b07d4a7 -s ours
am skip reason: Merged-In Ia48fd51eab126d307a1604530b642e86cf250688 with SHA-1 e7d82ee7e7 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/memory/lmkd/+/15738843

Change-Id: Ic9aa0f37cb0f0b8d6bb8440a921965030f3a9fbc
2021-12-22 20:29:13 +00:00
Suren Baghdasaryan 2b9d78486a [automerger skipped] lmkd: Do not re-initialize lmkd when persistent properties are loaded am: aced711991 -s ours
am skip reason: Merged-In Iba34fc719a18d58b890549c7415bec869d471901 with SHA-1 fcb9cb6de4 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/memory/lmkd/+/15738844

Change-Id: Ic644b480d12e69b2a4efa4625c3c30dcbac4f616
2021-12-22 20:26:03 +00:00
Suren Baghdasaryan e01b07d4a7 [automerger skipped] lmkd: Add support for persist.device_config.lmkd_native.* properties am: b91ecaa3e8 -s ours
am skip reason: Merged-In Ia48fd51eab126d307a1604530b642e86cf250688 with SHA-1 e7d82ee7e7 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/memory/lmkd/+/15738843

Change-Id: I2379d168b62945e550bf521f8100454b8cf6a3f2
2021-12-22 20:26:00 +00:00
liuhailong 0ea9a37079 lmkd: Fix lowmem_minfree out of bounds am: cf8af501dc am: 53df06cdf1 am: 986595819d
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1908669

Change-Id: Idd0176344f3d3a96cb972dd695ade200c1013a15
2021-12-07 03:23:35 +00:00
liuhailong 986595819d lmkd: Fix lowmem_minfree out of bounds am: cf8af501dc am: 53df06cdf1
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1908669

Change-Id: I203fb9b1d0719c4fb8fccda44d48dc468b3927cf
2021-12-07 03:07:50 +00:00
liuhailong 53df06cdf1 lmkd: Fix lowmem_minfree out of bounds am: cf8af501dc
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1908669

Change-Id: Ie928b2d3c3882dafcf591a0487eb73c0d3b0b73a
2021-12-07 02:52:13 +00:00
liuhailong cf8af501dc lmkd: Fix lowmem_minfree out of bounds
lmkd daemon launches before system_server. If lowmem_targets_size
does not initialize by system_server, the value will be zero.
Before system_server starts lmkd receives a psi event
and debug_process_killing on, the lmkd crashes here.

Bug: 209090314
Signed-off-by: liuhailong <liuhailong@oppo.com>
Change-Id: I0736a882ed1ff5eee2b07676ae590a2cb2a7721c
2021-12-04 17:59:24 +08:00
Suren Baghdasaryan d3677b36ef lmkd: fix low swap threshold failing to update after reinit am: 6e6d14b387 am: 07de899509 am: 6d2d6d4d62 am: ac36e3a50a
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1874517

Change-Id: Id29a68a3ca01890be656f3cbfe4c8e99e6e83b96
2021-10-28 23:47:20 +00:00