Commit graph

50018 commits

Author SHA1 Message Date
Dongwon Kang
a3dd891d20 [automerger skipped] Merge "Remove libandroid.so from media namespace." am: aa952fa545
am: 784935b9c2 -s ours
am skip reason: change_id Ia6366834613d1e12498fa90377e79f62a2149776 with SHA1 a8e4b89768 is in history

Change-Id: I67fc6a91f63086417c79b13c5403761bf6cf86e5
2019-04-18 14:14:03 -07:00
Dongwon Kang
784935b9c2 Merge "Remove libandroid.so from media namespace."
am: aa952fa545

Change-Id: I32af3044529b1bb07022538d77e82bd2cd66be14
2019-04-18 14:02:55 -07:00
Dongwon Kang
aa952fa545 Merge "Remove libandroid.so from media namespace." 2019-04-18 20:54:40 +00:00
Dongwon Kang
f34a08f8b7 Merge "Remove libandroid.so from media namespace." into qt-dev
am: 2b107b8b6b

Change-Id: I5b83476196221d71db4137b4cbc2a3f5f786c3b3
2019-04-18 10:30:23 -07:00
Dongwon Kang
2b107b8b6b Merge "Remove libandroid.so from media namespace." into qt-dev 2019-04-18 17:07:53 +00:00
Josh Gao
529c7eb5db debuggerd: call setsid in our children.
am: 6b8caf8eb7

Change-Id: Ifa61da91354666c8c42622e03b63e492124c8e8e
2019-04-17 22:05:59 -07:00
Josh Gao
bb0002274b adbd: reduce the USB buffer sizes to 16k.
am: 08ccc735a3

Change-Id: Ia42977ba7f0c269d7d11dc80e4dc378b708a3c20
2019-04-17 22:05:35 -07:00
Josh Gao
6b8caf8eb7 debuggerd: call setsid in our children.
There appears to be a kernel bug that causes SIGHUP and SIGCONT to be
sent to the parent process group we spawn from if the process group
contains stopped jobs (e.g. the parent itself, because of wait_for_gdb).

Call setsid in all of our children to prevent this from happening.

Bug: http://b/31124563
Test: adb shell 'setprop debug.debuggerd.wait_for_gdb 1; killall -ABRT surfaceflinger'
Change-Id: I1a48d70886880a5bfbe2deb80d48deece55faf09
(cherry picked from commit 18cb681247)
2019-04-17 17:53:43 -07:00
Josh Gao
08ccc735a3 adbd: reduce the USB buffer sizes to 16k.
Some USB controllers only support 16k writes, so drop down to that.

Bug: http://b/130622010
Test: treehugger
Change-Id: I836d5b2d0d6fcae05f290af11a6a19c6e8d7c1ba
(cherry picked from commit 770a6a4d46)
2019-04-17 17:53:34 -07:00
Tom Cherry
3b11c618c6 Merge "init: do not fork before doing (u)mount_all()" am: fc1749280c
am: 83cf2f5381

Change-Id: I5372299f7f6ac94c05754b40e7f5ecb8812b5df8
2019-04-17 17:48:15 -07:00
Sandeep Patil
eceeb5c924 Merge "procrank: do not keep process maps around" am: c3d5e609e0
am: 5c8fca352c

Change-Id: I27fb9a47ed6597ca00b3cffe9df74bac473144df
2019-04-17 17:47:23 -07:00
Tom Cherry
83cf2f5381 Merge "init: do not fork before doing (u)mount_all()"
am: fc1749280c

Change-Id: Iba9b76aabfdd04e5e64abe19225a54c28a98be29
2019-04-17 17:43:01 -07:00
Sandeep Patil
5c8fca352c Merge "procrank: do not keep process maps around"
am: c3d5e609e0

Change-Id: I63e98aead5f6ffa560fa732a1288caa456faaab9
2019-04-17 17:42:14 -07:00
Tom Cherry
fc1749280c Merge "init: do not fork before doing (u)mount_all()" 2019-04-18 00:34:03 +00:00
Treehugger Robot
c3d5e609e0 Merge "procrank: do not keep process maps around" 2019-04-18 00:22:08 +00:00
Tom Cherry
fbb2c91647 Merge "Do not create /sbin" am: 3016f2527c
am: b4f982146d

Change-Id: I7c166420b514f5b1951a0ba841bec670589c9d21
2019-04-17 17:08:36 -07:00
Tom Cherry
b4f982146d Merge "Do not create /sbin"
am: 3016f2527c

Change-Id: I02cd6a8cc3daa04c382f09b50f17bb101c38bb34
2019-04-17 16:51:04 -07:00
Tom Cherry
3016f2527c Merge "Do not create /sbin" 2019-04-17 23:26:13 +00:00
Josh Gao
039cc7d1f8 Merge "adbd: reduce the USB buffer sizes to 16k." am: f05fbe6957
am: 949a903ff5

Change-Id: I887c8b43ac51eef60b5d0ec2a489277ad8a0c092
2019-04-17 16:15:35 -07:00
Josh Gao
949a903ff5 Merge "adbd: reduce the USB buffer sizes to 16k."
am: f05fbe6957

Change-Id: I0a2c6293a9f0728aefa2633250a6df1c32f134bb
2019-04-17 15:14:29 -07:00
Josh Gao
f05fbe6957 Merge "adbd: reduce the USB buffer sizes to 16k." 2019-04-17 21:43:37 +00:00
Tom Cherry
990483d409 init: do not fork before doing (u)mount_all()
A fork() was historically added in case of fs_mgr crashing or leaking
memory, but this should not be the case with fs_mgr, and a fork() only
hides any such problem, instead of allowing us to address it
directly.

Test: boot
Change-Id: If7ee4807757048258a6ea9a79a24cebbacc530cc
2019-04-17 12:55:50 -07:00
Sandeep Patil
a42207e2e3 procrank: do not keep process maps around
procrank's usage in its output shows 20x increase from
last year. This is because it is keeping the process
maps around until termination. Fix that by getting rid
of ProcMemInfo objects when done parsing /proc/<pid>/maps,pagemap.

Note that the total allocations do not change and have not necessarily
regressed from Pie.

Bug: 130672819
Test: adb shell procrank | grep 'procrank\|cmdline'

Change-Id: Ib7bf960ed1d053347fcfc0c8aee9019607a1eb01
Signed-off-by: Sandeep Patil <sspatil@google.com>
2019-04-17 12:11:50 -07:00
Dongwon Kang
4b2b76e101 Remove libandroid.so from media namespace.
Test: adb shell dumpsys media.extractor
Bug: 130637522
Change-Id: I6bcdac60a740d19a97bbac19e6339e0552b0d572
Merged-In: Ia6366834613d1e12498fa90377e79f62a2149776
2019-04-17 18:05:51 +00:00
Dongwon Kang
a8e4b89768 Remove libandroid.so from media namespace.
Test: adb shell dumpsys media.extractor
Bug: 130637522
Change-Id: Ia6366834613d1e12498fa90377e79f62a2149776
2019-04-17 10:47:33 -07:00
Rick Yiu
fb8ea7eb93 [automerger skipped] Let blkio cgroup follow cpuset cgroup only
am: 6569f35ae0 -s ours
am skip reason: change_id I9a140c7d9d93e1dd43c34c8cf066f4a62e2bf604 with SHA1 e8678cf883 is in history

Change-Id: I3ff5682fe9b4cd89065f4236b4f664a7aa0e6428
2019-04-17 09:26:19 -07:00
Rick Yiu
6569f35ae0 Let blkio cgroup follow cpuset cgroup only
Some app may have different cgroup settings in cpuset and schedtune for its
threads, so let blkio follow cpuset only, which represents the app's current
state more accurately. Otherwise, if that thread is doing IO, then its
performance will be affected because its blkio group is in lower priority
group as schedtune.

ex: an app is now in top-app, but some thread of it set schedtune group to
background, and blkio follows schedtune because it is called later.

Main thread:
6:schedtune:/top-app
5:memory:/
4:cpuset:/top-app
3:cpuacct:/uid_1000/pid_8766
2:cpu:/
1:blkio:/
0::/

Some thread:
6:schedtune:/background
5:memory:/
4:cpuset:/top-app
3:cpuacct:/uid_1000/pid_8766
2:cpu:/
1:blkio:/background
0::/

Bug: 124727032
Test: blkio has same settings with cpuset
Change-Id: I9a140c7d9d93e1dd43c34c8cf066f4a62e2bf604
Merged-In: I9a140c7d9d93e1dd43c34c8cf066f4a62e2bf604
2019-04-17 06:23:05 +00:00
Rick Yiu
a138e85b03 Merge "Let blkio cgroup follow cpuset cgroup only" am: 5c421695f0
am: be31d2ce8f

Change-Id: Ib02f1cd6d3df9e54b10eea9acf2a2c9fcfca31bc
2019-04-16 19:42:20 -07:00
Rick Yiu
be31d2ce8f Merge "Let blkio cgroup follow cpuset cgroup only"
am: 5c421695f0

Change-Id: Ib451ed63f55b299f152c7c310959dfdd321238c4
2019-04-16 19:21:03 -07:00
Treehugger Robot
5c421695f0 Merge "Let blkio cgroup follow cpuset cgroup only" 2019-04-17 01:51:33 +00:00
Josh Gao
49a54a148d Merge "debuggerd: call setsid in our children." am: 371180bb72
am: 4cf60aea3c

Change-Id: Ic58f15522bb305ad5ee061b26d6cbea03818aa4f
2019-04-16 17:24:15 -07:00
Josh Gao
4cf60aea3c Merge "debuggerd: call setsid in our children."
am: 371180bb72

Change-Id: Iee5d2f928d3f99d86657a838a9f73faa6674a237
2019-04-16 16:54:05 -07:00
Treehugger Robot
371180bb72 Merge "debuggerd: call setsid in our children." 2019-04-16 23:29:04 +00:00
Hridya Valsaraju
3be11bcfe3 Merge "Handle failed usb/reads and writes correctly" am: 6e28863442
am: fc5c5f2b27

Change-Id: Iebedde2d9306de5a9a99b548fc4e24a95f8ff08e
2019-04-16 16:21:42 -07:00
Hridya Valsaraju
fc5c5f2b27 Merge "Handle failed usb/reads and writes correctly"
am: 6e28863442

Change-Id: I505676fe1a12f21cf9b006d1d417410616ba5053
2019-04-16 16:11:44 -07:00
Treehugger Robot
6e28863442 Merge "Handle failed usb/reads and writes correctly" 2019-04-16 23:03:17 +00:00
Yifan Hong
72898fdd87 [automerger skipped] Merge "init: add umount_all builtin." am: e438843ead
am: b2032ff720 -s ours
am skip reason: change_id Id3ab65b3860b6ea6cfec310ab13652009c81f415 with SHA1 81f1385589 is in history

Change-Id: I92f678cc6d11dd526f8c5c17f65cf0033b487ced
2019-04-16 16:00:16 -07:00
Yifan Hong
b2032ff720 Merge "init: add umount_all builtin."
am: e438843ead

Change-Id: I2bbaf5f91704c5c3238cbc139593b36e1516dc24
2019-04-16 15:54:03 -07:00
Yifan Hong
e438843ead Merge "init: add umount_all builtin." 2019-04-16 22:46:52 +00:00
Tom Cherry
3ec821fcfb Do not create /sbin
/sbin was traditionally used for static binaries on the ramdisk for
Android, but now everything is a shared binary, so this directory is
empty and we do not want to encourage creation of new libraries in
this directory.

Bug: 73660730
Test: build
Change-Id: I0d0aa052e1eaf529d18921c45169473df0ee51ff
2019-04-16 15:22:33 -07:00
Rick Yiu
e8678cf883 Let blkio cgroup follow cpuset cgroup only
Some app may have different cgroup settings in cpuset and schedtune for its
threads, so let blkio follow cpuset only, which represents the app's current
state more accurately. Otherwise, if that thread is doing IO, then its
performance will be affected because its blkio group is in lower priority
group as schedtune.

ex: an app is now in top-app, but some thread of it set schedtune group to
background, and blkio follows schedtune because it is called later.

Main thread:
6:schedtune:/top-app
5:memory:/
4:cpuset:/top-app
3:cpuacct:/uid_1000/pid_8766
2:cpu:/
1:blkio:/
0::/

Some thread:
6:schedtune:/background
5:memory:/
4:cpuset:/top-app
3:cpuacct:/uid_1000/pid_8766
2:cpu:/
1:blkio:/background
0::/

Bug: 124727032
Test: blkio has same settings with cpuset
Change-Id: I9a140c7d9d93e1dd43c34c8cf066f4a62e2bf604
2019-04-16 22:20:58 +00:00
Josh Gao
770a6a4d46 adbd: reduce the USB buffer sizes to 16k.
Some USB controllers only support 16k writes, so drop down to that.

Bug: http://b/130622010
Test: treehugger
Change-Id: I836d5b2d0d6fcae05f290af11a6a19c6e8d7c1ba
2019-04-16 15:14:24 -07:00
Victor Hsieh
adc7075acd Merge "mini-keyctl: fix key id parsing by "0x" prefix" am: 220241f266
am: 8605ae6646

Change-Id: Id96db09168000a5a02cf93682d6110f0cc4edce2
2019-04-16 15:00:17 -07:00
Victor Hsieh
8605ae6646 Merge "mini-keyctl: fix key id parsing by "0x" prefix"
am: 220241f266

Change-Id: I04006a4f76355bc8edc1a33318320470afffdd26
2019-04-16 14:25:51 -07:00
Treehugger Robot
220241f266 Merge "mini-keyctl: fix key id parsing by "0x" prefix" 2019-04-16 20:51:53 +00:00
Josh Gao
18cb681247 debuggerd: call setsid in our children.
There appears to be a kernel bug that causes SIGHUP and SIGCONT to be
sent to the parent process group we spawn from if the process group
contains stopped jobs (e.g. the parent itself, because of wait_for_gdb).

Call setsid in all of our children to prevent this from happening.

Bug: http://b/31124563
Test: adb shell 'setprop debug.debuggerd.wait_for_gdb 1; killall -ABRT surfaceflinger'
Change-Id: I1a48d70886880a5bfbe2deb80d48deece55faf09
2019-04-16 13:17:08 -07:00
Yifan Hong
e4deaf3880 Merge "init: add umount_all builtin." into qt-dev
am: aca2bc0992

Change-Id: I5777731420bba10aba14f79ad8c925aa0f2e3635
2019-04-16 10:49:54 -07:00
Yifan Hong
aca2bc0992 Merge "init: add umount_all builtin." into qt-dev 2019-04-16 17:01:19 +00:00
Elliott Hughes
e8338e985c Merge "crasher: add execute-only memory ("xom")." am: e1d4648f46
am: 331d89fb5a

Change-Id: Iee39e337ac9b536a832fd9cb23f3a304f4ece551
2019-04-16 05:54:23 -07:00
Elliott Hughes
331d89fb5a Merge "crasher: add execute-only memory ("xom")."
am: e1d4648f46

Change-Id: I1f76532cb1c02e3262fd4b6353d45f54e07766d8
2019-04-16 05:42:30 -07:00