From 427fea8b493f4c6e1fe34a3992da61e0401c7c1c Mon Sep 17 00:00:00 2001 From: Daniel Zheng Date: Wed, 15 May 2024 11:14:11 -0700 Subject: [PATCH] Add build configs for wearable tunables Low memory devices place special emphasis on memory constraints and cpu utilization. We want to expose a set of build configurations that allow these devices to fine tune resource usage during OTA installation. Our strategy will be the following. 1. For any tunable needed in first stage init, read the .ro prop during ota installation, propogate the configuration to SnapshotUpdateStatus proto, then read the property from /metadata upon first reboot (since .ro properties are not available here) 2. For tunables which aren't needed until second stage init, read the .ro prop directly. This first CL will just add the build configurations to the build system. Subsequent CL's will forward the configs to protobufs and snapuserd daemon Bug: 332255580 Test: th Change-Id: I31b36b42f8fba997c772fe1a4ba99b17128b3eca --- target/product/virtual_ab_ota/vabc_features.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/target/product/virtual_ab_ota/vabc_features.mk b/target/product/virtual_ab_ota/vabc_features.mk index 3f484e4f3e..1219763b0d 100644 --- a/target/product/virtual_ab_ota/vabc_features.mk +++ b/target/product/virtual_ab_ota/vabc_features.mk @@ -34,6 +34,21 @@ PRODUCT_VENDOR_PROPERTIES += ro.virtual_ab.userspace.snapshots.enabled=true PRODUCT_VENDOR_PROPERTIES += ro.virtual_ab.io_uring.enabled=true PRODUCT_VENDOR_PROPERTIES += ro.virtual_ab.compression.xor.enabled=true PRODUCT_VENDOR_PROPERTIES += ro.virtual_ab.batch_writes=true +# Low memory device configurations. If memory usage and cpu utilization is +# a bottleneck during OTA, the below configurations can be added to a +# device's .mk file improve performance for low mem devices. Disabling +# ro.virtual_ab.compression.xor.enabled and ro.virtual_ab.io_uring.enabled +# is also recommended +# +# PRODUCT_VENDOR_PROPERTIES += ro.virtual_ab.o_direct.enabled=true +# PRODUCT_VENDOR_PROPERTIES += ro.virtual_ab.merge_thread_priority=19 +# PRODUCT_VENDOR_PROPERTIES += ro.virtual_ab.worker_thread_priority=0 +# PRODUCT_VENDOR_PROPERTIES += ro.virtual_ab.num_worker_threads=3 +# PRODUCT_VENDOR_PROPERTIES += ro.virtual_ab.num_merge_threads=1 +# PRODUCT_VENDOR_PROPERTIES += ro.virtual_ab.num_verify_threads=1 +# PRODUCT_VENDOR_PROPERTIES += ro.virtual_ab.cow_op_merge_size=16 +# PRODUCT_VENDOR_PROPERTIES += ro.virtual_ab.verify_threshold_size=1073741824 +# PRODUCT_VENDOR_PROPERTIES += ro.virtual_ab.verify_block_size=1048576 # Enabling this property, will improve OTA install time # but will use an additional CPU core