Re: Suggestion for laptop suspension

From: Stephen Rothwell (
Date: Mon Aug 28 2000 - 01:21:10 EST

Hi Richard,

Richard Stallman <> writes:
> On my laptop, suspending to disk is slow. It takes a whole minute, and
> another minute to unsuspend--if all of core is in use. But it is much
> faster when I do it not too long after the system was booted, when it has
> not yet managed to use up most of core.
> This suggests that it could be nice to make the kernel empty its caches, and
> mark all that core "unused", when a suspend is about to happen. I don't
> know the details of how suspension works, so I am not sure this is possible,
> but I think there are hooks for doing something in the kernel before a
> suspend.

Just to try something, could you please take the program below and change
the 172 to be about 15-20 less that then number of MB of physical RAM
you have, then compile and run it and then try to suspend to disk
and see how long it takes. On my Thinkpad 600E, it changes the time
to suspend from ~30 seconds to < 10 seconds.

This is an experiment to see if your BIOS is faster to suspend
when most of memory is zero'd.


Stephen Rothwell, Open Source Researcher, Linuxcare, Inc.
+61-2-62628990 tel, +61-2-62628991 fax, 
Linuxcare. Support for the revolution.

---------------------------------------------------------------------- unsigned char arr[172*1024*1024];

main() { int i;

for (i = 0; i < sizeof(arr); i += 4096) arr[i] = 0; } ---------------------------------------------------------------------- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to Please read the FAQ at

This archive was generated by hypermail 2b29 : Thu Aug 31 2000 - 21:00:20 EST