Skip to content
Snippets Groups Projects
Commit bbaa79c6 authored by Evangelos Foutras's avatar Evangelos Foutras :smiley_cat:
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
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment