Commit graph

86586 commits

Author SHA1 Message Date
Siim Sammul
85f22598ff Merge "Move tombstone_proto_to_text out of libdebuggerd." into main am: 73ade16187
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2836598

Change-Id: Ibf7fec2cde55607330624a6535e160005bb82121
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 11:00:59 +00:00
Siim Sammul
73ade16187 Merge "Move tombstone_proto_to_text out of libdebuggerd." into main 2023-12-06 10:13:18 +00:00
Treehugger Robot
cefc3e1584 Merge "Fix cow v3 size estimation errors" into main am: 442990fc5c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2861265

Change-Id: I342e92d27e701dab65d14ba595b37ef83d49f33e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 07:45:26 +00:00
Treehugger Robot
522ebe90cf Merge "Fix -Wunused-variable compiler warning" into main am: e5524c0669
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2861269

Change-Id: I0de12b886e4b3ab6a823e72368fc8ea1ae2d3f8d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 07:44:45 +00:00
Treehugger Robot
442990fc5c Merge "Fix cow v3 size estimation errors" into main 2023-12-06 06:32:13 +00:00
Treehugger Robot
e5524c0669 Merge "Fix -Wunused-variable compiler warning" into main 2023-12-06 06:17:34 +00:00
Kelvin Zhang
d45c50911f Fix cow v3 size estimation errors
Current cow size estimation is computed by taking the offset of next
data write. However, during COW size estimation we repeatdly increment
op_count_max. Since data section is placed right after op section,
incrementing  op_count_max has the effect of moving the beginning of
data section. next_data_pos_ is never updated in this process, causing
the final estiamte to be off.

Test: th
Bug: 313962438
Change-Id: I250dff54c470c9c20d6db33d91bac898358dee31
2023-12-05 21:27:38 -08:00
Yi Kong
90f6cb4b2c Fix -Wunused-variable compiler warning
Test: presubmit
Change-Id: Ia6d0a735c94c7be39994fb9c8ae4d3b65d6f4301
2023-12-06 14:07:36 +09:00
Jaegeuk Kim
28623a220f Merge "Use target path when handling dm-bow" into main am: 2f56ec931a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2860710

Change-Id: Idd3168510ac124007742a17fcd4424995e9c652e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 02:59:16 +00:00
Jaegeuk Kim
2f56ec931a Merge "Use target path when handling dm-bow" into main 2023-12-06 02:34:37 +00:00
Treehugger Robot
037e20d349 Merge "Match upstream API change" into main am: 1772cd427c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2861266

Change-Id: I2b8f99495f5ccf12179f881c9c5d337c4a0bf2f0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 02:34:10 +00:00
Treehugger Robot
1772cd427c Merge "Match upstream API change" into main 2023-12-06 01:28:10 +00:00
Jaegeuk Kim
995dd0385e Use target path when handling dm-bow
Refactor getting sysfs directory.

Bug: 312817490
Change-Id: Icc12002d3f5a2e24f86ce88e5e602cf7a71b0f84
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2023-12-05 17:16:17 -08:00
Florian Mayer
6757ecd2a3 Match upstream API change
Change was done in
e68c265543

Change-Id: Id1a288dfdb5edb7cb7d639ec4548926cc4085d8c
2023-12-06 00:16:43 +00:00
Kelvin Zhang
0c6bfd49c9 Merge "Fix multiple calls to set_[source/type]" into main am: ad51f09b05
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2860565

Change-Id: Ic7f011fd8bb33a4b87616e48fa2c3622415ad239
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-05 21:20:44 +00:00
Kelvin Zhang
ad51f09b05 Merge "Fix multiple calls to set_[source/type]" into main 2023-12-05 20:15:41 +00:00
Kelvin Zhang
12e0531224 Fix multiple calls to set_[source/type]
Since currently implementation just does an bitwise or with the
storage unit, multiple calls to set_source would result in overlapping
bits. Fix by first clear the existing storage.

Test: th
Bug: 313962438
Change-Id: Iecfe8dd244c0f65ecd3cacb0404fdc39ef836d97
2023-12-05 10:28:12 -08:00
Yi Kong
b3062ab360 Merge "Fix -Wunused-variable compiler warning" into main am: 96fd39c228
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2858392

Change-Id: Ie98b0e4184d6aff26476a4ee654c38fce9c10ea1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-05 15:39:51 +00:00
Lucas Henneman
f362c2d600 Merge "TEST_MAPPING: fix syntax of TODO tag" into main am: eadaf5faff
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2854047

Change-Id: Ia1caa7a642c13c9bf7b88cc9f2841df8f4d1cc63
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-05 15:39:02 +00:00
Yi Kong
96fd39c228 Merge "Fix -Wunused-variable compiler warning" into main 2023-12-05 15:01:46 +00:00
Lucas Henneman
eadaf5faff Merge "TEST_MAPPING: fix syntax of TODO tag" into main 2023-12-05 14:29:55 +00:00
Siim Sammul
c08a34e3dc Move tombstone_proto_to_text out of libdebuggerd.
This is done so that we could depend on it elsewhere without needing all the unrelated methods.
Needed for ag/24553347

Bug: 296207744
Test: refactoring build
Change-Id: I7c6733208f3ae63ba9559753a24cffcb8e1b9d1e
2023-12-05 10:14:27 +00:00
Yi Kong
b8bbc43489 Fix -Wunused-variable compiler warning
Test: presubmit
Change-Id: I63b1625decd3dcdb9f405c8825203e04810c282c
2023-12-05 18:36:00 +09:00
Florian Mayer
4841207b53 Handle scudo_stack_depot_size = 0
Bug: 309446692
Change-Id: Ic55294316137847041f1e829cb0243aae8926379
2023-12-04 17:29:23 -08:00
Florian Mayer
e8fcfee409 Use scudo_stack_depot_size from process_info
This is a no-op but will be used in upcoming scudo changes that allow to
change the depot size at process startup time, and as such we will no
longer be able to call __scudo_get_stack_depot_size in debuggerd.

We already did the equivalent change for the ring buffer size in
https://r.android.com/q/topic:%22scudo_ring_buffer_size%22

Bug: 309446692
Change-Id: I761a7602c54a1f8f2d0575c5e011820d8dbaab63
2023-12-04 16:48:45 -08:00
Akilesh Kailash
9e58ddbf40 Merge changes from topic "ota-tune-1" into main am: 160e4c3cee
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2835691

Change-Id: I8f17e1107fc5be34d226b1fbd9b28a41c5dc1631
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-04 23:54:28 +00:00
Akilesh Kailash
160e4c3cee Merge changes from topic "ota-tune-1" into main
* changes:
  Allow direct reads on source device
  libsnapshot: Tune readahead during OTA for source and COW block device
2023-12-04 23:53:41 +00:00
Treehugger Robot
7d9110eca0 Merge "Allow Cow version v3 to be used" into main am: f7fffb62d4
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2856178

Change-Id: I819247c40c8d92ff8ba74bd18da44c32acc33fa4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-04 23:38:47 +00:00
Treehugger Robot
f7fffb62d4 Merge "Allow Cow version v3 to be used" into main 2023-12-04 23:02:53 +00:00
Akilesh Kailash
52f1c19a17 Allow direct reads on source device
Allow O_DIRECT reads on source block device.
This will further cut down the Active and Inactive file pages
during partition verification.

On Pixel 6 after incremental OTA - Post OTA reboot:

		Without patch      With patch     Delta
--------------------------------------------------------
Inactive(File):  4992MB             3887MB         ~22%
Active(File):    1465MB             1014MB         ~30%

Boot time however increases from 25 to 30 seconds.

This is not yet enabled. This will be behind a sysprop flag
or for low memory devices and will be enabled later.

Additionally, set the priority of worker threads to normal.
Merge threads priority is reduced. This will help low memory
devices as tested on Pixel watch.

Bug: 311233916
Test: OTA on Pixel 6
Change-Id: Icacdef08d68e28d3062611477703e7cf393a9f10
Signed-off-by: Akilesh Kailash <akailash@google.com>
2023-12-04 14:07:42 -08:00
Akilesh Kailash
a8f6ce3344 libsnapshot: Tune readahead during OTA for source and COW block device
Scanning of partitions post OTA leads to memory pressure. Tune
the read-ahead of source and COW block device. This is currently
set to 32KB.

This reduces Inactive(file) and Active(file) usage during entire
duration of boot post OTA.

On Pixel 6: For incremental OTA ~400M. During boot:

                            Without-patch         With-patch    Delta
			    --------------------------------------------
1: Peak Inactive(file):     4469MB                3118MB        ~30%

2: Peak Active(file):       985MB                 712MB         ~27%

No regression observed on boot time.

Additionally, cut down the number of threads to verify the partitions.

Bug: 311233916
Test: Incremental OTA on Pixel 6
Change-Id: I0b842776c36fa089c39c170fa7bf0f246e16636d
Signed-off-by: Akilesh Kailash <akailash@google.com>
2023-12-04 14:07:26 -08:00
Treehugger Robot
5e3a8ab891 Merge "Shove CowOperation type into source_info" into main am: 240f7084be
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2850213

Change-Id: I8971598d51ba524df2c9e41da0c26ae226d36b91
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-04 19:33:50 +00:00
Treehugger Robot
240f7084be Merge "Shove CowOperation type into source_info" into main 2023-12-04 18:50:46 +00:00
Kelvin Zhang
7d526560df Allow Cow version v3 to be used
This does not change the default cow version. Currently v2 is still the
default. This CL only enables OEMs to set virtual_ab_cow_version to 3
for testing purposes.

Test: th
Bug: 313962438
Change-Id: I7a328fa32283560a48604ffe02edd2551ac49a83
2023-12-04 09:29:20 -08:00
Kelvin Zhang
2bf1da5d2c Shove CowOperation type into source_info
We can shove type into source info to save 8 bits in per cow operation.
We only need 4 bits inside of source_info to enumerate all the types of
Cow Operation. Since CowOperationV3 is not used on disk(just yet) , we
can make format changes.

This CL is mechanical:
    1. Remove tye .type field from CowOperation struct
    2. Add a type() getter method to CowOperation struct
    3. Replace all existing usage of `type` member with the new getter

No functional changes, just refactorings.

Test: th
Bug: 304602386
Bug: 313962438

Change-Id: I85d89c71fc6afede12ea299a4a3e3b2184ea2d8b
2023-12-04 09:14:20 -08:00
Treehugger Robot
4fd99c9191 Merge "fs_mgr_overlayfs: MapScratchPartitionIfNeeded always tries to create scratch" into main am: 3ecba6b927
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2845636

Change-Id: Ieb56d0f6d300c81a5a3e048ffb8e7d35126182de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-04 04:02:40 +00:00
Treehugger Robot
3ecba6b927 Merge "fs_mgr_overlayfs: MapScratchPartitionIfNeeded always tries to create scratch" into main 2023-12-04 02:53:30 +00:00
Elliott Hughes
d6d8ef71e0 Merge "fs_mgr: IWYU include <algorithm> for std::sort" into main am: 1784219094
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2839495

Change-Id: Ief79a69b39bb725a04f420dad1374255c9ea378a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-01 22:55:42 +00:00
Elliott Hughes
1784219094 Merge "fs_mgr: IWYU include <algorithm> for std::sort" into main 2023-12-01 22:22:34 +00:00
Lucas Henneman
3bcfa9c039 TEST_MAPPING: fix syntax of TODO tag
Bug: 279009697
Test: git diff
Change-Id: I7133bc0abe6634193b0fb006f5cd77ed2dc05844
Signed-off-by: Lucas Henneman <henneman@google.com>
2023-12-01 20:17:42 +00:00
Bart Van Assche
9820b1d9a3 Merge "task_profiles.json: Set io.prio.class" into main am: 1a97c485d0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2768906

Change-Id: Id11851a9fac06d69ca2fb321ae1b7e353853e0f5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-01 19:18:23 +00:00
Bart Van Assche
1a97c485d0 Merge "task_profiles.json: Set io.prio.class" into main 2023-12-01 18:02:56 +00:00
Bart Van Assche
cfd44f56de Merge "service_test: Only run the ServiceStopTest as root" into main am: a34c125cad
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2854013

Change-Id: I64013f0097757b529dc809997abc13032f20163e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-01 03:58:21 +00:00
Treehugger Robot
f3170564c2 Merge "Allow to set scudo allocation buffer size" into main am: 56f7436a3e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2822611

Change-Id: I5dc53010458ccf70c8ebf13e6e5d798e0e208bc8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-01 03:25:27 +00:00
Bart Van Assche
a34c125cad Merge "service_test: Only run the ServiceStopTest as root" into main 2023-12-01 03:08:02 +00:00
Treehugger Robot
56f7436a3e Merge "Allow to set scudo allocation buffer size" into main 2023-12-01 02:52:38 +00:00
Daniel Rosenberg
cab0371198 Merge changes I1ecdffcb,Ib0d1ea81 into main am: 4ae617f676
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2837188

Change-Id: Ic75a8c831a57f7c3c43fea75a5c7157c62a3d549
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-01 01:52:02 +00:00
Daniel Rosenberg
4ae617f676 Merge changes I1ecdffcb,Ib0d1ea81 into main
* changes:
  fs_mgr: Support 16k F2FS
  fs_mgr_overlayfs: Support 16k F2FS
2023-12-01 00:52:16 +00:00
Bart Van Assche
9bba87244d task_profiles.json: Set io.prio.class
Provide an additional way to request the block layer to prioritize
foreground I/O over background I/O. This patch prepares for tests with
the mq-deadline I/O scheduler. While CFQ and BFQ support a "weight"
cgroup attribute, the mq-deadline scheduler does not. The mq-deadline
I/O scheduler only supports the I/O priority class for differentiating
I/O priorities.

The io.prio.class attribute is declared optional since this attribute
only exists if CONFIG_BLK_CGROUP_IOPRIO != n in the kernel
configuration.

Bug: 186902601
Change-Id: Iee1004cd0996e32245aff2b51772ef40178e024f
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-11-30 10:00:44 -08:00
Bart Van Assche
fb3e64ab42 service_test: Only run the ServiceStopTest as root
Despite 'require_root: true' in Android.bp for CtsInitTestCases, it can
happen that this test is run without root privileges. If that happens,
skip the ServiceStopTest.

Bug: 313551148
Change-Id: I45f29369915a1f61e08ffd9bf5601a83a147597c
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-11-30 10:00:43 -08:00