Remove ZRAM tuning to fix freezing

Signed-off-by: tytydraco <tylernij@gmail.com>
latency
tytydraco 4 years ago
parent 4f2f8d35a5
commit 42b99ad127

@ -175,9 +175,6 @@ Allow the scheduler to place tasks on their origin CPU, increasing cache localit
* nr_requests: 128 --> 512: Allow more I/O requests to be issued before flushing the queue, slightly increasing latencies but allowing more requests to be executed before being put to sleep.
* noop / none: Use a scheduler with little CPU overhead to reduce I/O latencies, which is essential for fast flash storage (eMMC & UFS).
### ZRAM
ZRAM reduces disk wear by reducing disk writes, and also increases cache locality by allowing more data to fit in RAM at once. KTweak configures ZRAM to take up at most half of the available RAM on the system, which is a good ratio of RAM to ZRAM for a mobile device.
# Other Notes
You should know that KTweak applies after init finishes + 20 seconds in order to prevent Android's init from overwriting any values.

@ -74,18 +74,6 @@ write() {
fi
}
# Setup ZRAM to half of the available RAM
setup_zram() {
memsize=`cat /proc/meminfo | grep "MemTotal" | awk '{print $2}'`
halfmemsize=`echo "$(($memsize/2))"`
swapoff /dev/block/zram0
write /sys/block/zram0/reset 1
write /sys/block/zram0/disksize "${halfmemsize}KB"
mkswap /dev/block/zram0
swapon /dev/block/zram0
}
usage() {
echo -n "Usage: `basename $0` [OPTIONS] [NAME]
Options:
@ -219,7 +207,4 @@ do
write "${queue}scheduler" none
done
# ZRAM
[[ -d "/sys/block/zram0" ]] && setup_zram &> /dev/null &
dbg "Finished with $ERR_CNT failed writes."

Loading…
Cancel
Save