x86 Suspend/resume support in Hoary
Sami Haahtinen
ressu at ressukka.net
Sun Feb 6 14:20:22 CST 2005
Matt Zimmerman wrote:
> On Sat, Feb 05, 2005 at 12:28:17PM +0200, Sami Haahtinen wrote:
>>>- If the resume fails due to a mismatch, halt, giving the user a chance to
>>> recover
>>
>>This could be a big disaster too. if the user doesn't have anything but
>>a single kernel, how would one recover? Somekind of menu might be a good
>>idea:
>
> This should be a very rare case, if we can correctly prevent hibernation
> when we can predict that the next boot would be a mismatch. I don't think
> we need to optimize for it, but we should add a safety feature to prevent
> this from inadvertently happening (the kernel command line should need to be
> changed explicitly in order to cause this behaviour).
The reason why i brought it up was if we assume that a normal user can
deal with the situation (even though it should be rare) then the
instructions should be even more clear when things do go wrong.
>>>Would it help to sync() just before going to sleep, to reduce the risk of
>>>corruption if anything goes wrong with the resume?
>>
>>Unless you can tell all of the user apps to do a save and then sync,
>>this would help. Other than that, it's pretty much the same as turning
>>off your computer unwarned.
>
> The difference between unsaved data in applications, and possibly severe
> filesystem corruption, is enough to justify a small effort I think.
Ah, if we are trying to deal with filesystem corruption, simple sync
would be enough. Although, i'm not too familiar with the way kernel
deals with filesystems, but i would assume sync() before spinning down
the disks should be enough.
And syncing should be a sane thing to do anyway...
- S
More information about the ubuntu-devel
mailing list