A rootless Android app that boots Alpine Linux: run containers (Podman/Docker/LXC) and GUI desktop apps.
perf(qemu): re-enable pauth-impdef + add storage discard=unmap
ExTvc4dd81cc817e
diff --git a/app/src/main/java/com/excp/podroid/data/repository/SettingsRepository.kt b/app/src/main/java/com/excp/podroid/data/repository/SettingsRepository.ktindex 5afd478..c7cc550 100644--- a/app/src/main/java/com/excp/podroid/data/repository/SettingsRepository.kt+++ b/app/src/main/java/com/excp/podroid/data/repository/SettingsRepository.kt@@ -62,7 +62,7 @@ class SettingsRepository @Inject constructor(* paths without ballooning the QEMU process on phones with tight RAM.*/const val DEFAULT_QEMU_EXTRA_ARGS =- "-cpu max,sve=off " ++ "-cpu max,sve=off,pauth-impdef=on " +"-accel tcg,thread=multi,tb-size=512 " +"-object rng-random,id=rng0,filename=/dev/urandom " +"-device virtio-rng-pci,rng=rng0 " +diff --git a/app/src/main/java/com/excp/podroid/engine/PodroidQemu.kt b/app/src/main/java/com/excp/podroid/engine/PodroidQemu.ktindex c8b45e3..b492e49 100644--- a/app/src/main/java/com/excp/podroid/engine/PodroidQemu.kt+++ b/app/src/main/java/com/excp/podroid/engine/PodroidQemu.kt@@ -547,7 +547,12 @@ class PodroidQemu @Inject constructor(// refactor cost. Stick with one iothread, num-queues==vCPUs.args += "-object"; args += "iothread,id=iothread0"args += "-device"; args += "virtio-blk-pci,drive=drive1,num-queues=${config.cpus},iothread=iothread0"- args += "-drive"; args += "file=${storagePath.absolutePath},if=none,id=drive1,format=raw,cache=writeback,aio=threads"+ // discard=unmap + detect-zeroes=unmap: as the guest fstrim's the+ // overlay, hand the punched holes back to the host filesystem so+ // storage.img stops growing unbounded after long-term container+ // churn. detect-zeroes converts all-zero writes (e.g. mkfs.ext4's+ // erasure pass) into discards too.+ args += "-drive"; args += "file=${storagePath.absolutePath},if=none,id=drive1,format=raw,cache=writeback,aio=threads,discard=unmap,detect-zeroes=unmap"}val rootfsImg = File(context.filesDir, "alpine-rootfs.squashfs")