From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: Re: [PATCH] swswsup: return correct load_image error Date: Fri, 24 Mar 2006 16:05:33 +0100 References: <200603200234.01472.kernel@kolivas.org> <200603241600.56144.kernel@kolivas.org> <200603241617.24434.kernel@kolivas.org> In-Reply-To: <200603241617.24434.kernel@kolivas.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200603241605.34706.rjw@sisk.pl> Sender: owner-linux-mm@kvack.org Return-Path: To: Con Kolivas Cc: linux list , ck list , Andrew Morton , Pavel Machek , linux-mm@kvack.org List-ID: On Friday 24 March 2006 06:17, Con Kolivas wrote: > > On Tuesday 21 March 2006 10:22, Rafael J. Wysocki wrote: > > > Basically, yes. swsusp.c and snapshot.c contain common functions, > > > disk.c and swap.c contain the code used by the built-in swsusp only, > > > and user.c contains the userland interface. If you want something to > > > be run by the built-in swsusp only, place it in disk.c. > > Would this patch suffice? I'd change one thing (please see below). > --- > Swsusp reclaims a lot of memory during the suspend cycle and can benefit > from the aggressive_swap_prefetch mode immediately upon resuming. > > Signed-off-by: Con Kolivas > --- > kernel/power/disk.c | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletion(-) > > Index: linux-2.6.16-mm1/kernel/power/disk.c > =================================================================== > --- linux-2.6.16-mm1.orig/kernel/power/disk.c 2006-03-24 15:48:14.000000000 +1100 > +++ linux-2.6.16-mm1/kernel/power/disk.c 2006-03-24 16:15:05.000000000 +1100 > @@ -19,6 +19,7 @@ > #include > #include > #include > +#include > > #include "power.h" > > @@ -138,8 +139,10 @@ int pm_suspend_disk(void) > unprepare_processes(); > return error; > } > - } else > + } else { > pr_debug("PM: Image restored successfully.\n"); > + aggressive_swap_prefetch(); > + } > > swsusp_free(); I'd put aggressive_swap_prefetch() here. Before swsusp_free() there may be no room for the prefetched pages. [I should have noticed it earlier. _This_ must have been the problem last time I tested it.] > Done: > > Greetings, Rafael -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org