Jump to content

funnyjoky

Validating
  • Posts

    1
  • Joined

  • Last visited

  1. I think zram and zswap sometimes are not compatible with each other. zram's cold compressed page are not able to be moved out of disk. Because zram is not designed to be swap to outer disk. If both zram and zswap are enable, there will be a problem: When processes are running, here is the usual order. Lets say there is a Block/Page called blk1 1)blk1 fill the ram 2)zram start to compress page blk1 inside the ram (note that virtual swapfile is created inside the ram not in the disk). It becomes r-blk1 3)it keeps compressing then lets say the compressed file reach the criteria to activate zswap 4)zswap start to compress page. It become s-r-blk1 5)zswap decompress and move page to disk. In the disk, it is saved as r-blk1 6)a prcoess want to read data from the ram. the ram will try to search the blk1 which was once compressed by zram, and it will try to decompress it for use. 7)the problem comes here. Since zram only operates on the ram level. The ram will keep searching on ram's virtual swap file with the purpose to decompress it, but unable to find r-blk1 because r-blk1 was swaped to the disk. 8)what happen? 9)the system will assume the 'residual/index' of r-blk1 left on the ram's virtual swap file is the actual r-blk1. The 'residual' gets decompressed. System cannot read it. 10) zram decompression error ps: I personally experience zram decompression failed error -22. plz let me know if you have any thoughts on my comments Feel free to email me as I am quite curious about this problem. kevinmaplefeiyu@gmail.com
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines