CMParts: Allow CompCache size to be set by user - via % of total RAM
Use % instead of a set size - per suggestion from Cyanogen
Fix to integer instead of decimal being passed around - props to Nameless
Handle older versions changing enabled CC to Default CC size (25%)
Enable PerformanceSettings dialog to view new CC setup
Final cleanup and fix default values / bash arithmetic
Change-Id: Ie7525cfa1f8829bb037961a66620ab8664f39cec
German translation - Matthias Büchner
French translation - Sébastien Vaucher
diff --git a/prebuilt/common/bin/compcache b/prebuilt/common/bin/compcache
index ffadb3e..6c9a4f0 100755
--- a/prebuilt/common/bin/compcache
+++ b/prebuilt/common/bin/compcache
@@ -12,7 +12,7 @@
start)
echo 3 > /proc/sys/vm/drop_caches
modprobe $MODULE
- rzscontrol $DEV --init
+ rzscontrol $DEV --disksize_kb=$2 --init
swapon $DEV
;;
@@ -24,7 +24,7 @@
rzscontrol $DEV --stats
;;
*)
- echo "Usage: $0 {start|stop|stats}"
+ echo "Usage: $0 {start <size>|stop|stats}"
exit 1
esac