linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [BUG] ZSwap leaks memory upon being disabled
@ 2024-10-24 13:02 Konstantin Kharlamov
  2024-10-24 20:47 ` Yosry Ahmed
  0 siblings, 1 reply; 19+ messages in thread
From: Konstantin Kharlamov @ 2024-10-24 13:02 UTC (permalink / raw)
  To: linux-mm

When ZSWAP is disabled, the `Zswap` and `Zswapped` in meminfo are still non-zero.
IOW, ZSWAP doesn't free memory upon being disabled.

Stumbled upon this while trying to figure out where did ≈4G of my SWAP memory
disappear. Been seeing some unknown memory in SWAP for years, now I suspect ZSWAP
might be the culprit. But no way to know for sure because of this bug.

# Steps to reproduce

1. Enable ZSWAP
2. Wait for `grep Zswap /proc/meminfo` to become non-zero
3. Disable ZSWAP via `sudo sh -c "echo 0 > /sys/module/zswap/parameters/enabled"`
4. Look at `grep Zswap /proc/meminfo`

## Expected

The rows are zero because ZSWAP is disabled.

## Actual

The rows doesn't change.

# Additional information

Kernel: 6.11.3
OS: Archlinux


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2024-10-31 22:05 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-24 13:02 [BUG] ZSwap leaks memory upon being disabled Konstantin Kharlamov
2024-10-24 20:47 ` Yosry Ahmed
2024-10-25  6:41   ` Konstantin Kharlamov
2024-10-25  7:50     ` Yosry Ahmed
2024-10-26 11:33       ` Konstantin Kharlamov
2024-10-26 17:47         ` Yosry Ahmed
2024-10-27  0:29           ` Konstantin Kharlamov
2024-10-27  3:14             ` Nhat Pham
2024-10-27  6:46               ` Yosry Ahmed
2024-10-27 10:11                 ` Konstantin Kharlamov
2024-10-27 10:32                   ` Konstantin Kharlamov
2024-10-27 11:28                     ` Konstantin Kharlamov
2024-10-27 19:31                       ` Yosry Ahmed
2024-10-27 22:13                         ` phantom memory in a cgroup (was [BUG] ZSwap leaks memory upon being disabled) Konstantin Kharlamov
2024-10-30 14:41                           ` Konstantin Kharlamov
2024-10-30 19:44                             ` Yosry Ahmed
2024-10-31 21:59                               ` Konstantin Kharlamov
2024-10-31 22:04                                 ` Yosry Ahmed
2024-10-27 10:25               ` [BUG] ZSwap leaks memory upon being disabled Konstantin Kharlamov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox