Commit graph

39299 commits

Author SHA1 Message Date
Tom Cherry
e36416bd8e Merge "Introduce property types" am: a0ffad60ef am: 3657c80c79
am: cc0ce9b582

Change-Id: I5e2080cf60e49b38269b35ce57a0f998bbf40abb
2018-01-18 02:34:55 +00:00
Jaekyun Seok
e9ea9f1e22 Merge "Apply the whitelist of actionable system properties" am: 2c4f487dfb
am: b759ceeb62

Change-Id: Idc608c75a2f95309b73e4cd2a404cbf8e9d7ad1d
2018-01-18 02:26:25 +00:00
Tom Cherry
cc0ce9b582 Merge "Introduce property types" am: a0ffad60ef
am: 3657c80c79

Change-Id: Ifb5916d3ed40d44acf89e7a55b39a3d94f0908f9
2018-01-18 02:25:56 +00:00
Jaekyun Seok
b759ceeb62 Merge "Apply the whitelist of actionable system properties"
am: 2c4f487dfb

Change-Id: I4668917ec7e27640a95a577e816afd72f37db91f
2018-01-18 02:17:02 +00:00
Tom Cherry
3657c80c79 Merge "Introduce property types"
am: a0ffad60ef

Change-Id: Ideb5035d125c541eb763ab5ffde97f899778b25e
2018-01-18 02:16:35 +00:00
Suren Baghdasaryan
65f54a2665 lmkd: Allow killing multiple processes to downgrade memory pressure
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
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-01-17 17:23:41 -08:00
Suren Baghdasaryan
e82e15c242 lmkd: Detect the highest level of vmpressure when event is detected
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
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-01-17 17:05:42 -08:00
Suren Baghdasaryan
1bd2fc4fb6 lmkd: Close cgroup.event_control file when done writing
After events are specified by writing into cgroup.event_control file
the file should be closed.

Change-Id: Id015e6a7bac2b74bbc8d8793c85f529ee00bdf55
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-01-17 17:03:09 -08:00
Suren Baghdasaryan
b333f83481 lmkd: Remove stale dependency on libprocessgroup
Remove stale dependencies and header file inclusions

Change-Id: Ic0e7adb5bd2a0832937a831b6918e52ace4ad46a
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-01-17 17:02:27 -08:00
Suren Baghdasaryan
334d2187e4 Merge "lmkd: Add ability to trace lmkd kills" 2018-01-18 00:53:51 +00:00
Suren Baghdasaryan
c71355991d lmkd: Add ability to trace lmkd kills
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
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-01-17 16:52:23 -08:00
Roshan Pius
9e555f6628 Merge "fs_config: Move hostapd to /vendor/bin/hw" 2018-01-18 00:49:19 +00:00
Suren Baghdasaryan
3fc73759e9 Merge "lmkd: add logic to kill the heaviest of the eligible processes" 2018-01-18 00:35:23 +00:00
Suren Baghdasaryan
b4cbe9f232 Merge "lmkd: change defaults to disable event upgrade/downgrade logic" 2018-01-18 00:32:59 +00:00
TreeHugger Robot
32a23b3b7a Merge changes from topic "storaged_health"
* changes:
  storaged: use health HAL to read StorageInfo.
  storaged: use health HAL to read DiskStats.
  storaged: storaged_t replace initHealthService with init.
  storaged: use get_health_service
2018-01-17 22:55:25 +00:00
Treehugger Robot
2c4f487dfb Merge "Apply the whitelist of actionable system properties" 2018-01-17 21:57:08 +00:00
Tom Cherry
a0ffad60ef Merge "Introduce property types" 2018-01-17 21:01:33 +00:00
Jaekyun Seok
eeb2188554 Apply the whitelist of actionable system properties
This whitelist will be applied only when
ro.actionable_compatible_property.enabled is true.

Bug: 38146102
Test: tested on walleye with ro.actionable_compatible_property.enabled=true
Change-Id: Ifd7211396b53e50a06d79e7c67224e2b38ef7c9d
2018-01-18 04:38:01 +09:00
Christopher Ferris
ecb39c8f70 Merge "Find first non-zero jit debug entry." am: 765516ecaf am: 422fafeb40
am: 52014040fa

Change-Id: If97296b4665af6e99959951c6cad02b543a96fcb
2018-01-17 18:16:02 +00:00
Christopher Ferris
52014040fa Merge "Find first non-zero jit debug entry." am: 765516ecaf
am: 422fafeb40

Change-Id: I48ec0e9381c8d4018e15ea47f015409a53643810
2018-01-17 18:13:31 +00:00
Christopher Ferris
422fafeb40 Merge "Find first non-zero jit debug entry."
am: 765516ecaf

Change-Id: I3d2993b20e3ed791c24e8372c8694b3cc3d96312
2018-01-17 18:11:28 +00:00
Christopher Ferris
765516ecaf Merge "Find first non-zero jit debug entry." 2018-01-17 18:07:55 +00:00
Justin Yun
93b1df1cd1 Merge "Add VNDK version suffix in ld.config.txt on build time." am: 447280cea0 am: 3060be356f
am: 5a31c03fa6

Change-Id: Ie58dca02b6f267b882b8f1f59cda57c141c8892c
2018-01-17 08:00:29 +00:00
Justin Yun
5a31c03fa6 Merge "Add VNDK version suffix in ld.config.txt on build time." am: 447280cea0
am: 3060be356f

Change-Id: I60f8d5752449577c7806e73e94331c62d6d5f91e
2018-01-17 07:57:55 +00:00
Justin Yun
3060be356f Merge "Add VNDK version suffix in ld.config.txt on build time."
am: 447280cea0

Change-Id: Id4e165610e03ca7b8f0bc9aca781382f48f2cd1c
2018-01-17 07:55:22 +00:00
Justin Yun
447280cea0 Merge "Add VNDK version suffix in ld.config.txt on build time." 2018-01-17 07:49:52 +00:00
Yifan Hong
845e35bdc3 storaged: use health HAL to read StorageInfo.
Test: storaged unit tests
Bug: 68388678

Change-Id: Iec395a33bac72f49366e8c30ea7e709c8acdcfa2
2018-01-16 19:25:01 -08:00
Yifan Hong
c4b46e0ad9 storaged: use health HAL to read DiskStats.
Test: storaged unit tests
Bug: 68388678
Change-Id: I03ce3aa71fb54ae40489c7b35973cd4b83b13bfb
2018-01-16 19:24:54 -08:00
Yifan Hong
4a43bdc5f5 storaged: storaged_t replace initHealthService with init.
storaged_t has more fields that depend on the health service;
they should be initialized in the new init() function.

Test: storaged unit tests

Change-Id: I70d41e5d0a0ef20c39c41c7539a284937bd21ad5
2018-01-16 19:19:37 -08:00
Justin Yun
cbbf195e46 Add VNDK version suffix in ld.config.txt on build time.
As we use different ld.config.txt per version, we don't need to
substitute the VNDK_VER on run time.
Remove all ${VNDK_VER} from the linker namespace configuration files.

Bug: 70603313
Test: build and boot GSI for walleye and sailfish
Change-Id: Ief8aee5c3308b2462cafaffc2423deda4e51a7bb
2018-01-17 12:14:25 +09:00
Yifan Hong
70c44e7a6a storaged: use get_health_service
Test: storaged unit tests
Bug: 68388678
Change-Id: I67100a9a0ad27f9e5b8fc077ff83c442e2bebe71
2018-01-16 18:05:19 -08:00
Badhri Jagan Sridharan
5e1a0ca634 Initial commit for usb daemon
usbd checks whether adb is enabled by default, if yes,
would start adbd and would call into usb hal to configure
usb gadget stack.

Bug: 63669128
Test: Verify that adb gets configured when enabled
Change-Id: If6d06cdadd6d93f181d56619142cbbb04d39a5cd
2018-01-16 18:03:58 -08:00
Oscar Shu
128274a3f2 Merge "Firmware dump create directory" am: da007e0deb am: b4d9751eab
am: b8deb4de2f

Change-Id: I3eba1b745d75d8cc0a3eba7cf0fea7ad54b992c2
2018-01-17 00:09:03 +00:00
Oscar Shu
b8deb4de2f Merge "Firmware dump create directory" am: da007e0deb
am: b4d9751eab

Change-Id: I452c4800421d6125de0b640933892946ca71dd2d
2018-01-17 00:06:25 +00:00
Oscar Shu
b4d9751eab Merge "Firmware dump create directory"
am: da007e0deb

Change-Id: I5b716bb31477fa958e49c32b8dd82a533fb935e5
2018-01-17 00:04:27 +00:00
Oscar Shu
da007e0deb Merge "Firmware dump create directory" 2018-01-16 23:57:15 +00:00
Suren Baghdasaryan
662492ab1d lmkd: add logic to kill the heaviest of the eligible processes
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
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-01-16 15:42:33 -08:00
Suren Baghdasaryan
ad2fd9150b lmkd: change defaults to disable event upgrade/downgrade logic
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
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-01-16 15:42:25 -08:00
Christopher Ferris
ed37aca987 Find first non-zero jit debug entry.
Sometimes a process will have multiple shared libraries loaded
that have defined __jit_debug_descriptor. Specifically, art testing
will load libart.so and libartd.so, which would have broken unwinding
through jit'd code for art testing if libart.so winds up being found first.
In order to avoid duplicating the code for the linker to figure out
which one is live, change the algorithm to find the first non-zero
first_entry_ set in __jit_debug_descriptor.

Bug: 68396769

Test: Passes unit tests.
Test: Verified this can unwind 137-cfi on arm/arm64.
Change-Id: Ic4d403065d2c6f22476ef0171e7add17cd1464cd
2018-01-16 14:59:51 -08:00
Tom Cherry
927c5d5fdc Introduce property types
Properties right now can take any format, but that makes it hard to
specify an API for these properties as Treble intends to do.
Therefore this change introduces the idea of property types, described below.

1) 'string' this is the default type and allows any property to be set.
2) 'bool' this allows only boolean values (true|false|1|0)
3) 'int' and 'uint' these allow signed and unsigned integer values
respectively.
4) 'double' this allows floating point numbers with double precision.
5) 'size' this allows for strings matching [0-9]+[gkm].
6) 'enum' this allows only a specific set of space deliminated values
to be set, e.g. 'enum allow these strings' only allows one of 'allow',
'these', or 'strings' to be set.

Bug: 70858511
Test: unit tests, test that properties are only set if their type matches
Change-Id: I7a6b00fb43ec630d1f56c9e9a1f1b61d3914f603
2018-01-16 14:44:40 -08:00
Chenbo Feng
dc95eeadf4 Merge "Mount eBPF file system and cgroupv2 root directory" am: 4719ecd28c am: 7a65861d7c
am: 94cff89571

Change-Id: Id2a58f55f16994dba0b6dbf86d4724943dbc8141
2018-01-16 22:15:25 +00:00
Chenbo Feng
94cff89571 Merge "Mount eBPF file system and cgroupv2 root directory" am: 4719ecd28c
am: 7a65861d7c

Change-Id: I4b325ed9b3bf5526260810f5aed990a4e802a482
2018-01-16 22:04:19 +00:00
Chenbo Feng
7a65861d7c Merge "Mount eBPF file system and cgroupv2 root directory"
am: 4719ecd28c

Change-Id: I10394f507c4cb6c91622804836f240d7de6c22ac
2018-01-16 22:01:16 +00:00
Treehugger Robot
4719ecd28c Merge "Mount eBPF file system and cgroupv2 root directory" 2018-01-16 21:45:29 +00:00
Chenbo Feng
2cba6f2e0e Mount eBPF file system and cgroupv2 root directory
Mount the eBPF file system under /sys/fs/bpf to allow netd to pin and
retrieve persistent eBPF map object from the file system. It helps the
system to maintain a consistent eBPF data store when netd crashed and
restart. Mount the cgroupv2 module and use the root folder of it to
monitor network statistics through eBPF program attached.

Test: eBPF map object show up under /sys/fs/bpf after netd start.
Bug: 30950746
Change-Id: Ie475112116603798fe75a75c5a84f4bbe5b942ec
2018-01-16 21:45:25 +00:00
Jeff Vander Stoep
538caefba9 Merge "OWNERS: add myself" am: 4ba3ebbc2f am: d64b97e0fd
am: 14bf561f03

Change-Id: Idf3ff9fe3089b8a9788cbe260e94456b680d1dc6
2018-01-16 20:54:47 +00:00
Roshan Pius
656b75c77c fs_config: Move hostapd to /vendor/bin/hw
Bug: 36646171
Test: Able to turn on softap
Change-Id: Ibd82581a12b4bd2e7d22825361706e35f292ce2b
2018-01-16 12:38:04 -08:00
Jeff Vander Stoep
14bf561f03 Merge "OWNERS: add myself" am: 4ba3ebbc2f
am: d64b97e0fd

Change-Id: Iab73dc727a7113db4fc16245b19a0a4e1532254e
2018-01-16 20:28:48 +00:00
Jeff Vander Stoep
d64b97e0fd Merge "OWNERS: add myself"
am: 4ba3ebbc2f

Change-Id: I29a5941cb476a343f8f419e9c8a2be088e027c6f
2018-01-16 20:07:20 +00:00
Hridya Valsaraju
7fa7225cc4 Create a friend method for reporting battery health
Bug: 71860528
Test: Test: vts-tradefed run vts -m VtsHalHealthV2_0
Change-Id: I6c56c601ee59fe33ee4a19dd4aeafbe3a1bd4c72
2018-01-16 11:15:51 -08:00