If I run cat /boot/config-5.16.1-1-default | grep -i swap It returns CONFIG_ZSWAP=Y cat /sys/module/zswap/parameters/enabled returns N So the kernel supports zswap but it is currently NOT enabled. When system is booted the following journal message appears kernel: zswap: loaded using pool lzo/zbud ps aux | grep -i zswap returns root 135 0.0 0.0 0 0 ? I< Feb09 0:00 [zswap-shrink] If zswap is NOT enabled, why is zswap loaded with a pool at boot time and why is the zswap-shrink process running? I find that the same situation on a TW test machine I have that is running the 5.16.5.2 kernel so it is not an isolated case. Is this a bug?
On Mon, 14 Feb 2022 15:27:36 +0100, Joe Salmeri wrote:
If I run cat /boot/config-5.16.1-1-default | grep -i swap
It returns CONFIG_ZSWAP=Y
cat /sys/module/zswap/parameters/enabled returns N
So the kernel supports zswap but it is currently NOT enabled.
When system is booted the following journal message appears
kernel: zswap: loaded using pool lzo/zbud
ps aux | grep -i zswap
returns
root 135 0.0 0.0 0 0 ? I< Feb09 0:00 [zswap-shrink]
If zswap is NOT enabled, why is zswap loaded with a pool at boot time and why is the zswap-shrink process running?
I find that the same situation on a TW test machine I have that is running the 5.16.5.2 kernel so it is not an isolated case.
Is this a bug?
The zswap's enabled sysfs can be toggled dynamically even after the boot, which enables/disables the zswp on the fly. Meanwhile the kconfig specifies whether zswap is supported or not at all. So this is expected behavior. zswap-shrink is a kernel workqueue, and it's idle unless a work is queued there. It consumes some memory, but that's all. Takashi
Hi Takashi, Thanks for your explanation. Wouldn't it be better for the kernel to create the work queue when zswap is enabled instead of blindly creating? Joe
On Tue, 15 Feb 2022 00:04:24 +0100, Joe Salmeri wrote:
Hi Takashi,
Thanks for your explanation.
Wouldn't it be better for the kernel to create the work queue when zswap is enabled instead of blindly creating?
It's a question of simplicity, I guess. The resource consumption of a work queue isn't crucial at all. Takashi
participants (2)
-
Joe Salmeri
-
Takashi Iwai