[Bug 1231416] New: ZSWAP config cleanup
https://bugzilla.suse.com/show_bug.cgi?id=1231416 Bug ID: 1231416 Summary: ZSWAP config cleanup Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Kernel Assignee: kernel-bugs@opensuse.org Reporter: jslaby@suse.com QA Contact: qa-bugs@suse.de Target Milestone: --- Found By: --- Blocker: --- Following: commit 13a488ad6c85976074f78f80a06414914890703c Author: Yosry Ahmed <yosryahmed@google.com> Date: Mon Oct 7 19:21:16 2024 +0000 mm: z3fold: deprecate CONFIG_Z3FOLD The z3fold compressed pages allocator is rarely used, most users use zsmalloc. The only disadvantage of zsmalloc in comparison is the dependency on MMU, and zbud is a more common option for !MMU as it was the default zswap allocator for a long time. Historically, zsmalloc had worse latency than zbud and z3fold but offered better memory savings. This is no longer the case as shown by a simple recent analysis [1]. That analysis showed that z3fold does not have any advantage over zsmalloc or zbud considering both performance and memory usage. In a kernel build test on tmpfs in a limited cgroup, z3fold took 3% more time and used 1.8% more memory. The latency of zswap_load() was 7% higher, and that of zswap_store() was 10% higher. Zsmalloc is better in all metrics. Moreover, z3fold apparently has latent bugs, which was made noticeable by a recent soft lockup bug report with z3fold [2]. Switching to zsmalloc not only fixed the problem, but also reduced the swap usage from 6~8G to 1~2G. Other users have also reported being bitten by mistakenly enabling z3fold. Other than hurting users, z3fold is repeatedly causing wasted engineering effort. Apart from investigating the above bug, it came up in multiple development discussions (e.g. [3]) as something we need to handle, when there aren't any legit users (at least not intentionally). The natural course of action is to deprecate z3fold, and remove in a few cycles if no objections are raised from active users. Next on the list should be zbud, as it offers marginal latency gains at the cost of huge memory waste when compared to zsmalloc. That one will need to wait until zsmalloc does not depend on MMU. We should likely: * set CONFIG_ZSWAP_ZPOOL_DEFAULT_Z3FOLD_DEPRECATED=n * set CONFIG_ZSWAP_ZPOOL_DEFAULT_ZSMALLOC=y and CONFIG_ZSWAP_ZPOOL_DEFAULT_ZBUD=n -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1231416 Jiri Slaby <jslaby@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mkubecek@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1231416 https://bugzilla.suse.com/show_bug.cgi?id=1231416#c1 Jiri Slaby <jslaby@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mgorman@suse.com, | |mhocko@suse.cz, | |vbabka@suse.com --- Comment #1 from Jiri Slaby <jslaby@suse.com> --- (In reply to Jiri Slaby from comment #0)
We should likely: * set CONFIG_ZSWAP_ZPOOL_DEFAULT_Z3FOLD_DEPRECATED=n * set CONFIG_ZSWAP_ZPOOL_DEFAULT_ZSMALLOC=y and CONFIG_ZSWAP_ZPOOL_DEFAULT_ZBUD=n
Cc MM guys just in case they care about zswap ;). -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1231416 https://bugzilla.suse.com/show_bug.cgi?id=1231416#c2 --- Comment #2 from Jiri Slaby <jslaby@suse.com> --- The correct upstream SHA: commit 7a2369b74abf76cd3e54c45b30f6addb497f831b Author: Yosry Ahmed <yosryahmed@google.com> Date: Wed Sep 4 23:33:43 2024 +0000 mm: z3fold: deprecate CONFIG_Z3FOLD -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1231416 https://bugzilla.suse.com/show_bug.cgi?id=1231416#c3 --- Comment #3 from Vlastimil Babka <vbabka@suse.com> --- I agree going with upstream here, so drop z3fold and make zsmalloc the default, as I don't recall any more specific requests. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1231416 https://bugzilla.suse.com/show_bug.cgi?id=1231416#c4 Jiri Slaby <jslaby@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #4 from Jiri Slaby <jslaby@suse.com> --- I intend also to disable Z3FOLD. Which means not only CONFIG_ZSWAP_ZPOOL_DEFAULT_Z3FOLD_DEPRECATED=n but also CONFIG_Z3FOLD_DEPRECATED=n. So the current setup (x86_64): CONFIG_ZPOOL=y CONFIG_SWAP=y CONFIG_ZSWAP=y # CONFIG_ZSWAP_DEFAULT_ON is not set # CONFIG_ZSWAP_SHRINKER_DEFAULT_ON is not set # CONFIG_ZSWAP_COMPRESSOR_DEFAULT_DEFLATE is not set CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZO=y # CONFIG_ZSWAP_COMPRESSOR_DEFAULT_842 is not set # CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZ4 is not set # CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZ4HC is not set # CONFIG_ZSWAP_COMPRESSOR_DEFAULT_ZSTD is not set CONFIG_ZSWAP_COMPRESSOR_DEFAULT="lzo" # CONFIG_ZSWAP_ZPOOL_DEFAULT_ZBUD is not set # CONFIG_ZSWAP_ZPOOL_DEFAULT_Z3FOLD_DEPRECATED is not set CONFIG_ZSWAP_ZPOOL_DEFAULT_ZSMALLOC=y CONFIG_ZSWAP_ZPOOL_DEFAULT="zsmalloc" CONFIG_ZBUD=y # CONFIG_Z3FOLD_DEPRECATED is not set CONFIG_ZSMALLOC=y # CONFIG_ZSMALLOC_STAT is not set CONFIG_ZSMALLOC_CHAIN_SIZE=8 And I pushed this to my master/for-next. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com