[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1280538184.2583.11.camel@shrek.rexursive.com>
Date: Sat, 31 Jul 2010 11:03:04 +1000
From: Bojan Smojver <bojan@...ursive.com>
To: Nigel Cunningham <nigel@...onice.net>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH]: Compress hibernation image with LZO (in-kernel)
On Sat, 2010-07-31 at 09:40 +1000, Nigel Cunningham wrote:
> How about vmallocing the cmp as well? That would greatly reduce the
> potential for page allocation failures while still letting you use an
> order 6 area.
In save_image(), that worked. In load_image() it would cause a crash
(something about kernel not being able to satisfy paging request). So, I
just made it __get_free_pages() instead. But, yeah good point.
Keep in mind that I have absolutely no idea how kernel memory allocation
works. I'm kinda coping and pasting code and hoping it doesn't crash :-)
> > PS. I guess with this, read_sync can simply disappear as well.
>
> I haven't looked at the code for a while, but it might still be needed
> for the header? I know that in TuxOnIce, I need to read the first page
> synchronously when bootstrapping reading the image (can't read the next
> page until you know where it is, and its location is on the first page).
> Since swsusp uses those index pages, I think it would have the same
> issue - they would need to be read before it could read the following
> pages. Of course I'm going off memory :)
I think it can go, because the header is already read/written with &bio
set to NULL (sync read). See patch to remove read_sync.
--
Bojan
View attachment "hibernate-no-sync_read.patch" of type "text/x-patch" (1519 bytes)
Powered by blists - more mailing lists