Re: Suggestion for laptop suspension

From: Theodore Y. Ts'o (tytso@MIT.EDU)
Date: Sun Aug 27 2000 - 18:10:26 EST


   Date: Sun, 27 Aug 2000 06:19:36 -0400
   From: Richard Stallman <rms@gnu.org>

   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.

MY Sony Vaio 505TX has a similar behavior. What hasn't been clear to me
is how to mark memory as "unused". I had a theory that the APM BIOS
suspend code was checking if the memory was all zero's, and not writing
such pages to disk. This was a while ago, but a quick test didn't seem
to bear out this theory.

I never had time to really take this much further, since using the
laptop "suspend and keep power to the memory" mode really doesn't take
that much battery power, so it wasn't worth my bothering to figure out
exactly how to trick the laptop into thinking a memory region didn't
need to be saved to disk. But this would be a good project for someone
who was interested to try to take up. One warning --- the technique by
which this is done may end up being very laptop-specific, or at least
dependent on a particular APM BIOS supplier.

                                                - Ted
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



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