Skip to content

Conversation

kadinsayani
Copy link
Contributor

Adds support for reporting zswap memory statistics in /proc/meminfo.

@kadinsayani
Copy link
Contributor Author

@mihalicyn I've kept this as draft for now since it doesn't include any checks for kernel zswap support.

@mihalicyn mihalicyn self-requested a review August 25, 2025 15:33
@kadinsayani kadinsayani marked this pull request as ready for review August 25, 2025 17:11
@mihalicyn
Copy link
Member

We've discussed this PR privately with Kadin and he will post a new version soon.

@kadinsayani kadinsayani marked this pull request as draft September 3, 2025 22:59
@kadinsayani kadinsayani force-pushed the feat/zswap branch 3 times, most recently from 7d4b39f to ecef210 Compare September 4, 2025 16:16
@kadinsayani kadinsayani marked this pull request as ready for review September 4, 2025 16:16
@kadinsayani
Copy link
Contributor Author

Ready for review ✅

Copy link
Member

@mihalicyn mihalicyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks awesome, except one small thing with struct lxcfs_opts.

Signed-off-by: Kadin Sayani <[email protected]>
The following new metrics are now available in /proc/meminfo:
- Zswap: the total amount of memory consumed by the zswap compression
backend
- Zswapped: amount of application memory swapped out to zswap

Signed-off-by: Kadin Sayani <[email protected]>
@stgraber
Copy link
Member

stgraber commented Oct 8, 2025

@mihalicyn should be good for another review

Copy link
Member

@mihalicyn mihalicyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, @kadinsayani !

LGTM

@stgraber stgraber merged commit 6957cc1 into lxc:main Oct 9, 2025
21 checks passed
@kadinsayani kadinsayani deleted the feat/zswap branch October 9, 2025 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants