This repository has been archived by the owner on Feb 11, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zram: Do not subtract deduplicated data from compressed size when fre…
…eing pages In the function __zram_bvec_write, when we match that the checksum of the current data is already in the list, we will skip the compression operation and allocate the zram entry directly, and will not calculate the size of the duplicate data in the storage page compression size . In the function zram_free_page, the deduplicated data size is directly subtracted from the stored page compression size indiscriminately, which will inevitably lead to statistical errors, and compr_data_size will continue to decrease, so that it will be less than 0 after a period of time. The data is written into the structure of u64, causing the data to exceed the value. Therefore, we add a flag to record which pages have been deduplicated, and no longer subtract the size of these pages from compr_data_size when freeing pages. Change-Id: Idedf4b7ddd5e2f6afb5dde8a2f8c55c4b1aec481
- Loading branch information