Commit graph

1058 commits

Author SHA1 Message Date
Robert Benea
ed73c5c71a Merge "Use mem cgroups in libprocessgroup if they're available" am: 3c7f566495 am: 92ad7c02d4 am: 43c6c844de
am: 6a4482a438

Change-Id: I307fb64713d44d2447f835f4a74b7c40ccd61b4f
2017-07-11 22:11:10 +00:00
Robert Benea
6a4482a438 Merge "Use mem cgroups in libprocessgroup if they're available" am: 3c7f566495 am: 92ad7c02d4
am: 43c6c844de

Change-Id: I9c2976886372f5c6e1ae008872cacc0f01fc282f
2017-07-11 22:08:11 +00:00
Robert Benea
92ad7c02d4 Merge "Use mem cgroups in libprocessgroup if they're available"
am: 3c7f566495

Change-Id: I7b50c83c5ba053faf6be62200570738744dd1e7b
2017-07-11 22:01:09 +00:00
Robert Benea
3280e48847 Use mem cgroups in libprocessgroup if they're available
Use mem cgroups if the kernel is built with CONFIG_MEMCG=y,
additionally add system group.

test: verified on both kernel with/without memcg enabled
Change-Id: Ia2ae89efa3905e9da68fa77adac1225c667864d1
2017-07-11 12:48:10 -07:00
Tim Murray
7af0deb144 Merge "Revert "Use mem cgroups in libprocessgroup if they're available"" am: e8a75e8f76 am: 7f857bb9ff am: ac68c7fc8c
am: 2c0f9c3a72

Change-Id: I36ef31b921d56222902c4bba8f891d6d21dad947
2017-07-08 01:52:51 +00:00
Tim Murray
2c0f9c3a72 Merge "Revert "Use mem cgroups in libprocessgroup if they're available"" am: e8a75e8f76 am: 7f857bb9ff
am: ac68c7fc8c

Change-Id: I19e5d24a936e992bb634fd589ce04416dbf07c21
2017-07-08 01:50:20 +00:00
Tim Murray
7f857bb9ff Merge "Revert "Use mem cgroups in libprocessgroup if they're available""
am: e8a75e8f76

Change-Id: Iec01b90ae7d49d1eaf4a6e0c5324749a358db5d6
2017-07-08 01:45:50 +00:00
Treehugger Robot
e8a75e8f76 Merge "Revert "Use mem cgroups in libprocessgroup if they're available"" 2017-07-08 01:41:19 +00:00
Tim Murray
fc10e3d5e5 Revert "Use mem cgroups in libprocessgroup if they're available"
This reverts commit 32375c2328.

bug 63164307

Change-Id: I3336bbf7c2f3297b231c5b0a1ef538faff9513fd
2017-07-08 00:04:42 +00:00
Keun-young Park
f5b616dabf Merge "add "shutdown critical" to service" am: b3915d113d am: a4ad5d0328 am: 19ec8e7bcf
am: bedc5faea7

Change-Id: I62cd1bc82531b88f5d8c8ac2dd637d5ec9d52572
2017-07-06 01:38:15 +00:00
Keun-young Park
bedc5faea7 Merge "add "shutdown critical" to service" am: b3915d113d am: a4ad5d0328
am: 19ec8e7bcf

Change-Id: Ide84d7f87a9884068ebc1cc9680c997507727af3
2017-07-06 01:13:19 +00:00
Keun-young Park
a4ad5d0328 Merge "add "shutdown critical" to service"
am: b3915d113d

Change-Id: I25b6f42478efda7077e00141042a427245393d28
2017-07-06 00:46:31 +00:00
Treehugger Robot
b3915d113d Merge "add "shutdown critical" to service" 2017-07-06 00:40:55 +00:00
Wei Wang
a89b61ad99 Merge "init: Support custom shutdown actions" am: c1bc4241f8 am: 5b89535442 am: b39890048c
am: 2a38e6d119

Change-Id: I6776039ebf9f87b41193cc24a9786dc80db99e43
2017-07-06 00:22:45 +00:00
Wei Wang
2a38e6d119 Merge "init: Support custom shutdown actions" am: c1bc4241f8 am: 5b89535442
am: b39890048c

Change-Id: I57a0422f47094cc061163510138e9562648fdd98
2017-07-05 23:58:51 +00:00
Wei Wang
5b89535442 Merge "init: Support custom shutdown actions"
am: c1bc4241f8

Change-Id: I6bb1789dbc5edbb10f2f4d712e9ca83e6302fdf4
2017-07-05 23:54:56 +00:00
Keun-young Park
cccb34fce8 add "shutdown critical" to service
- "shutdown critical" prevents killing the service during
  shutdown. And the service will be started if not running.
- Without it, services will be killed by SIGTERM / SIGKILL during shutdown.
- Even services with "shutdown critical" will be killed if shutdown
  times out.
- Removes ueventd and vold from hard coded list. Each service's rc will
  be updated to add "shutdown critical". watchdogd is still kept in the list.

bug: 37626581
Test: reboot and check last kmsg

Change-Id: Ie8cc699d1efbc59b9a2561bdd40fec64aed5a4bb
2017-07-05 14:55:22 -07:00
Wei Wang
eeab491efd init: Support custom shutdown actions
We have been seeing panics and errors during shutdown sequence in
some vendor's platform, and it is required to disable error handling
during shutdown.

This CL separates the shutdown request to execute another "shutdown"
trigger at the beginning of shutdown stage. And vendor can use this
trigger to add custom commands needed for shutting down gracefully.

Bug: 38203024
Bug: 62084631
Test: device reboot/shutdown
Change-Id: I3fac4ed59f06667d86e477ee55ed391cf113717f
2017-07-05 14:49:57 -07:00
Robert Benea
ea5fd4d828 Merge "Use mem cgroups in libprocessgroup if they're available" am: d3afc124b6 am: 46706e6824 am: 74c02e7b58
am: 888d9e198b

Change-Id: I6f3a475bfff19801792ff7017150be6955cdd631
2017-06-30 02:45:24 +00:00
Robert Benea
888d9e198b Merge "Use mem cgroups in libprocessgroup if they're available" am: d3afc124b6 am: 46706e6824
am: 74c02e7b58

Change-Id: Iba2c643286063a9ffa22f3917f8acbcca1d77ef3
2017-06-30 02:41:24 +00:00
Robert Benea
46706e6824 Merge "Use mem cgroups in libprocessgroup if they're available"
am: d3afc124b6

Change-Id: Idd72671eb144343a73a02bfbde8603265ca78650
2017-06-30 02:32:24 +00:00
Robert Benea
32375c2328 Use mem cgroups in libprocessgroup if they're available
Use mem cgroups if the kernel is built with CONFIG_MEMCG=y,
additionally add system group.

test: verified on both kernel with/without memcg enabled
Change-Id: Ib9d1c8e3c797e75f160e0e92edf3f11c9d8e9f17
2017-06-29 23:49:00 +00:00
Mark Salyzyn
4a4259b51b Merge changes Ibe1feb39,I05be83e4,If1422e4d am: a4f086ab20 am: 3a156e6c2b am: ca0c0bb96e
am: 872206fd80

Change-Id: I9c08baaf94f2eaaf2ad9633e70b9cd0c1dd484ed
2017-06-27 22:14:25 +00:00
Mark Salyzyn
872206fd80 Merge changes Ibe1feb39,I05be83e4,If1422e4d am: a4f086ab20 am: 3a156e6c2b
am: ca0c0bb96e

Change-Id: I21636d01cf0cb0bd581104d2bfb5624877bfaf6a
2017-06-27 21:57:34 +00:00
Mark Salyzyn
3a156e6c2b Merge changes Ibe1feb39,I05be83e4,If1422e4d
am: a4f086ab20

Change-Id: I7e5d431c992f9860ca7b42ca81edfbfd1d8e0a1c
2017-06-27 21:52:06 +00:00
Mark Salyzyn
4eb0ba058c init.rc: setup console-ramoops-0
On later kernels /sys/fs/pstore/console-ramoops becomes
/sys/fs/pstore/console-ramoops-0

Test: none
Bug: 63058217
Change-Id: Ibe1feb39ef9081b1ab2316510674bf181bdc7b0c
2017-06-27 09:32:38 -07:00
Joel Galenson
62962dd5b7 Move chmod of /sys/kernel/debug/tracing to fix traceur.
This is a temporary fix, since we're still not sure exactly what the
bug is.

Bug: 62547086
Test: Built, flashed, and booted Marlin.  Verified that the file has
the correct permission and that traceur does not popup an error.

Change-Id: I43275e974a11754eca274f1b77d15cdd03a3b365
2017-06-13 10:15:05 -07:00
Robert Benea
ec39a758a1 Merge "cgroups used by init must be mounted before any services start" am: 63c15c1b11 am: cc6da8ec5b am: b30ad069ec
am: 9c18097147

Change-Id: I49aee8cae9374ba40312f6a929909a77f2df6492
2017-06-01 08:25:53 +00:00
Robert Benea
9c18097147 Merge "cgroups used by init must be mounted before any services start" am: 63c15c1b11 am: cc6da8ec5b
am: b30ad069ec

Change-Id: I5627d6720aa0c237aca0cdd1cb75b654cb183158
2017-06-01 08:17:03 +00:00
Robert Benea
c638569c2e cgroups used by init must be mounted before any services start
init uses /acct and optionally /dev/memcg for tracking services and
therefore these must be started before any services start.

Test: check that cgroups are mounted appropriately.

Change-Id: Ice095287963181fe687dbe6b7d291076e674d1cc
2017-05-31 16:12:23 -07:00
Yueyao Zhu
f97d96b8f4 init.rc: import /vendor/etc/init/hw/init.${ro.hardware}.rc
/init.${ro.hardware}.rc would sometime rely on being parsed before other
.rc files. In this case all vendors are still able to have a .rc file
included before all the ones in /vendor/etc/init.

Merged-In: I3fb6df13a39204a516874ea94f5e5ad84bca42c6
Bug: 38301110
Change-Id: I3fb6df13a39204a516874ea94f5e5ad84bca42c6
(cherry picked from commit f7c34ad4bf)
2017-05-25 12:02:32 -07:00
Thierry Strudel
2a20488a77 Merge "init.rc: import /vendor/etc/init/hw/init.${ro.hardware}.rc" into oc-dev am: 64bea883cb
am: b1fad8a5b0

Change-Id: I0f1f47059715fc55bf9ebe4b9a61e3f6d2d50726
2017-05-19 18:14:51 +00:00
Yueyao Zhu
f7c34ad4bf init.rc: import /vendor/etc/init/hw/init.${ro.hardware}.rc
/init.${ro.hardware}.rc would sometime rely on being parsed before other
.rc files. In this case all vendors are still able to have a .rc file
included before all the ones in /vendor/etc/init.

Bug: 38301110
Change-Id: I3fb6df13a39204a516874ea94f5e5ad84bca42c6
2017-05-18 17:29:49 -07:00
Joel Fernandes
f50d1091e9 init.rc: Add a new schedtune group 'rt' for rt tasks
Add a new boost group for rt tasks. Device specific changes will be in
the device init rc.

Bug: 33085313

Change-Id: I99ca085d0933d878795bb0eda639bb2075419415
Signed-off-by: Joel Fernandes <joelaf@google.com>
2017-05-13 19:40:50 +00:00
Steve Muckle
f59c55aa7a Revert "disable module loading after BOOT_COMPLETED broadcast"
This reverts commit 6ed19d1675.

Allow devices to decide for themselves whether to allow
module loading after boot.

Bug: 38204366
Test: boot sailfish, load a kernel module
Change-Id: Ib9e77381de9003fb5160463664015a95316ddfc5
2017-05-10 13:39:28 -07:00
Tom Cherry
982e0693ce Revert "Make /data/data a symlink to /data/user/0"
This reverts commit d147cb5887.

Original change breaks AVD
Original changes breaks SF/AF
Bug: 38026755
Bug: 38030346
Bug: 38114264

Change-Id: Iab56244f0dc0f6b0df2916c691277a882fc7d184
2017-05-08 16:06:38 +00:00
cjbao
d147cb5887 Make /data/data a symlink to /data/user/0
For legacy reason, /data/data is a real dir and /data/user/0 is a
symbolic link to it.  Overhead for linux kernel to walk through
symbolic link is not negligible. This is unnessary overhead to
carry over.  This patch is to make /data/user/0 a a real dir and
make legacy folder /data/data a symbolic link.  OTAed system does
not get impacted.

Test: Manual test
Change-Id: I419564a75f6ebf3154badb8725ba9831164592b6
Signed-off-by: cjbao <cathy.bao@intel.com>
2017-05-03 21:38:31 +00:00
Abodunrinwa Toki
d6ab6456c5 Initialize textclassifier model update directory
Test: Builds successfully. Directory is initialized on install. Tests pass.
bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Bug: 34780396

Merged-In: Icbf7962f11b66579931f48053132da6e03e62c61
Change-Id: Icbf7962f11b66579931f48053132da6e03e62c61
2017-04-28 04:15:57 +01:00
Abodunrinwa Toki
40673e3381 Initialize textclassifier model update directory
Test: Builds successfully. Directory is initialized on install. Tests pass.
bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Bug: 34780396

Change-Id: Icbf7962f11b66579931f48053132da6e03e62c61
2017-04-27 22:56:43 +01:00
Wei Wang
53842e7dc6 Ensure update_verifier run before zygote
Currently zygote is started early for FBE device but update_verifier is run later
which creates a potential risk. This CL ensures update_verifier run before
zygote touches anything within data/ partition. With this change, we also start zygote
early for unencrypted/unsupported encryption state device.

Bug: 37543411
Test: marlin boots

(cherry picked from commit 5dc05effec)

Change-Id: I97cde0c20f74b1b17c995d84c2e31c86fe006395
2017-04-25 17:49:22 +00:00
Wei Wang
35a2ee84d5 Revert "Revert "Ensure update_verifier run before zygote""
This reverts commit 2de3344180.

Change-Id: Ifc49bf389ed43a56baf5bb55d5f2028b8725083d
2017-04-24 21:33:12 +00:00
Keun-young Park
2de3344180 Revert "Ensure update_verifier run before zygote"
This reverts commit 5dc05effec.

Change-Id: Ic041860dee8a2993c6b4890beca4da745cfbfb60
2017-04-22 00:43:55 +00:00
Wei Wang
5dc05effec Ensure update_verifier run before zygote
Currently zygote is started early for FBE device but update_verifier is run later
which creates a potential risk. This CL ensures update_verifier run before
zygote touches anything within data/ partition. With this change, we also start zygote
early for unencrypted/unsupported encryption state device.

Bug: 37543411
Test: marlin boots
Change-Id: I95daa73bc1a503eecb70d7be78251b74b773abf8
2017-04-21 11:54:55 -07:00
Keun-young Park
5fb5b81fc7 early start zygote_secondary as well
- late start of zygote_secondary leads into occasional
  1 second wait for starting system service.
- Early start secondary zygote so that there is no additional
  wait.

bug: 37508384
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 100 -f -e 16 -w 30

(cherry picked from commit f8532445b4)

Change-Id: Ia46b07f3d6abb090cc169ebd807e21b16694d172
2017-04-21 09:55:03 -07:00
Keun-young Park
f8532445b4 early start zygote_secondary as well
- late start of zygote_secondary leads into occasional
  1 second wait for starting system service.
- Early start secondary zygote so that there is no additional
  wait.

bug: 37508384
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 100 -f -e 16 -w 30
Change-Id: I2e4eb0b59a9a8417b56a72fe2de6fa2a6e1ab0a2
2017-04-20 18:31:48 -07:00
TreeHugger Robot
1b0895300f Merge changes I33ad185f,I5fc2d727 into oc-dev
* changes:
  init.rc: move load_system_props to beginning of 'on fs'
  liblog: __android_logger_property_bool svelte+eng default
2017-04-19 20:16:15 +00:00
Mark Salyzyn
82a395de27 init.rc: move load_system_props to beginning of 'on fs'
(cherry pick from commit 3510359a3c)

ro.logd.kernel, ro.config.low_ram, ro.logd.timestamp and ro.debuggable
need to be retrieved prior to logd start in order for the service to
behave in a configured manner.  Other essential services are also
dependent on these system properties as well, so it just makes sense
to pick them all up first in 'on fs'.

Test: smoke test
Bug: 37425809
Change-Id: I33ad185f397ee527ed3c84cc2bcb40ff8ca785b5
2017-04-19 17:32:17 +00:00
Wei Wang
ac0aa5f30c Merge "init.rc: set initial cpuset to all cores" into oc-dev 2017-04-19 16:49:59 +00:00
Mark Salyzyn
3510359a3c init.rc: move load_system_props to beginning of 'on fs'
ro.logd.kernel, ro.config.low_ram, ro.logd.timestamp and ro.debuggable
need to be retrieved prior to logd start in order for the service to
behave in a configured manner.  Other essential services are also
dependent on these system properties as well, so it just makes sense
to pick them all up first in 'on fs'.

Test: smoke test
Bug: 37425809
Change-Id: I33ad185f397ee527ed3c84cc2bcb40ff8ca785b5
2017-04-19 14:55:35 +00:00
Tom Cherry
5ceb7b3ebd init: handle sys.powerctl immediately
Currently if a process sets the sys.powerctl property, init adds this
property change into the event queue, just like any other property.
The actual logic to shutdown the device is not executed until init
gets to the action associated with the property change.

This is bad for multiple reasons, but explicitly causes deadlock in
the follow scenario:

A service is started with `exec` or `exec_start`
The same service sets sys.powerctl indicating to the system to
shutdown
The same service then waits infinitely

In this case, init doesn't process any further commands until the exec
service completes, including the command to reboot the device.

This change causes init to immediately handle sys.powerctl and reboot
the device regardless of the state of the event queue, wait for exec,
or wait for property conditions.

Bug: 37209359
Bug: 37415192

Test: Init reboots normally
Test: Update verifier can reboot the system
Change-Id: Iff2295aed970840f47e56c4bacc93001b791fa35
(cherry picked from commit 98ad32a967)
2017-04-18 12:24:58 -07:00