On Tuesday, 17 July 2007 20:32, Alan Stern wrote:
I'm still not entirely clear on how "suspend-to-both" ought to be
handled. Presumably it will start off as a normal hibernation. But
instead of shutting down, wouldn't the kexec'd kernel return to the
original kernel?
No, I think the image-saving kernel should suspend. Then, on resume the
platform will go back to it and it will jump back to the hibernated kernel.
After all, the original kernel knows about all the devices and can put them
into a low-power state, while the kexec'd kernel might not have sufficient
information.
That's correct, but ...
But what about the freezer? The original reason for using kexec was to
avoid the need for the freezer. With no freezer, while the original
kernel is busy powering down its devices, user tasks will be free to
carry out I/O -- which will make the memory snapshot inconsistent with
the on-disk data structures.
... we can't return to the hibernated kernel unless we are going to cancel the
hibernation.
That's why I think that for the suspend-to-both the image-saving kernel will
need to support the same set of devices as the hibernated kernel.