Comment 57 for bug 1215513

Revision history for this message
Mel Dee (78lup-lanncupgd-a811i) wrote :

I stand corrected - maybe. I wrote a program that allocates, sets, and moves around more memory than my RAM. I added the zram0 as a swap, with the bad sector included ('mkswap' without '-c'), and with higher priority than the disk swap. I ran the program once only, because it takes half an hour when it starts moving pages around. The program itself did not crash. I saw several 'Write error on swap device' messages in /var/log/kern.log. I don't know if anything else (like, a background program) crashed.

So it's possible the kernel now detects bad pages on swap devices and does not crash when it encounters them. I don't know how to test this assertion, though. The /dev/zram0 device still contains a bad 4K block at the end, but maybe it no longer matters.