Commit Graph

1268 Commits

Author SHA1 Message Date
Suren Baghdasaryan 7f8da1ec36 lmkd: remove priority setting for the kill target am: 67c467d4ec
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2241693

Change-Id: Ibfb05c983d6bdd5be079f7705330377dbb095472
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-10 23:41:01 +00:00
Suren Baghdasaryan c6753329a2 lmkd: measure free swap as available and easily reclaimable memory am: 495db5c643
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2233052

Change-Id: I6436a866b2043a35c624c19ac705fe145e8b7e15
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-10 21:56:51 +00:00
Suren Baghdasaryan 67c467d4ec lmkd: remove priority setting for the kill target
Setting cpusets and priorities for the kill target involves fs operations
which can block on kernel internal locks. Doing that from lmkd main thread
context has the danger of blocking lmkd. With the introduction of the
reaper threads the time for the target to exit is not as critical since
its memory is freed by the reaper thread.
To prevent lmkd from being blocked, move setting cpuset for the kill
target into the reaper thread and remove priority setting logic with
heavy use of procfs reads.

Bug: 238495258
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I5defc6baa4ff1425d9835371b47a64e375ebac10
2022-10-10 17:47:40 +00:00
Suren Baghdasaryan 495db5c643 lmkd: measure free swap as available and easily reclaimable memory
In the case of ZRAM, SwapFree does not represent the actual free swap
amount because swap space is taken from the free memory or reclaimed.
Therefore use free memory and easily reclaimable memory as an
approximation of how much free swap system can use. Use SwapFree as
a measure of how much swap space the system will consider using. Min
of those two measurements is used to decide how much usable swap the
system still has.

Bug: 238495258
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ia7b0cc4a744d14c0d6e52603795917cf5824ea15
2022-10-04 12:53:23 -07:00
Suren Baghdasaryan d5dbec8d23 lmkd: Fix UAF caused by calling pid_remove() from the watchdog thread am: ba9ea6e3d6
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2235075

Change-Id: I6c720544601c84096a70f9e06d96a46f8973768b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-29 18:09:27 +00:00
Suren Baghdasaryan ba9ea6e3d6 lmkd: Fix UAF caused by calling pid_remove() from the watchdog thread
pid_remove() is not a thread-safe function and can be called only from
the main thread. Calling it from the watchdog_callback() executed in the
context of the watchdog thread can cause a use-after-free failure if the
same record is being used by the main thread. Fix this issue by marking
the process record as invalid instead of destroying it. Later on invalid
records will be cleared in kill_one_process() called from the context of
the main thread.

Fixes: f8727745f9 ("lmkd: Remove process record after it is killed by lmkd watchdog")
Bug: 248448498
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I0c7776aea1518c17f0a29904a44b7fe8f33980ca
2022-09-27 14:30:34 -07:00
Suren Baghdasaryan 733be36274 lmkd: Remove process record after it is killed by lmkd watchdog am: c555ec6eeb
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2193801

Change-Id: I450caf1f6b317d003bbaeefce35c11f36aa4ba74
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-24 16:06:33 +00:00
Suren Baghdasaryan c555ec6eeb lmkd: Remove process record after it is killed by lmkd watchdog
After lmkd watchdog kills a process, its record should be removed.

Bug: 243567425
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I70bb2a432df8088ebc9865fbc36b065738248d19
2022-08-23 15:28:53 -07:00
Ioannis Ilkos f8727745f9 Remove kill_one_process tracepoint from lmkd am: b9d0592bba
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2175442

Change-Id: I1fe55a6a05eae1be2e7acb76d71e8c2f280560ce
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-08 18:29:13 +00:00
Ioannis Ilkos b9d0592bba Remove kill_one_process tracepoint from lmkd
We already emit a richer slice (including pid and oom score) so there's
no reason for the additional print event

Bug: 195085238
Change-Id: I1140f0287934e5f0abdeeb64554a249c4c940def
2022-08-04 14:45:24 +01:00
Ken Chen dd131835e9 Merge "Rename gpu_mem.o to gpuMem.o" am: 310fa3ab1b
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2147763

Change-Id: If29b92d5706323d83b8f4c1098e680f1c0f93a67
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 22:21:40 +00:00
Ken Chen 310fa3ab1b Merge "Rename gpu_mem.o to gpuMem.o" 2022-07-21 13:43:50 +00:00
Treehugger Robot db9a391406 Merge "lmkd: Add clang-format upload hook" am: 8b4ad27706
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2154453

Change-Id: I9c568f2690cfca9f3e469a54f62718920b39c2db
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-14 20:45:46 +00:00
Treehugger Robot 8b4ad27706 Merge "lmkd: Add clang-format upload hook" 2022-07-14 20:26:12 +00:00
Kalesh Singh 08bb956823 lmkd: Add clang-format upload hook
Check code formatting on upload.

Bug: N/A
Test: repo upload
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Change-Id: I7c849655539ac60e48cf2b4c25b33a1d222a6cfe
2022-07-14 11:18:20 -07:00
Ken Chen 4c18e91f22 Rename gpu_mem.o to gpuMem.o
Underscore character may cause bpf prog/map naming collision. For
example, x.o with map y_z and x_y.o with map z both result in x_y_z
prog/map name, which should be prevented during compile-time.

aosp/2147825 will prohibit underscore character in bpf source name
(source name derives the obj name). Existing bpf modules with underscore
characters in source name need to be updated accordingly.

Bug: 236706995
Test: adb root; adb shell ls -l /sys/fs/bpf/ | grep gpuMem
Change-Id: I213624e59ce1bca6ee7c22028504f2d51e9c50df
2022-07-08 19:09:50 +08:00
Yuming Han f3f9ff6e01 lmkd : Fixed running wrong for Go devices when use_minfree_levels is TRUE am: ed8fc168e6
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2144719

Change-Id: I5b112f62879b9b577bdeb61939e629984e172f5a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 18:45:02 +00:00
Yuming Han ed8fc168e6 lmkd : Fixed running wrong for Go devices when use_minfree_levels is TRUE
The lmkd run wrong for Go devices, because min_score_adj is unused
when use_minfree_levels is set TURE.

Bug: 237947900
Signed-off-by: Yuming Han <yuming.han@unisoc.com>
Change-Id: I717561cd9e5f4d1a2ca60d9fc84adcd6e129420a
2022-07-07 18:24:22 +00:00
Suren Baghdasaryan 4a4e1590f1 lmkd: Fix the text of the warning when pthread_setschedparam fails am: 508e73e105
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2147680

Change-Id: I581e74df34e8174e5dd9b464a7b4bc0f4893711d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 18:11:12 +00:00
Suren Baghdasaryan 508e73e105 lmkd: Fix the text of the warning when pthread_setschedparam fails
Fix the text of the warning when pthread_setschedparam fails to set
SCHED_OTHER scheduling policy for a reaper thread.

Bug: 237180716
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I1b04713d145f4f3c243f16f932c753f5b06d48e6
2022-07-07 08:39:49 -07:00
Suren Baghdasaryan 94998a07dc lmkd: set normal scheduling policy for reaper threads am: 353c2f174f
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2147025

Change-Id: I7e333c8bfc132f362156d271bf1201d3a9aae8d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 01:20:20 +00:00
Suren Baghdasaryan 353c2f174f lmkd: set normal scheduling policy for reaper threads
Reaper threads can take considerable time to free target's
memory running at RT priority that they inherit from LMKD.
This might prevent other critical tasks from being scheduled
while reaper threads are active.
Explicitly set reaper threads to run under normal scheduling
policy but set their nice value to ANDROID_PRIORITY_HIGHEST.

Bug: 237180716
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Idad817e698ae1d5ac6cee5aa3281c69c7e0d257f
2022-07-06 15:21:50 -07:00
Yuming Han 800f962338 lmkd: Fixed data overflow on ARM am: 79f58c012d
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2138097

Change-Id: I522fd95dbc7acc2774e0961ae6956fd3bd827e18
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 20:08:46 +00:00
Yuming Han 79f58c012d lmkd: Fixed data overflow on ARM
Both pgscan_kwsapd and pgscan_direct are defined as unsigned long,
the overflow issues occur on ARM kernel space. Just check whether
their values changed.

Signed-off-by: Yuming Han <yuming.han@unisoc.com>
Change-Id: I73b27855ede9ca729208775e982660bae967ab92
2022-06-29 16:06:18 +08:00
Suren Baghdasaryan 150ff325ac lmkd: Fix the size of vmstat_field_names array am: caebcddf9f am: 2c75c4987c
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2132969

Change-Id: I693d2d097a08df644df33b951e4330ed2a846aed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-23 00:58:13 +00:00
Suren Baghdasaryan 2c75c4987c lmkd: Fix the size of vmstat_field_names array am: caebcddf9f
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2132969

Change-Id: Id034f3723232a95b220d3f15e4f2aa7668b26294
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-23 00:39:22 +00:00
Suren Baghdasaryan caebcddf9f lmkd: Fix the size of vmstat_field_names array
The size of the vmstat_field_names array should correspond to the number
of elements in vmstat_field enum (VS_FIELD_COUNT).

Bug: 227769256
Reported-by: Yuming Han <yuming.han@unisoc.com>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Icac2810c4efca2a07cefba6e220165ef4f194867
2022-06-22 23:10:47 +00:00
Kameron Lutes e07a5bee30 lmkd: Fix potential null dereference in hook call am: e9769f7cf3 am: 12371c792c
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2133711

Change-Id: Ib5496447d3b5667cc5f28dd3002339c5ed448350
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-22 22:04:33 +00:00
Kameron Lutes 4fb05dfe00 lmkd: Add hooks to LMKD am: 2cce3066da am: 60969b1fef
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2133710

Change-Id: If262e1cd80111a6cec8027144f9504e4042dd77f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-22 22:04:29 +00:00
Kameron Lutes 12371c792c lmkd: Fix potential null dereference in hook call am: e9769f7cf3
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2133711

Change-Id: I01aeddc9d39f351e49b3d63b09ffb10f3ab7f8ae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-22 21:45:39 +00:00
Kameron Lutes 60969b1fef lmkd: Add hooks to LMKD am: 2cce3066da
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2133710

Change-Id: I5a99f58b135fa865635c2873bae0e9eea9733815
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-22 21:45:38 +00:00
Kameron Lutes e9769f7cf3 lmkd: Fix potential null dereference in hook call
If hooks are enabled in LMKD and kill_info is not supplied to
kill_one_process, there will be a null dereference on kill_info. This
changes validates ki before dereferencing.

Bug: b/210075795
Test: cq
Change-Id: Ie81ca9bdb73a71f16dc5682c8721a557b8b094fb
Merged-In: Ie81ca9bdb73a71f16dc5682c8721a557b8b094fb
2022-06-22 03:40:33 +00:00
Kameron Lutes 2cce3066da lmkd: Add hooks to LMKD
Adds several hooks to LMKD that can be overridden by the vendor. This
allows for device specific control of LMKD when necessary.

Bug: b/210075795
Test: cq

Change-Id: Ib231743183134b05148d45d681765860da6274ae
(cherry picked from commit 2c1248381a52fc520c6cd1acfaee80818eaa9ee1)
Merged-In: Ib231743183134b05148d45d681765860da6274ae
2022-06-22 03:35:23 +00:00
Yongqin Liu 09c2245060 lmkd: fix the cgroup attribute name to MemCgroupEventControl am: bf819b5593 am: 14512ee7af
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2080181

Change-Id: I644bfe01465528f5807c3c6977e5bdebbc5528a8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 18:25:40 +00:00
Yongqin Liu 14512ee7af lmkd: fix the cgroup attribute name to MemCgroupEventControl am: bf819b5593
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2080181

Change-Id: I8d68056cbd082ac936ef6fe7e3215665622d12e4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 17:59:28 +00:00
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
전윤재 48e232df6a lmkd: Fix a comparison operation with uninitialized variable. am: f70a8a260f am: 1c09b504c8
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2073128

Change-Id: I205fd40567e6842081f2cedf15feb522b31f8478
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-27 00:41:34 +00:00
전윤재 1c09b504c8 lmkd: Fix a comparison operation with uninitialized variable. am: f70a8a260f
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2073128

Change-Id: Ifaa6bf2008bdb73e74b67ce02cc540275b99b9de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-27 00:03:53 +00: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 9b467fd0f9 lmkd: Add support for cgroups v2 memcg hierarchy am: 759943643f am: 39cde77892 am: 3b00650675
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1972106

Change-Id: I4c3c64b0a93230d925d42c0e9bef5e0b05b50cd2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-19 18:35:38 +00:00
Bart Van Assche 3b00650675 lmkd: Add support for cgroups v2 memcg hierarchy am: 759943643f am: 39cde77892
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1972106

Change-Id: Ifd4a54f22d2e1e78e84cb325532883912fd1a201
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-19 18:07:03 +00:00
Bart Van Assche 39cde77892 lmkd: Add support for cgroups v2 memcg hierarchy am: 759943643f
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1972106

Change-Id: I759a869723eb6f483e2ed58f7250d64e4fe5351b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-19 17:50:20 +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 cbe6b65f72 lmkd: Look up cgroup attribute paths instead of hardcoding these am: b4d26bb22b am: 08f4720373 am: def6a3f12f
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1990496

Change-Id: Ica6100474a8ed7dce01045ad3a5362ce4e7721ab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 22:32:33 +00:00
Bart Van Assche def6a3f12f lmkd: Look up cgroup attribute paths instead of hardcoding these am: b4d26bb22b am: 08f4720373
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1990496

Change-Id: I4d84abb1687325d3e153fe6dc59de6dd5c5bfd3d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 22:15:26 +00:00
Bart Van Assche 08f4720373 lmkd: Look up cgroup attribute paths instead of hardcoding these am: b4d26bb22b
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1990496

Change-Id: Idd2fa5330216242e8e99c60811c0beb57d970752
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 21:53:03 +00:00
Bart Van Assche 51feb261e5 statslog: Make this library compatible with the cgroups v2 hierarchy am: 16ba8bc773 am: d3401c8ae9 am: aac55955a2
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1975449

Change-Id: I32ab72a005ff992beb9b1daf3b4c07164deea799
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 17:38:23 +00:00
Bart Van Assche aac55955a2 statslog: Make this library compatible with the cgroups v2 hierarchy am: 16ba8bc773 am: d3401c8ae9
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1975449

Change-Id: Ic144cf22d834ef77774a2c6f7287d031cf53a993
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 17:17:08 +00:00
Bart Van Assche d3401c8ae9 statslog: Make this library compatible with the cgroups v2 hierarchy am: 16ba8bc773
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/1975449

Change-Id: I7594f669aa8902b6b066a4a11689faadf08911d4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 16:59:36 +00: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