Skip to contentSkip to conversation

Hibernate/Resume and dm-cache, dm-writeboost...

DISCUSSION Rolf Fokkens 3 participants 3 messages Dec 24, 2014 – Dec 30, 2014 Device mapper

lore
Share & tools
lore
#0 lore raw

Hi all,

On the linux-bcache mailing list the potential issue was brought up about writes to backing or caching device after bringing up devices in initramdisk, but prior to an actual resume. The actual issue is that there should be no writes between hibernation and resume:

http://www.spinics.net/lists/linux-bcache/msg02692.html

If this is an issue for bcache, I can imagine it also is for other caching solutions like dm-cache and dm-writeboost. I'm not an expert on this, but from my user perspective it seems somewhat concerning (for both bcache and the DM caching solutions) and an expert view on this might be needed.

Thanks,

Rolf

#1 lore raw
Quoted 7 lines · Rolf Fokkens

Hi all,

On the linux-bcache mailing list the potential issue was brought up about writes to backing or caching device after bringing up devices in initramdisk, but prior to an actual resume. The actual issue is that there should be no writes between hibernation and resume:

Quoted 7 lines

http://www.spinics.net/lists/linux-bcache/msg02692.html

If this is an issue for bcache, I can imagine it also is for other caching solutions like dm-cache and dm-writeboost. I'm not an expert on this, but from my user perspective it seems somewhat concerning (for both bcache and the DM caching solutions) and an expert view on this might be needed.

Thanks for bringing this to our attention. I think dm-cache provides the neccessary tools to do this; either setting the migration threshold to zero, or switch to write through mode for the duration of the hibernate. But atm this would need to be triggered from userland. I need to look at hibernate more.

- Joe

#2 lore raw

Hi, I am the developer of DM-Writeboost.

I am not sure what the problem is. Is the problem caching driver may update the underlying devices before resume?

If so, stopping daemons will do by sending the driver these messages
- allow_writeback 0
- enable_writeback_modulator 0
- update_record_interval 0
The first two stops writeback and the third one stops periodical update of the superblock sector.

btw, DM-Writeboost isn't in LVM family yet so this problem won't happen at the moment however, I doesn't mean I can be unaware. Thanks.

- Akira