On Wed, 20 Apr 2011, Gwenhael Le Moine wrote:

> 2011/4/20 Hieu D. Bui <[email protected]>:
> >
> > In my use case, I would like to ensure that all the open documents have
> > been synced to disk before I drop the cache (which reduces the memory
> > used size, therefore it fastens the hibernation process). Sometimes,
> > hibernation doesn't work properly too, for example, it can't freeze
> > the filesystems and/or processes.
> >
> > D. Hieu
>
> Interesting idea. I wasn't sure if hibernating would effectively save
> disk-caches and a quick say it does and suggest to do what you want to
> do.
>

Dear folks,

Suspend-to-disk (aka hibernation) doesn't call sync() before
performing.  I've got several page-fault situations and data
corruption when doing improperly hibernating (i.e. plugging on/off
some peripheral devices, especially USB flash disk).

>
> But I think there's a trade-off to that technique: when the computers
> wake up it won't have any disk cache and will spend some time to
> rebuild it, so for some time after wake-up the computer might be less
> responsive.
>

That's not necessary true, depending on the techniques your operating
system uses.  Hibernation does almost exactly the same as
suspend-to-ram, except for the destination to store data.

>
> Personally I've stopped hubernating years ago, suspend-to-ram is
> nearly instant and has never failed me (and my wife is constantly
> stealing my laptop because hers take ages to get out of hibernation :P
> )
>
> Gwenhael
>

Suspend-to-ram still consumes energy, man.  Hibernation is for greener
planet ;-).

Cheers,
Yang
-- 
Dương "Yang" Hà Nguyễn
Web log: http://cmpitg.wordpress.com/
"Life is a hack"

[ Do not send me Microsoft Office attachments, please.
  http://www.gnu.org/philosophy/no-word-attachments.html ]

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT/C/ED/L d++ s-:-(:) !a C+++(++++) ULU++++>$ P-- L+++>$ E+++
W++>+++ N+ o+ K w--- O- M@ V- PS+ PE++ Y+>++ PGP++ t+ 5 X+ R-
tv+ b+++ DI+++ D++ G+++ e* h* r* y-
-----END GEEK CODE BLOCK-----
_______________________________________________
POST RULES : http://wiki.hanoilug.org/hanoilug:mailing_list_guidelines
_______________________________________________
HanoiLUG mailing lists: http://lists.hanoilug.org/
HanoiLUG wiki: http://wiki.hanoilug.org/
HanoiLUG blog: http://blog.hanoilug.org/

Trả lời cho