On Tue, Apr 22, 2014 at 8:25 AM, Reindl Harald <h.reindl(a)thelounge.net> wrote:
Hi
currently you need to remove the zram module
because it's autoloaded in case you want
to use the zram num_devices-param
maybe it should not be autoloaded implicitly
I don't have any machine that has zram autoloaded. There's something
on your system that is telling something to load the zram module. It
won't load without something explicitly loading it.
/usr/sbin/rmmod zram 2> /dev/null > /dev/null
/usr/sbin/modprobe -q zram num_devices=$num_cpus 2> /dev/null > /dev/nul
______________________________________
[root@testserver:~]$ cat /usr/sbin/zramstart
#!/usr/bin/bash
num_cpus=$(grep -c processor /proc/cpuinfo)
[ "$num_cpus" != 0 ] || num_cpus=1
last_cpu=$((num_cpus - 1))
FACTOR=20
[ -f /etc/sysconfig/zram ] && source /etc/sysconfig/zram || true
factor=$FACTOR
memtotal=$(grep MemTotal /proc/meminfo | awk ' { print $2 } ')
mem_by_cpu=$(($memtotal/$num_cpus*$factor/100*1024))
/usr/sbin/rmmod zram 2> /dev/null > /dev/null
/usr/sbin/modprobe -q zram num_devices=$num_cpus 2> /dev/null > /dev/null
for i in $(seq 0 $last_cpu); do
echo $mem_by_cpu > /sys/block/zram$i/disksize
/usr/sbin/mkswap /dev/zram$i
/usr/sbin/swapon -p 100 /dev/zram$i
done
I have no idea what this script is, or why it's removing the zram
module like that. It doesn't appear packaged in Fedora, so I can't
really tell you where to report your issue but this isn't a kernel
problem that I can see...
josh