#2 minor updates
Merged 3 months ago by pbrobinson. Opened 3 months ago by chrismurphy.
rpms/ chrismurphy/zram devel  into  master

file modified
+1 -1

@@ -1,4 +1,4 @@ 

- # The factor is the percentage of total system RAM to allocate to the ZRAM block device(s).

+ # The factor determines the ratio 1/n of RAM to allocate to the ZRAM block device, where FACTOR = n.

  FACTOR=2

  

  PRIORITY=1000

file modified
+1 -1

@@ -12,7 +12,7 @@ 

  mem_total=$(free -w |grep "^Mem" |awk '{printf("%d",$2)}')

  zram_size=$((${mem_total} / ${factor} /1024))

  

- # zram in recent kernels is multitreaded so we don't need to balance across CPUs

+ # ZRAM in recent kernels is multithreaded so we don't need to balance across CPUs

  modprobe -q zram num_devices=1

  

  # Create ZRAM with first device, lz4 algorithm

file modified
+1 -6

@@ -1,10 +1,5 @@ 

  #!/bin/sh

  

  for i in $(grep '^/dev/zram' /proc/swaps | awk '{ print $1 }'); do

- 	swapoff "$i"

+ 	swapoff "$i" && zramctl --reset "$i"

  done

- 

- if grep -q "^zram " /proc/modules; then

- 	sleep 1

- 	rmmod zram

- fi

A few lightweight improvements.

Pull-Request has been merged by pbrobinson

3 months ago

That's built for rawhide btw