Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Currently the kernel does not have zstd compression functionality turned on (CONFIG_CRYPTO_ZSTD=m, CONFIG_ZSTD_COMPRESS=m).
Let's have the capability turned on so that it's available for users. Having zstd support on makes it possible for third-party modules to leverage them (by the CentOS Kmods SIG, for example).
Additional info:
This was discussed previously in https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/110#note_775939397
a suggested action plan for testing: use zram disk with zstd compression
docs: https://www.kernel.org/doc/html/latest/admin-guide/blockdev/zram.html
### create one zram device
# modprobe zram num_devices=1
### check and set zstd compression
# cat /sys/block/zram0/comp_algorithm
lzo [lzo-rle] lz4 lz4hc 842 zstd
# echo zstd > /sys/block/zram0/comp_algorithm
# cat /sys/block/zram0/comp_algorithm
lzo lzo-rle lz4 lz4hc 842 [zstd]
< *** the output must contain "[zstd]" here *** >
### set max ram usage = 256 Mbytes
# echo 256M > /sys/block/zram0/disksize
### write, read and test some data (/boot, for example)
# mke2fs -m 0 -b 4096 -O sparse_super -L zram /dev/zram0
# mount -o relatime,noexec,nosuid /dev/zram0 /mnt/zram
# cp -rp /boot /mnt/zram
# diff -rp /boot /mnt/zram/boot
< *** must be no output here *** >
### get funny stats
# awk '{ print "uncompressed size of data",$1,"\ncompressed size of data", $2, "\nmemory allocated for this disk", $3, "\nnumber of incompressible pages", $8 }' /sys/block/zram0/mm_stat
uncompressed size of data 185937920
compressed size of data 163488509
memory allocated for this disk 164663296
number of incompressible pages 36615
### uncreate
# umount /mnt/zram
# rmmod zram
Can someone unmark this as "redhat" private? I think that got set by accident...
Comment 12Vladislav Dronov
2022-01-14 15:29:50 UTC
(In reply to Vladis Dronov from comment #5)
> a suggested action plan for testing: use zram disk with zstd compression
hi, Changhui,
i need to make a change to the suggested testing plan in #c5. in the current
version we will be reading data from a page cache, not from zram disk, so
compare operation will always succeed.
can you please consider the following change in a testing script:
...
### write some data (/boot, for example), un-mount and drop caches
# mkdir -p /mnt/zram
# mke2fs -m 0 -b 4096 -O sparse_super -L zram /dev/zram0
# mount -o relatime,noexec,nosuid /dev/zram0 /mnt/zram
# cp -rp /boot /mnt/zram
# umount /mnt/zram
# echo 3 > /proc/sys/vm/drop_caches
### test the data
# mount -o relatime,noexec,nosuid /dev/zram0 /mnt/zram
# diff -rp /boot /mnt/zram/boot
< *** must be no output here *** >
### clean up
# umount /mnt/zram
# rmdir /mnt/zram
# rmmod zram
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (new packages: kernel), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2022:3907