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
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>
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
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
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>
As part of the effort to uprev libchrome in Android, we are
removing Android dependencies to libchrome utility functions
that are not strictly required.
This CL remove the usage of base::RandInt and replace by std cpp
Bug: 360917504
Change-Id: I83ea0f00ca07074f8c6c9a69db343a65cc8deb27
Test: atest libfs_avb_internal_test
As part of the effort to uprev libchrome in Android, we are
removing Android dependencies to libchrome utility functions
that are not strictly required.
This CL remove the usage of base/string/* and replace by
android-base/string*
Bug: 360917504
Change-Id: I89e7bdd66bdf8f565f6b2084a70335616a644069
Test: atest libfs_avb_internal_test
This will print the values of the strings which are not equal
so that we can debug.
Bug: 366531882
Test: build, TH
Change-Id: I36a2b8d3fbda145e07cd8ccb01152a3a3adf21b0
As part of the effort to uprev libchrome in Android, we are
removing Android dependencies to libchrome utility functions
that are not strictly required.
This CL remove the usage of base/logging.h and replace by
android-base/logging.h
Bug: 360917504
Test: atest libfs_avb_internal_test
Change-Id: Ibcc476aebcff2fe5cfc2e3a3cd04168c02bc05f5
F2FS does not support page_size!=block_size configuration, and
dev option devices need to toggle between 4K/16K mode, hence F2FS
requires a data wipe every time page size changes. This is inconveinent,
skip F2FS formatting instead.
The original CL had a bug where `iter->blk_device` is accessed before
checking if `iter` is out of bounds. Fixed by flipping order of two
conditions in an && operator.
Test: th
Bug: 353436188
This reverts commit 642a98e2a7.
Change-Id: I89551f219efc44bad29a190edff5412a5cc67840
If the device exists only on /data, then the image path should
be checked with -img.
Bug: 330744468
Test: snapshotctl apply-update
Change-Id: I64ff7d803fdaaa02d2d6929994ad1124bfffab8b
Signed-off-by: Akilesh Kailash <akailash@google.com>
"lazytime" as a mount option was removed recently in favor of
MS_LAZYTIME. This is causing mount failures when calling
IVold::commitChanges.
Bug: 329657783
Test: cuttlefish on android-mainline
Change-Id: Id01c1e5bbd0c82e07126be65f638e16600c058e3
libsnapshot_init is linked by microdroid. Adding libselinux as whole_static_libs in `libsnapshot_defaults` will bloat the super image of microdroid.
Instead, statically link libselinux for libsnapshot_init.
On Pixel 7 Pro:
Microdroid super image: 47173836
Baseline (Without this change): 47161548
Bug: 362839899
Test: Build, verify microdroid super image size.
Change-Id: I3c589097173b305c1d39af9edbfb8c5e29f21410
Signed-off-by: Akilesh Kailash <akailash@google.com>
We want to avoid the usage of size_t for any integer value that could
exceed 2^32 (for 32 bit platforms). Let's update the usage here for
future compatibilty and avoid silent truncation failures.
Bug: 361048795
Test: th
Change-Id: I9ce2ca21706270a218f06f7d2b7dc9fade185a68
F2FS does not support page_size!=block_size configuration, and
dev option devices need to toggle between 4K/16K mode, hence F2FS
requires a data wipe every time page size changes. This is inconveinent,
skip F2FS formatting instead.
Test: th
Bug: 353436188
Change-Id: Ic33dbc39c16db3aee4c47349a9693aacec240de8
snapshot metadata files are stored in /metadata. This means, we cannot
wipe after installing any update.
This patch does the following:
1: Create a scratch space in super partition. The scratch space for ota
metadata is just about 1MB.
2: Create ext4 filesystem on top of scratch block device.
3: Mount the scratch on /mnt/scratch_super
4: When snapshot-manager instance is created, point the /mnt/scratch/ota
to metadata_dir_ so that all the snapshot files are stored in the new
path.
All the logic of OTA remains the same. This flow is enabled only on userdebug builds for now and the only consumer would be snapshotctl
$snapshotctl apply-update /data/nbd/ -w
During init, we would have to mount the scratch partition to detect
if there is any pending updates.
With this, we would now be able to wipe the device along with the update flow. This will help incremental flashing wherein we would end up saving ~35-40 seconds on Pixel devices.
With this flow, the end-to-end update for incremental builds takes
~20-30 seconds.
Bug: 330744468
Test: Pixel 6 incremental flashing with wipe, Full OTA, vts_libsnapshot
Change-Id: Iac6ce2cf37b70ea221cd18175c8962988d03d95b
Signed-off-by: Akilesh Kailash <akailash@google.com>
If bootconfig hibernation_resume_device is present in boot config, then
we write that value to /sys/power/resume
Bug: 339688542
Test: Check resume from hibernation/boots with/without config present
Change-Id: I1a9bf63af4dab07e494740722898c1aba33c00b5