Re: swsusp: use non-contiguous memory on resume

From: Pavel Machek
Date: Fri Mar 04 2005 - 05:25:09 EST


Hi!

> > Subject: non-contiguous pagedir for resume
> >
> > This fixes problem where we could have enough memory but not in
> > continuous chunk, and resume would fail.
>
> It seems to do more that that? What's all the assembly stuff?
>
> General point: this changlog entry doesn't describe the problem and it
> doesn't describe how the patch fixes that problem. It's a model
> how-not-to ;)

Sorry.

Problem is that pagedir is allocated as order-8 allocation on resume
in -mmX (and linus). Unfortunately, order-8 allocation sometimes
fails, and for some people (Rafael, seife :-) it fails way too often.

Solution is to change format of pagedir from table to linklist,
avoiding high-order alocation. Unfortunately that means changes to
assembly, too, as assembly walks the pagedir.

[Is it better now?]

> > --- linux-mm/kernel/power/swsusp.c 2005-02-28 01:14:08.000000000 +0100
> > +++ linux.middle/kernel/power/swsusp.c 2005-02-28 21:29:06.000000000 +0100
> > @@ -241,7 +241,7 @@
> > swp_entry_t entry;
> > int error = 0;
> >
> > - entry = get_swap_page(NULL, swp_offset(*loc));
> > + entry = get_swap_page();
>
> Something's gone wrong here. In -mm, get_swap_page() takes two args and in
> -linus it takes zero args.

Aha, okay, I guess I'll have to wait for resync between submitting
these. Forget the resume-from-initramfs patch...

(Or maybe Rafael is willing to create -mm version and submit it
himself?)

Pavel

--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/