FQName::FQName(string) could leave the FQName in an
invalid state, and so this constructor is being removed
and the mValid member is being removed.
Bug: 73774955
Test: boots + interface_start control messages received by init
Change-Id: I58d4a089c0a0f1c2cc5129c5e87321e7f6663b72
Get rid of trailing newlines as they just take wasted space.
Added a missing strerror(error) expansion for failure to open.
Test: compile
Bug: 74258013
Change-Id: I04c0038e1ca53d2ffe0a78386744f12874215c19
With treble, the vendor kernel and ramdisk are supposed to be used.
But vendors always find new and interesting ways to break things:
$ cat /proc/device-tree/firmware/android/fstab/system/dev; echo
/by-name/system_a
$
Change-Id: I826a96ebd625b52563d3cc970bf99d9b26dc093e
The TrafficController inside netd also get notified when the interface
on device added or removed, and it need both ifaceName and ifaceIndex
information from Netlink event. Add the ifaceIndex in the event can
avoid the TrafficController to run if_nametoindex again when receive
the event.
Bug: 30950746
Bug: 73137611
Test: new interface show up in bpf interface map.
Change-Id: Ia3b4aeb8eff345ce7cf03ccec88f0893cfe125c0
Allow the default tag (the program name) to be overwritten.
Bug: 34867873
Test: m
Test: logging_test
Test: manual
Change-Id: I4ef32bad413a7cc82e46ce16a2f26212925964b1
By default, the build system only sets ro.adb.secure (to 1) when
building user builds.
Bug: http://b/73993211
Bug: http://b/74059119
Test: treehugger
Change-Id: I2a683257c1027394ded90c8d2634def6003e0525
adbd is copied into the recovery image without the accompanying
linker/libraries, so it must be a static executable.
Bug: http://b/74237641
Test: `file $ANDROID_PRODUCT_OUT/system/bin/adbd`
Change-Id: Ie8d0710f6002458519d3eea3d696e9016faafee8
* changes:
adb: remove meaningless const.
adb: convert Connection to a nonblocking interface.
adb: use soong version stamping.
adb: switch over to Android.bp.
Rename the existing Connection to BlockingConnection, add a nonblocking
Connection, and add an adapter between the two, to enable future work
to reduce the impedance mismatch from implementing a blocking interface
on top of nonblocking primitives.
While we're here, delete A_SYNC, and remove one layer of pipes when
sending a packet (replacing it with a condition variable when using
BlockingConnectionAdapter).
Test: python test_device.py, manually plugging/unplugging devices
Change-Id: Ieac2bf937471d9d494075575f07e53b589aba20a
* changes:
lmkd: Select in-kernel vs userspace lmk based on kernel driver presence
lmkd: Implement kill timeout
lmkd: Allow killing multiple processes to downgrade memory pressure
lmkd: Detect the highest level of vmpressure when event is detected
lmkd: Close cgroup.event_control file when done writing
lmkd: Remove stale dependency on libprocessgroup
lmkd: Add ability to trace lmkd kills
lmkd: add logic to kill the heaviest of the eligible processes
lmkd: change defaults to disable event upgrade/downgrade logic
lmkd: add ability to monitor all vmpressure events
mapSysfsString return code is checked for negativity after being casted
to unsigned enum type, which will always be false. This is obviously
unintended behaviour.
Fixes tautological-unsigned-enum-zero-compare warning.
Bug: 72331526
Test: m
Change-Id: Icec76d7a1121cb56fd9d05feb70cede69954c322
(cherry pick from commit 979591b627)
Currently selection criteria for in-kernel vs userspace lmk is kernel
driver presence and device not being a Go device. This change removes
Go device check leaving kernel driver presence to be the only selection
criteria.
Bug: 71502948
Change-Id: I394a7920433a8d090e207ea86296356413a63fe7
Merged-In: I394a7920433a8d090e207ea86296356413a63fe7
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
(cherry pick from commit caa2dc56fd)
New ro.lmk.kill_timeout_ms property defines timeout in ms after a
successful kill cycle for more kills to be considered. This is
necessary because memory pressure after a kill does not go down
instantly and system needs time to reflect new memory state. This
timeout prevents extra kills in the period immediately after a
kill cycle. By default it is set to 0 which disables this feature.
Bug: 63631020
Test: alloc-stress
Change-Id: Ia847118c8c4a659a7fc38cd5cd0042acb514ae28
Merged-In: Ia847118c8c4a659a7fc38cd5cd0042acb514ae28
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
(cherry pick from commit 65f54a2665)
Record free memory at low vmpressure levels and whenever pressure
increases beyond low free up enough memory to downgrade memory pressure
to low. This is done by freeing enough memory to get to the max free
memory levels seen during low vmpressure.
The kill logic for Go devices is not changed as these devices are designed
to operate under high memory pressure.
Bug: 63631020
Test: alloc-stress
Change-Id: Ic8396eee08013b1c709072a13525601d5c8bf1f1
Merged-In: Ic8396eee08013b1c709072a13525601d5c8bf1f1
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
(cherry pick from commit e82e15c242)
lmkd checks for vmpressure events using epoll_wait() with eventfds of
all registered events. It's possible that multiple events of different
priorities happen before epoll_wait() returns. For these cases we
use conservative approach by assuming that the system is under the
highest registered vmpressure levels. This speeds up lmkd response time
to high memory pressure by not responding to possibly stale low pressure
levels when vmpressure rises quickly.
Bug: 63631020
Test: alloc-stress
Change-Id: I79a85c3342e7e1b3a3be82945266b2cc60b437cf
Merged-In: I79a85c3342e7e1b3a3be82945266b2cc60b437cf
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
(cherry pick from commit 1bd2fc4fb6)
After events are specified by writing into cgroup.event_control file
the file should be closed.
Change-Id: Id015e6a7bac2b74bbc8d8793c85f529ee00bdf55
Merged-In: Id015e6a7bac2b74bbc8d8793c85f529ee00bdf55
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
(cherry pick from commit c71355991d)
For tracing lmkd kills inside kernel it is useful to have traces
indicating when and which process lmkd is killing. By default the
tracing is disabled.
Bug: 63631020
Test: alloc-stress
Change-Id: I3ceb2bde0c292eec55855cb4535927f3b4c5d08b
Merged-In: I3ceb2bde0c292eec55855cb4535927f3b4c5d08b
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
(cherry pick from commit 662492ab1d)
Killing the most memory-demanding process from the set of eligible
processes yields better results on high-performance devices than
killing the first one we could find. This is in line with how in-kernel
lowmemorykiller driver chooses its victims.
Bug: 63631020
Test: alloc-stress
Change-Id: Ie1ef7f33f3e79698a9b4120c14490386d6129f9b
Merged-In: Ie1ef7f33f3e79698a9b4120c14490386d6129f9b
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
(cherry pick from commit ad2fd9150b)
vmpressure upgrade/downgrade logic based on swap utilization works well
for low memory devices because of a small swap size, however for high
performance devices this measure is not a good indication of the memory
pressure because of large swap resources. This change sets the default
levels to disable upgrade/downgrade logic by default and each device
can set these properties appropriately.
Bug: 63631020
Test: alloc-stress
Change-Id: Ifd4fbd4d6bb3e82f0f87b029df94934f1e7b1c9c
Merged-In: Ifd4fbd4d6bb3e82f0f87b029df94934f1e7b1c9c
Signed-off-by: Suren Baghdasaryan <surenb@google.com>