diff options
-rwxr-xr-x | zram-swap | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -38,6 +38,9 @@ start() { # Thread count is half of cpu local threads="$(( $(nproc) / 2 ))" + # Make sure the zram module is loaded + modprobe zram + # Create the zram device zramctl "${unused}" -s "${size}" -t "${threads}" mkswap "${unused}" @@ -51,6 +54,8 @@ stop() { swapoff ${zram} zramctl -r "${zram}" rm -f "${RUNFILE}" + # Note: We do not want to try to remove the zram kernel module in case other + # devices are in use. } main() { |