Re: [PATCH 0/6] power: wire-up filesystem freeze/thaw with suspend/resume
From: Luis Chamberlain
Date: Tue Apr 08 2025 - 13:21:08 EST
And in case its useful, to test this on a VM you'll need on libvirt:
</os>
<pm>
<suspend-to-mem enabled='yes'/>
<suspend-to-disk enabled='yes'/>
</pm>
The litmus test which used to stall without ever returning was:
while true; do
dd if=/dev/zero of=/path/to/xfs/foo bs=1M count=1024 &> /dev/null
done
To suspend you can use one of these two:
echo mem > /sys/power/state
systemctl suspend
Verify you can resume from suspend:
virsh qemu-monitor-command guest_foo 'query-current-machine'
{"return":{"wakeup-suspend-support":true},"id":"libvirt-415"}
To resume the guest:
virsh dompmwakeup guest_foo
Luis