Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: manually load kernel modules for compression
Creation of a zram device (with zstd as the compression alg) occasionally fails with ENOMEM: Jan 13 09:59:39 vultr.guest systemd[1]: Starting Create swap on /dev/zram3... Jan 13 09:59:39 vultr.guest kernel: Can't allocate a compression stream Jan 13 09:59:39 vultr.guest kernel: zram: Cannot initialise zstd compressing backend Jan 13 09:59:39 vultr.guest zram-generator[997]: Error: Failed to configure disk size into /sys/block/zram3/disksize Jan 13 09:59:39 vultr.guest zram-generator[997]: Caused by: Jan 13 09:59:39 vultr.guest zram-generator[997]: Cannot allocate memory (os error 12) https://bugzilla.kernel.org/show_bug.cgi?id=211173 The kernel normally loads the compressor module when a device with a given compression module is loaded, but this doesn't always work. Apparently, loading the compression module up front avoids the issue. Fixes systemd#50, systemd#53. Note: /sys/block/zram0/comp_algorithm lists compressors known to zram, not the ones currently loaded. /proc/crypto lists currently loaded crypto & compression modules.
- Loading branch information