cm: Remove legacy compcache stuff

* Remove all this stuff.  If a device wants ZRAM, it should be
   enabled by the maintainer and properly configured and tuned.
 * This stuff currently causes a conflict with the ZRAM support
   added in Kitkat. Kill it.

Change-Id: Ib2488ea4463e32ec44b65fe786f732145b5b6e23
This commit is contained in:
Steve Kondik 2014-01-04 16:58:59 -08:00
parent 32bbdf6f57
commit 42fb9d8fc5
4 changed files with 0 additions and 96 deletions

View File

@ -97,11 +97,6 @@ PRODUCT_COPY_FILES += \
PRODUCT_COPY_FILES += \
vendor/cm/prebuilt/common/etc/init.local.rc:root/init.cm.rc
# Compcache/Zram support
PRODUCT_COPY_FILES += \
vendor/cm/prebuilt/common/bin/compcache:system/bin/compcache \
vendor/cm/prebuilt/common/bin/handle_compcache:system/bin/handle_compcache
# Bring in camera effects
PRODUCT_COPY_FILES += \
vendor/cm/prebuilt/common/media/LMprec_508.emd:system/media/LMprec_508.emd \

View File

@ -1,53 +0,0 @@
#!/system/bin/sh
#
# Compcache manager
# shade@chemlab.org (cyanogen)
#
isramzswap="$(find /system/lib/modules/ -name ramzswap.ko 2>/dev/null)"
isramzswapbuiltin="$(ls -l /dev/block/ramzswap0 2>/dev/null)"
if [ -n "$isramzswap$isramzswapbuiltin" ] ; then
MODULE=ramzswap
DEV=/dev/block/ramzswap0
else
DEV=/dev/block/zram0
MODULE=zram
SYSFS_PATH=/sys/block/zram0
fi
case "$1" in
start)
echo 3 > /proc/sys/vm/drop_caches
echo 30 > /proc/sys/vm/swappiness
modprobe $MODULE
if [ $MODULE = ramzswap ]; then
rzscontrol $DEV --disksize_kb=$2 --init
else
echo "$(($2 * 1024))" > $SYSFS_PATH/disksize
mkswap $DEV >/dev/null
fi
swapon $DEV
;;
stop)
swapoff $DEV >/dev/null 2>&1
rmmod $MODULE >/dev/null 2>&1
;;
stats)
if [ $MODULE = ramzswap ]; then
rzscontrol $DEV --stats
else
cd $SYSFS_PATH && for i in * ; do
echo -n "$i:"
cat $i
done
fi
;;
*)
echo "Usage: $0 {start <size>|stop|stats}"
exit 1
esac
exit 0

View File

@ -1,31 +0,0 @@
#!/system/bin/sh
#
# Compcache handler
# Decides whether or not Compcache is enabled
#
MEMTOTAL=$( awk '{ if ($1 eq "MemTotal:") print $2 ;exit }' </proc/meminfo )
if [ `getprop persist.service.zram` == 1 ];
then
PROP=`getprop ro.zram.default`
setprop persist.service.zram $PROP
fi
if [ -e /data/property/persist.service.zram ];
then
PROP=`getprop persist.service.zram`
else
PROP=`getprop ro.zram.default`
setprop persist.service.zram $PROP
fi
if [ $PROP != 0 ]
then
CCSIZE=$(($(($MEMTOTAL * $PROP)) / 100))
`dirname $0`/compcache start $CCSIZE
else
`dirname $0`/compcache stop
fi
exit 0

View File

@ -101,13 +101,6 @@ on property:service.adb.tcp.port=-1
stop adbd
start adbd
# Compcache - handle at boot
service compcache /system/bin/handle_compcache
class main
user root
group root
oneshot
# sysinit (/system/etc/init.d)
service sysinit /system/bin/sysinit
user root