Commit bbaa79c6 authored by Evangelos Foutras's avatar Evangelos Foutras 🐱
Browse files

zram: Disable zswap to prevent conflict with zram

When both zswap and zram are active, zswap sits in front of zram and
treats it as a backing store. We just want to use zram and not zswap
disguising itself as such; disable the latter so we can enjoy useful
zramctl statistics.

Implemented as tmpfiles.d/zram.conf which disables zswap at runtime.
parent 61bdf768
Pipeline #9642 passed with stage
in 1 minute and 1 second
......@@ -144,6 +144,15 @@
- restart systemd-zram-setup@zram0
when: enable_zram_swap
- name: disable zswap to prevent conflict with zram
copy: content="w- /sys/module/zswap/parameters/enabled - - - - N" dest=/etc/tmpfiles.d/zram.conf
register: zramtmpfiles
when: enable_zram_swap
- name: use tmpfiles.d/zram.conf
command: systemd-tmpfiles --create
when: zramtmpfiles.changed
- name: start systemd-oomd
service: name=systemd-oomd state=started enabled=yes
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment