Re: sw_suspend v2 released

Pavel Machek (pavel@atrey.karlin.mff.cuni.cz)
Mon, 14 Dec 1998 19:18:32 +0100


Hi!

> Software Suspend v2 is released and available at:
> http://falcon.sch.bme.hu/~seasons
>
> I haven't ported it to the newest kernel yet but I had to time for that.
> Probably with this docu ppl did not understand my code at first sight will
> have more mood to give it a test ;)

Don't worry, the last version patched itself cleanly (into 131), and I
see no reason why this should not work.

Anyway, a bit of warning: This is *ALPHA* code. Expect it to oops once
or twice. What is a bit surprising is, that it works (well, it worked
for me after two days of heavy hacking). It has problems with
swapper_pg_dir (which is read/write but present in code section) ->
machine will almost work except that anything that touches vmalloced()
memory will oops. That means that every exiting app is going to oops,
unless you are really lucky. [I have fix at home and will mail it to
author].

Swap state is not protected after saving state, so if you have 8Meg
of ram like my test machine, swap is dirtified after saving state
which will cause armagedon later. Also, you save state of kernel when
no /image.sav exist, but restore it when /image.sav is physically on
disk. That _IS_ going to cause some problems. In this version it will
not work on low-mem machines also for other reasons. (It does not
flush buffers while writing -> it is really easy to run out of RAM.)

You need to

+ if (ADDRESS(loop) >= (unsigned long) &_text &&
ADDRESS(loop) < (unsigned long) &_etext) {

add test for loop != &swapper_pg_dir, iirc, to workaround vmalloc bug.

Anyway, most important thing I have to say is IT WORKS (modulo few
bugs :-).

Pavel

-- 
The best software in life is free (not shareware)!		Pavel
GCM d? s-: !g p?:+ au- a--@ w+ v- C++@ UL+++ L++ N++ E++ W--- M- Y- R+

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