Re: does swsusp suck after resume for you? [was Re: Faster resuming of suspend technology.]

Rafael J. Wysocki
2006-03-14T18:07:49Z

On Monday 13 March 2006 13:03, Con Kolivas wrote:
> On Monday 13 March 2006 22:36, Pavel Machek wrote:
> > 4) Congratulations, you are right person to help. Could you test if
> > Con's patches help?
>
> Ok this patch is only compile tested only but is reasonably straight forward.
> (I have no hardware to test it on atm). It relies on the previous 4 patches I
> sent out that update swap prefetch. To make it easier here is a single rolled
> up patch that goes on top of 2.6.16-rc6-mm1:
>
> http://ck.kolivas.org/patches/swap-prefetch/2.6.16-rc6-mm1-swap_prefetch_suspend_test.patch
>
> Otherwise the incremental patch is below.
>
> Usual blowing up warnings apply with this sort of patch. If it works well then
> /proc/meminfo should show a very large SwapCached value after resume.
>
}-- snip --{
> Index: linux-2.6.16-rc6-mm1/kernel/power/swsusp.c
> ===================================================================
> --- linux-2.6.16-rc6-mm1.orig/kernel/power/swsusp.c 2006-03-13 10:05:05.000000000 +1100
> +++ linux-2.6.16-rc6-mm1/kernel/power/swsusp.c 2006-03-13 22:42:52.000000000 +1100
> @@ -49,6 +49,7 @@
> #include <linux/bootmem.h>
> #include <linux/syscalls.h>
> #include <linux/highmem.h>
> +#include <linux/swap-prefetch.h>
>
> #include "power.h"
>
> @@ -269,5 +270,6 @@ int swsusp_resume(void)
> touch_softlockup_watchdog();
> device_power_up();
> local_irq_enable();
> + post_resume_swap_prefetch();
> return error;
> }

Hm, this code is only executed if there's an error during resume. You should
have placed the post_resume_swap_prefetch() call in swsusp_suspend(). :-)

Greetings,
Rafael