Commit graph

90340 commits

Author SHA1 Message Date
Treehugger Robot
3aff5e6b0a Merge "libprocessgroup: Use pid_t for ProfileAction::ExecuteForTask" into main 2024-10-10 00:13:25 +00:00
T.J. Mercier
b53eb9dbc6 libprocessgroup: Use pid_t for ProfileAction::ExecuteForTask
This was missed in commit 1c007996b ("libprocessgroup: Use pid_t
consistently for TIDs").

Change-Id: Idefc9e7c2161ab3163bd1a0cb68b899e10e9c8ed
2024-10-09 22:47:40 +00:00
Treehugger Robot
499643e456 Merge "init: Remove schedtune support" into main 2024-10-09 20:45:29 +00:00
Treehugger Robot
cd2475ccf6 Merge "libprocessgroup: Remove prctl interface for setting timer slack" into main 2024-10-09 19:54:07 +00:00
T.J. Mercier
0750081742 libprocessgroup: Remove prctl interface for setting timer slack
Support for the procfs timerslack interface has existed since linux 4.6.
All currently supported Android kernels are newer than 4.6, so remove
the userspace support for the prctl interface leaving just the use of
/proc/<tid>/timerslack_ns.

Bug: 372498744
Change-Id: Ib34cc6fbb4bab328cde51d60ac4e3b26a0d72851
2024-10-09 18:43:56 +00:00
Treehugger Robot
53d6db02c1 Merge "trusty: tipc-test: Fix D argument" into main 2024-10-09 17:45:27 +00:00
Per Larsen
699faa849b trusty: tipc-test: Fix D argument
The D flag requires an argument so it should be followed by a colon
in sopts. Adding the missing colon is necessary to prevent a segfault.

Test: path/to/tipc-test -D VSOCK:200:1
Bug None

Change-Id: I78119b7e42aba5d30b62d88ff5d94c01dbc2eb64
2024-10-09 11:23:32 +00:00
Treehugger Robot
5a6ab7d869 Merge "snapshotctl: Initialize snapshot pointer when reverting snapshots" into main 2024-10-09 07:11:03 +00:00
Treehugger Robot
5c8ebb2570 Merge "Use __ANDROID_VENDOR_API__ for vendor API surface" into main 2024-10-09 06:25:46 +00:00
Akilesh Kailash
e69b2d4277 snapshotctl: Initialize snapshot pointer when reverting snapshots
Test: snapshotctl revert-snapshots
Bug: 368487904
Change-Id: I9743bf412d4bfcf508aeb046ec329568da4e2be1
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-10-09 04:37:47 +00:00
Treehugger Robot
5684f3e059 Merge "Avoid unnecessary allocation in VectorImpl" into main 2024-10-09 00:19:34 +00:00
Priyanka Advani (xWF)
eb34156abe Merge changes from topic "revert-3212512-XCWURMYNFC" into main
* changes:
  Revert "libprocessgroup: Remove cgroup.rc file"
  Revert "libprocessgroup: Remove dependency on libcgrouprc"
  Revert "libprocessgroup: Remove ACgroupController_getMaxActivati..."
  Revert "libprocessgroup: Combine all 3 ActivateControllers imple..."
2024-10-08 20:35:53 +00:00
Priyanka Advani (xWF)
972a2d30f8 Revert "libprocessgroup: Remove cgroup.rc file"
Revert submission 3212512

Reason for revert: Droidmonitor created revert due to b/372273614. Will be verifying through ABTD before submission.

Reverted changes: /q/submissionid:3212512

Change-Id: I37568516e973cb940f1229d52f94b8dc801da2ab
2024-10-08 18:54:37 +00:00
Priyanka Advani (xWF)
691ad736bb Revert "libprocessgroup: Remove dependency on libcgrouprc"
Revert submission 3212512

Reason for revert: Droidmonitor created revert due to b/372273614. Will be verifying through ABTD before submission.

Reverted changes: /q/submissionid:3212512

Change-Id: I15c7763467cd9f65d4b389b2d4ccaff92012f21f
2024-10-08 18:54:37 +00:00
Priyanka Advani (xWF)
aeca8793f5 Revert "libprocessgroup: Remove ACgroupController_getMaxActivati..."
Revert submission 3212512

Reason for revert: Droidmonitor created revert due to b/372273614. Will be verifying through ABTD before submission.

Reverted changes: /q/submissionid:3212512

Change-Id: I0964d1300791334cdc9e98220324d934f7ba113e
2024-10-08 18:54:37 +00:00
Priyanka Advani (xWF)
0fa49253a4 Revert "libprocessgroup: Combine all 3 ActivateControllers imple..."
Revert submission 3212512

Reason for revert: Droidmonitor created revert due to b/372273614. Will be verifying through ABTD before submission.

Reverted changes: /q/submissionid:3212512

Change-Id: I3dadc0b7bccfe28bb067a93df2acf2c3ea0f9920
2024-10-08 18:54:40 +00:00
T.J. Mercier
90dc57cea8 Merge changes from topic "No cgroup.rc" into main
* changes:
  libprocessgroup: Combine all 3 ActivateControllers implementations into one
  libprocessgroup: Remove ACgroupController_getMaxActivationDepth
  libprocessgroup: Remove dependency on libcgrouprc
  libprocessgroup: Remove cgroup.rc file
2024-10-08 17:36:42 +00:00
Shai Barack
e0ec952bae Avoid unnecessary allocation in VectorImpl
When shrinking a vector, we might reallocate the buffer
if the current capacity is too large, or we might reuse
the existing buffer.
Never reallocate the buffer if the current capacity is
already at the minimum (i.e. we won't actually shrink by
reallocating).

Bug: 370649413
Change-Id: I665037ed2a8621a82f2b58bcc834934de0761f34
Flag: EXEMPT bugfix
Tested: see b/370649413#comment6
2024-10-08 08:36:03 +00:00
Treehugger Robot
fcbdb00558 Merge "Remove libstats*_lazy tests from MTS" into main 2024-10-08 02:13:26 +00:00
Tej Singh
42dbd2de87 Remove libstats*_lazy tests from MTS
libstatssocket_lazy_test and libstatspull_lazy_test test primaryly the
lazy libs that ship from the platform. As a result, they shouldn't be in
MTS

Bug: 363078348
Test: TH
Change-Id: Iac7e2797d9f8c432f00688a49d53aa2691a52789
2024-10-07 18:14:22 -07:00
Armelle Laine
ef0539718b Merge "trusty-ut-ctrl: Allow stream mode" into main 2024-10-07 21:28:53 +00:00
Jaegeuk Kim
7179bd1a02 Merge "fiemap_writer_test: add block truncation and sync for safety" into main 2024-10-07 17:04:08 +00:00
Justin Yun
3a7cb4c637 Use __ANDROID_VENDOR_API__ for vendor API surface
Build system defines __ANDROID_VENDOR_API__ for non-system modules.
Use this flag to provide vendor API surface for vendor or product
variant modules.

Bug: 368559337
Test: atest AImageReaderWindowTest
Change-Id: I7da3d4ca9f92255a426af8d66b4391f3c1426759
2024-10-07 16:56:06 +09:00
Jaegeuk Kim
623682af2f fiemap_writer_test: add block truncation and sync for safety
There is a delay to get inode evicted whic requires to deallocate blocks used
by the previous test. Let's secure the pinned space as much as possible.

Bug: 371822983
Change-Id: I4cc69fc61e348511bb027ca0a9dd277fffb20f7f
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2024-10-06 20:19:37 +00:00
Treehugger Robot
7cc50a8c29 Merge "init/epoll: clean up reorder-init-list warning" into main 2024-10-04 17:33:25 +00:00
Treehugger Robot
f348909323 Merge "Revert "init: Wait for /dev/hvc1 during ARCVM first-stage mount"" into main 2024-10-04 17:28:04 +00:00
Neill Kapron
551c6018c8 init/epoll: clean up reorder-init-list warning
This change cleans up the following build warning:

warning: ISO C++ requires field designators to be specified in
declaration order; field 'events' will be initialized after field
'handler' [-Wreorder-init-list]

Bug: none
Test: TH
Change-Id: I9fe566b452438dc9f00f782fc4435905227a60c9
Signed-off-by: Neill Kapron <nkapron@google.com>
2024-10-04 15:57:35 +00:00
T.J. Mercier
50fd822149 init: Remove schedtune support
Schedtune was an out of tree cgroup controller present in Android
kernels up to 4.19. It was replaced with uclamp and the cpu controller.
Now that 4.19 is EOL and unsupported, and schedtune is not present in
any supported Android kernels, remove the userspace support for
schedtune.

Bug: 362504801
Change-Id: Iab7b7295d1fb443209d5868ac5c65dca0aabfbab
2024-10-04 14:53:27 +00:00
Konrad Adamczyk
8278575b91 Merge "Revert "init: Look for super partition only on a boot device"" into main 2024-10-04 06:24:26 +00:00
Jusik Chung
8d71220df2 Revert "init: Look for super partition only on a boot device"
This reverts commit 6f0ebcb526.

Reason for revert: b/371393845 boot up failure of gcar emulator

Change-Id: I15e5bea609938cf5a1e347666b9a2abb287cb086
2024-10-04 02:21:37 +00:00
Tiffany Yang
36ea62f1fd Revert "init: Wait for /dev/hvc1 during ARCVM first-stage mount"
This reverts commit b885e4ad53.

Reason for revert: No longer needed (using virtio-blk instead)

Change-Id: I667f0d4f58060e781a5e9b21c778cd568b92971a
2024-10-03 23:52:54 +00:00
T.J. Mercier
5161033f66 libprocessgroup: Combine all 3 ActivateControllers implementations into one
Remove this code duplication and use just one interface.

Bug: 349105928
Change-Id: Id8c7186d9665e9087a654f5781b7593b06349160
2024-10-03 17:01:34 +00:00
T.J. Mercier
c31c5a75c8 libprocessgroup: Remove ACgroupController_getMaxActivationDepth
This was targeted for API 36 which doesn't exist yet, so this was never
released. Now that libprocessgroup does not use the libcgrouprc
interfaces, this can be removed.

Bug: 349105928
Bug: 359609093
Change-Id: I2ea466c9e8bc54bf9178fa74b45e88f26d3e4c69
2024-10-03 17:01:34 +00:00
T.J. Mercier
9d84103bdd libprocessgroup: Remove dependency on libcgrouprc
Read cgroup descriptors ourselves instead of going through the LLNDK
interface which performs the same thing.

Bug: 349105928
Change-Id: I94625ffd0d884d619eb3449e63a305ad5e1d77e3
2024-10-03 17:01:34 +00:00
T.J. Mercier
ae4ce8ccc5 libprocessgroup: Remove cgroup.rc file
The cgroup.rc file was introduced in 192aee782 ("libprocessgroup: Add
support for task profiles") back with the initial support for task
profiles. It was intended to optimize performance associated with cgroup
operations. However over time, supporting this file led to making
libprocessgroup code more complicated (such as the cgrouprc LLNDK
interface), and the file ended up getting mmaped into nearly every
process on Android even though only a handful of them actually use it.
Replacing this file with reading and parsing of cgroup information on
demand allows us to simplify and shrink libprocessgroup, and eliminates
thousands of unused mappings without negatively affecting boot time or
other performance metrics.

Bug: 349105928
Test: Verified with memcg v2 and MaxActivationDepth 1 on Cuttlefish, Raven, and Mokey
Change-Id: Ic3f01fdf7fda89a56ab80657e1cf4573156273e6
2024-10-03 17:01:34 +00:00
Treehugger Robot
8dd9d45534 Merge "Change owner of ACPI BERT tables to system" into main 2024-10-03 14:54:40 +00:00
Rob Barnes
da77c2e1dc Change owner of ACPI BERT tables to system
Changes the owner of the following files to system:system:

* /sys/firmware/acpi/tables
* /sys/firmware/acpi/tables/BERT
* /sys/firmware/acpi/tables/data/BERT

This allows the bert_collector deamon to read these files for error reporting.

Bug: 357626966
Test: m && atest bert_collector_test

Change-Id: Iba3a169f1851566ee6fed6d41b538dae448bf811
2024-10-03 13:54:52 +00:00
Konrad Adamczyk
bd71df6e3a Merge "init: Look for super partition only on a boot device" into main 2024-10-03 09:04:53 +00:00
Arve Hjønnevåg
f29f1a2a38 trusty-ut-ctrl: Allow stream mode
When using vsock in stream mode (or any other stream mode connection)
message boundaries are not preserved, so the original messages can get
both split and merged. The TEST_MESSAGE and TEST_TEXT messages don't
have a length field which makes it imposible to support every possible
message that can be sent over a channel that preserves message
boundaries. Since the current message header types don't contain any
printable character, we assume any of these characters in a message
payload means that two messages got merged, so we split them back up.
Additionally, if we receive a message that does not start with a valid
message header, we assume it is a continuation of the previous message.

Test: trusty-ut-ctrl -D VSOCK:2:1 com.android.libctest ^Z fg
Bug: 298705967
Change-Id: I0e470a23664268f86e4defd824c47be3479c8f25
2024-10-03 04:33:38 +00:00
Daniel Zheng
4174d07b7f Merge "libsnapshot: configure num worker threads" into main 2024-10-02 19:59:02 +00:00
Treehugger Robot
1bf57e1d71 Merge "libprocessgroup: Remove schedtune support" into main 2024-10-02 17:26:11 +00:00
Daniel Zheng
a23013dd4b libsnapshot: configure num worker threads
Forward number of worker threads build configuration to snapuserd. these
are the threads that will be used to serve i/o requests to dm-user.

Bug: 361438985
Test: OTA with print logs post OTA reboot
Change-Id: Ib70a3cb8766b96232ea6f97effece041534dc922
2024-10-02 09:56:06 -07:00
T.J. Mercier
981664df08 libprocessgroup: Remove schedtune support
Schedtune was an out of tree cgroup controller present in Android
kernels up to 4.19. It was replaced with uclamp and the cpu controller.
Now that 4.19 is EOL and unsupported, and schedtune is not present in
any supported Android kernels, remove the userspace support for
schedtune.

Bug: 362504801
Change-Id: If8baaf1a616984c5dbaac1bbd03e23ad001bc29c
2024-10-02 14:47:45 +00:00
Treehugger Robot
aa56f29ff9 Merge "Replace ANDROID_VENDOR with ANDROID_VNDK in versioning" into main 2024-10-01 05:38:46 +00:00
Hans Boehm
47ec15c928 Merge "Remove unnecessary getpriority() system call" into main 2024-09-30 18:21:39 +00:00
Sandeep Dhavale
dcb13446f2 Merge "libsnapshot: Use words for xor ops" into main 2024-09-30 16:26:50 +00:00
Sandeep Dhavale
0d84909d66 libsnapshot: Use words for xor ops
Use words instead of doing xor byte-by-byte for the entire buffer.
Profiling this with unittest, I can see the xor ops is much faster.

Also handle the word size appropriately for 32bit and 64bit platforms.

simpleperf shows that ProcessXorOp() is atleast 30% faster.
Similar improvement is seen for ProcessXorData().

Test: snapuserd_test
Bug: 369905394
Change-Id: I0bd8586f7fc1bf184f19320667b8195b07f9cdf2
Signed-off-by: Sandeep Dhavale <dhavale@google.com>
2024-09-27 14:55:06 -07:00
Jan Dabros
6f0ebcb526 init: Look for super partition only on a boot device
Init code is bailing out as soon as `super` partition was
found in the system, ignoring rest of uevents.

In case given device contains multiple boot sources, `super`
partition as well as all other partitions shall be taken
from the same boot source, instead of relying on
`which uevent came first`.

Bug: 309244873, 349144493
Test: Plug secondary USB boot device to device that supports multiple
      boot sources. Select boot from USB. Device boots properly.

Signed-off-by: Jan Dabros <dabros@google.com>
Signed-off-by: Konrad Adamczyk <konrada@google.com>

Change-Id: I70eb7d4223258ec273faa523cb67ddab0b7c32a0
2024-09-27 06:43:00 +00:00
Vova Sharaienko
778ad88da6 Merge "Added ownership attribution for test targets" into main 2024-09-26 22:18:57 +00:00
Vova Sharaienko
892ef23a9e Merge "Add host support to libexpresslog" into main 2024-09-26 22:18:57 +00:00