Skip to contentSkip to conversation

Writing caches

DISCUSSION Stefan Tomanek 3 participants 3 messages Mar 8, 2005 1 message not in the archive ACPI

lore
Share & tools
lore
#0 lore raw

Just a small question, maybe I got a completely false impression... Why does software suspend have to save file cachess? Couldn't they just be flushed to save suspend and restore time?

Signature · 11 lines
.:°stefan-Q4Z/[email protected] | tommie@IRC | GPG: finger [email protected] °:.
|___________________ http://localhost.ruhr.de/~stefan/ ______________________|
| Wer Header fälscht oder verfälscht oder gefälschte oder verfälschte Header |
`-__in_Umlauf_bringt_wird_mit_Scorefile_nicht_unter_-500_Punkten_bestraft__-'


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

A message that is not in the archive (sent off-list or not yet received): 20050308101229.GD4154-Q4Z/[email protected]

#2 lore raw
Quoted 3 lines · Stefan Tomanek

Just a small question, maybe I got a completely false impression... Why does software suspend have to save file cachess? Couldn't they just be flushed to save suspend and restore time?

If you write the caches to disk on suspend and re-read them on resume, the machine is much more responsive when it comes back on.

At least for me, that's much better. :)

Cheers,
Lorenzo

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

#3 lore raw
In reply to a message not in the archive

Hi.

You can set a soft image size limit, and suspend2 will call shrink_all_memory (like swsusp does) to free pages until it reaches that limit (if possible). In this way it is possible to free caches before suspending. As Lorenzo said, though, this results in a much less responsive system post-resume. Suspend2 reads and writes the data as fast as it can (async I/O and readahead for what must be done synchronously due to compression, plus LZF compression), and the data is stored as contiguously as possible. This means it's much faster to write the data in the image instead of forcing pages to be reread/swapped in later.

Regards,

Nigel

Quoted 3 lines · Stefan Tomanek

Just a small question, maybe I got a completely false impression... Why does software suspend have to save file cachess? Couldn't they just be flushed to save suspend and restore time?

Signature · 14 lines
Nigel Cunningham
Software Engineer, Canberra, Australia
http://www.cyclades.com
Bus: +61 (2) 6291 9554; Hme: +61 (2) 6292 8028;  Mob: +61 (417) 100 574

Maintainer of Suspend2 Kernel Patches http://suspend2.net



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click