Commit graph

75271 commits

Author SHA1 Message Date
Treehugger Robot
2f9831b4a8 Merge "Add a comment to explain how errno is set" am: b488db911c am: ee7752efa1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2052049

Change-Id: I32d96695290cbfe6ac1d863a7075b133c53b06be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-31 21:52:37 +00:00
Treehugger Robot
ee7752efa1 Merge "Add a comment to explain how errno is set" am: b488db911c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2052049

Change-Id: I1eaf6244fa6f77d93bfdf690f2f3ac1af17dd73a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-31 21:39:51 +00:00
Treehugger Robot
b488db911c Merge "Add a comment to explain how errno is set" 2022-03-31 21:19:14 +00:00
Bart Van Assche
54136f8bf4 Add a comment to explain how errno is set
Since it is nontrivial which modifies `errno` is modified in
ExecuteForTask(), add a comment that explains this.

Bug: 213617178
Test: Compile-tested only.
Change-Id: I49ce9c8054fdc59e61b2e5f9ffe6f16743a94401
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-03-31 11:30:03 -07:00
David Anderson
9097c5ea60 Merge "ueventd: Allow legacy paths in API version 32." am: 48d403a511 am: 7ce7ea098b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2048646

Change-Id: I0cad070975c74c1a4814f0e434f93ad81f6e676e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 22:24:35 +00:00
David Anderson
7ce7ea098b Merge "ueventd: Allow legacy paths in API version 32." am: 48d403a511
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2048646

Change-Id: I6c269c5952652833ebcfbd7b23d9f3600c1d625c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 22:07:01 +00:00
David Anderson
48d403a511 Merge "ueventd: Allow legacy paths in API version 32." 2022-03-30 21:45:46 +00:00
Wei Wang
0cafbb6824 Merge "Revert "Migrate the blkio controller to the v2 cgroup hierarchy"" am: 921d266c81 am: a308946663
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2049926

Change-Id: Ie1820b71fc3488c6828f6b6fb9b03c96b266d604
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 16:47:21 +00:00
Wei Wang
a308946663 Merge "Revert "Migrate the blkio controller to the v2 cgroup hierarchy"" am: 921d266c81
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2049926

Change-Id: Iab5a3987158f0e856e9acfab76f0cee28d67f173
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 16:22:53 +00:00
Wei Wang
921d266c81 Merge "Revert "Migrate the blkio controller to the v2 cgroup hierarchy"" 2022-03-30 16:02:45 +00:00
Bart Van Assche
159563561a Revert "Migrate the blkio controller to the v2 cgroup hierarchy"
Revert "Migrate the blkio controller to the cgroup v2 hierarchy"

Revert "Migrate the blkio controller to the cgroup v2 hierarchy"

Revert "Migrate the blkio controller to the cgroup v2 hierarchy"

Revert submission 1962326-blkio-cgroup-v2

Reason for revert: This set of changes is suspected to have caused a redfin boot time regression for the git_tm-dev branch.

Reverted Changes:
Id18d876b6:Migrate the blkio controller to the cgroup v2 hier...
I7dfa52136:Migrate the blkio controller to the v2 cgroup hier...
I5336167be:Migrate the blkio controller to the cgroup v2 hier...
I3f0131d8f:Migrate the blkio controller to the cgroup v2 hier...
Ibb62b2d4d:Migrate the blkio controller to the cgroup v2 hier...

Bug: 227382327
Bug: 227389363
Change-Id: I6c8183ed1c3044c8947c4fca07799deff98101b3
2022-03-30 14:58:20 +00:00
Suren Baghdasaryan
20a63b9391 Merge "Revert "Fix the cgroup directory owner in createProcessGroupInternal()"" am: 7c43c6c9a0 am: 71b587a9a5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2048643

Change-Id: I18994b9b9ebc6d3210973c30193e96cf2174e44a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 02:20:43 +00:00
Suren Baghdasaryan
71b587a9a5 Merge "Revert "Fix the cgroup directory owner in createProcessGroupInternal()"" am: 7c43c6c9a0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2048643

Change-Id: I809ee9bd4d9991f83187948fb4d6f18651d469f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 02:04:28 +00:00
Suren Baghdasaryan
7c43c6c9a0 Merge "Revert "Fix the cgroup directory owner in createProcessGroupInternal()"" 2022-03-30 01:48:19 +00:00
Bart Van Assche
8eb7a6edea Revert "Fix the cgroup directory owner in createProcessGroupInternal()"
This reverts commit 812d7698d8.

Reason for revert: this patch is suspected to have caused b/227337425.

Bug: 227337425
Bug: 227331047
Change-Id: I4ae26ccf61ad7c63dacc85da878ba0920736951c
2022-03-30 01:40:50 +00:00
David Anderson
ed1bca4b52 ueventd: Allow legacy paths in API version 32.
Bug: 226699360
Test: manual test
Change-Id: I2602eaa217a2b6cba8a5fb8acd6d5a8a9e3d405e
2022-03-29 17:50:01 -07:00
Treehugger Robot
cd92c351b5 Merge "Tweak linux_glibc properties for musl builds in system/core" am: ec8519e953 am: e06b7e163e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2044103

Change-Id: Ib595f7b9603da792547e18e1afc0f6ca456a53c9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 00:37:50 +00:00
Daniel Norman
3156527be1 Merge "Adds an init host lib for use in host_apex_verifier." am: c015f7f96d am: 6d9c7b738d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2019275

Change-Id: Ic38ddf2f710d5dad9e1b83ca7dee2093fa69b200
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 00:37:39 +00:00
Treehugger Robot
e06b7e163e Merge "Tweak linux_glibc properties for musl builds in system/core" am: ec8519e953
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2044103

Change-Id: I495181e0811a02adbd89decd306a83be31ebf74d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 00:14:29 +00:00
Daniel Norman
6d9c7b738d Merge "Adds an init host lib for use in host_apex_verifier." am: c015f7f96d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2019275

Change-Id: I83697a5dd84b1d103dd0140fcbe340031609e717
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 00:14:16 +00:00
Treehugger Robot
ec8519e953 Merge "Tweak linux_glibc properties for musl builds in system/core" 2022-03-30 00:09:01 +00:00
Daniel Norman
c015f7f96d Merge "Adds an init host lib for use in host_apex_verifier." 2022-03-29 23:56:15 +00:00
Treehugger Robot
dd79fa2c8d Merge "Fix build error from signed/unsigned comparison" am: 98c7076202 am: 9f63827322
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2046028

Change-Id: Ib08e4e76b94ca9f2dd923626ad1e0bfc32490d18
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-29 23:44:10 +00:00
Treehugger Robot
9f63827322 Merge "Fix build error from signed/unsigned comparison" am: 98c7076202
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2046028

Change-Id: I53ad30af8adcc03698b0f4353b1f0f25d06806ec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-29 23:28:00 +00:00
Treehugger Robot
98c7076202 Merge "Fix build error from signed/unsigned comparison" 2022-03-29 23:13:51 +00:00
Jason Macnak
c6159bf191 Merge "Relax requirements on android_ycbcr to allow P010" am: b29ff55897 am: 7101688536
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1990490

Change-Id: Iecb7953a98a0765680898bc32822e46d04e781e5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-29 20:42:15 +00:00
Jason Macnak
7101688536 Merge "Relax requirements on android_ycbcr to allow P010" am: b29ff55897
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1990490

Change-Id: I856ec300bd2bb913f9c0f7dae3ff56ddd126c4ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-29 20:06:01 +00:00
Jason Macnak
b29ff55897 Merge "Relax requirements on android_ycbcr to allow P010" 2022-03-29 20:00:03 +00:00
Bart Van Assche
63ee2c2cb8 Merge "Migrate the blkio controller to the v2 cgroup hierarchy" am: 0090e72568 am: c1e8abd0e6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1962326

Change-Id: Ib43ec1a0cb4e21f845d0526d150729e0d5ed4607
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-29 19:17:16 +00:00
Bart Van Assche
c1e8abd0e6 Merge "Migrate the blkio controller to the v2 cgroup hierarchy" am: 0090e72568
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1962326

Change-Id: I73c2f25855ad9d75916ed765391ff1bc3ba99591
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-29 18:53:23 +00:00
Bart Van Assche
0090e72568 Merge "Migrate the blkio controller to the v2 cgroup hierarchy" 2022-03-29 18:31:08 +00:00
Andrei Homescu
1a867dcb6e Fix build error from signed/unsigned comparison
Bug: 224644083
Test: m
Change-Id: I9adbe1ea53193d8c59f9022754cd3e23533e54ad
2022-03-29 00:30:34 +00:00
Konstantin Vyshetsky
733efecf77 Merge changes from topic "fastbootd-reset-fd" am: 04a4a10ee1 am: c5751cf864
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2032465

Change-Id: I250e558f4839c592f8f3c1b8f4372ca58965c8fb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-28 21:05:12 +00:00
Bart Van Assche
07f6c82a4c Migrate the blkio controller to the v2 cgroup hierarchy
This patch preserves the following parameter values:
* Foreground BFQ weight:      100
* Foreground CFQ group_idle:    0
* Foreground CFQ weight:     1000
* Background BFQ weight:       10
* Background CFQ group_idle:    0
* Background CFQ weight:      200

The foreground BFQ weight in task_profiles.json is the default BFQ
weight. From
https://www.kernel.org/doc/Documentation/block/bfq-iosched.txt:
"weight (namely blkio.bfq.weight or io.bfq-weight): the weight of the
group inside its parent. Available values: 1..10000 (default 100). The
linear mapping between ioprio and weights, described at the beginning
of the tunable section, is still valid, but all weights higher than
IOPRIO_BE_NR*10 are mapped to ioprio 0."

Bug: 213617178
Test: Booted Android in Cuttlefish and ran the following test:
Test: adb -e shell cat /sys/fs/cgroup/*/*/io.bfq.weight | sort | uniq -c
Test: 22 default 10
Test: 98 default 100
Change-Id: I7dfa521363a316592852fecce9192708c7a90514
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-03-28 20:56:15 +00:00
Konstantin Vyshetsky
c5751cf864 Merge changes from topic "fastbootd-reset-fd" am: 04a4a10ee1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2032465

Change-Id: I160707aee8123029c2b0dbde26f28a86426f2fd7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-28 20:40:50 +00:00
Konstantin Vyshetsky
04a4a10ee1 Merge changes from topic "fastbootd-reset-fd"
* changes:
  fastbootd: reset file descriptor on unaligned writes
  fastbootd: add support to reset fd by handle
  fastbootd: pass handle in place of fd
2022-03-28 20:13:25 +00:00
Konstantin Vyshetsky
57b23d25eb fastbootd: reset file descriptor on unaligned writes
Writes on file descriptors opened with O_DIRECT will fail if the buffer
is not page aligned. This CL will reset the file descriptor without the
O_DIRECT flag for such instances.

Bug: 225108941
Signed-off-by: Konstantin Vyshetsky <vkon@google.com>
Change-Id: I841c84f5d2c0b9435b394c48b1bfcc2d51d771bb
2022-03-28 10:57:03 -07:00
Konstantin Vyshetsky
1cee2ed239 fastbootd: add support to reset fd by handle
There are cases where the flags the file descriptor was opened with need
to be modified. This CL adds functionality to reset the file descriptor
held by a PartitionHandle, reopening with new flags and repositioning
file offset to previous.

Bug: 225108941
Signed-off-by: Konstantin Vyshetsky <vkon@google.com>
Change-Id: I9adb0e7696bc6af74e14dd61a6cb0ef10b4c98c8
2022-03-28 10:57:03 -07:00
Treehugger Robot
bd20e92e98 Merge changes I8a2764a6,I6e8b9d63,I6e041dfc am: 6079d30145 am: c7714c5763
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2044690

Change-Id: Ie08d57f083086b52c28f58a241d0a4d5f19059af
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-26 02:06:51 +00:00
Treehugger Robot
c7714c5763 Merge changes I8a2764a6,I6e8b9d63,I6e041dfc am: 6079d30145
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2044690

Change-Id: I4e13c3d3bb4c335920bb9b49f2480ec91cb71020
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-26 01:43:55 +00:00
Treehugger Robot
6079d30145 Merge changes I8a2764a6,I6e8b9d63,I6e041dfc
* changes:
  Canonicalize cgroup paths
  Micro-optimize MergeCgroupToDescriptors()
  Fix support for optional cgroup attributes
2022-03-26 01:25:30 +00:00
Bart Van Assche
d31602063e Canonicalize cgroup paths
Make it possible to verify whether the memory cgroup controller has been
mounted in the v2 hierarchy by comparing its path with the cgroup v2
path. This patch changes the path of cgroup controllers mounted in the
v2 hierarchy from /sys/fs/cgroup/. into /sys/fs/cgroup (no trailing /.).

Bug: 213617178
Test: Added debug code that prints the path for the memory cgroup in the
Test: v2 hierarchy.
Change-Id: I8a2764a6daae84caecf360a918eab62778e3f546
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-03-25 16:11:45 -07:00
Bart Van Assche
ebea9097a8 Micro-optimize MergeCgroupToDescriptors()
Introduce a local variable for an expression that occurs twice. Use
string append instead of string concatenation because the former is more
efficient.

Bug: 213617178
Test: Compile-tested only.
Change-Id: I6e8b9d63b10accb220216dc484dffd18f5c54ce7
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-03-25 16:11:10 -07:00
Bart Van Assche
9b5a232083 Fix support for optional cgroup attributes
The Linux kernel returns error code EACCES (Permission denied) if either
a cgroup attribute does not exist or if the process that is trying to
write into a cgroup attribute does not have permission to write. In
other words, it is not possible to tell the difference between these two
scenarios by checking the value of 'errno'. Hence this patch that adds a
stat() call to check whether or not a cgroup attribute exists. This
patch makes lines like the following disappear from logcat for optional
cgroup attributes:

03-22 23:16:04.816   616   649 E libprocessgroup: Failed to write '0' to /sys/fs/cgroup/./uid_10077/p
id_1695/io.group_idle: Permission denied

Bug: 213617178
Test: Booted Android in Cuttlefish and inspected logcat.
Change-Id: I6e041dfc34a52c9bdb75a8c70d99ad79b06eee06
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-03-25 14:37:16 -07:00
Treehugger Robot
0278d2c539 Merge "Fix the cgroup directory owner in createProcessGroupInternal()" am: daf60339ff am: b2839ef496
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2039464

Change-Id: Ib7d033855761e60ad112811e762ff4d822004dc3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 21:33:15 +00:00
Treehugger Robot
b2839ef496 Merge "Fix the cgroup directory owner in createProcessGroupInternal()" am: daf60339ff
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2039464

Change-Id: I377c0b79356eec97a53682effda27213175600a1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 21:16:50 +00:00
Ray Ye
05eaac890e Merge "Added async trace functions with a track name argument" am: 9f6770e6a6 am: d2d203337f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2037685

Change-Id: Iea7d083a8d88baeab39ee49f5f6801dfb84db761
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 21:09:28 +00:00
Treehugger Robot
daf60339ff Merge "Fix the cgroup directory owner in createProcessGroupInternal()" 2022-03-25 21:02:45 +00:00
Ray Ye
d2d203337f Merge "Added async trace functions with a track name argument" am: 9f6770e6a6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2037685

Change-Id: I3d12094d4885d247289dda09011680ce25a8a350
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 20:50:50 +00:00
Ray Ye
9f6770e6a6 Merge "Added async trace functions with a track name argument" 2022-03-25 20:33:45 +00:00