From: Pavel Machek <pavel@ucw.cz>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Andrew Morton <akpm@zip.com.au>, Hu Gang <hugang@soulinfo.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][0/3] swsusp: use non-contiguous memory
Date: Fri, 4 Mar 2005 21:09:03 +0100 [thread overview]
Message-ID: <20050304200903.GA2385@elf.ucw.cz> (raw)
In-Reply-To: <200503042049.36873.rjw@sisk.pl>
Hi!
> The following set of patches is designed to fix a problem in the current
> implementation of swsusp in mainline kernels. Namely, swsusp uses
> an array of page backup entries (aka pagedir) to store pointers to memory
> pages that must be saved during suspend and restored during resume.
>
> Unfortunately, the pagedir has to be located in a contiguous chunk of memory
> and it sometimes turns out that an 8-order or even 9-order allocation is needed
> for this purpose. It sometimes is impossible to get such an allocation and
> swsusp may fail during either suspend or resume due to the lack of memory,
> although theoretically there is enough free memory for it to succeed.
>
> Moreover, swsusp is more likely to fail for this reason during resume, which
> means that it may fail during resume after a successful suspend
> (this actually has happened for some people, including me :-)) and this,
> potentially, may lead to the loss of data.
>
> The problem is fixed by replacing the pagedir with a linklist so that
> high-order memory allocations are avoided (the patches make swsusp use only
> 0-order allocations). Unfortunately this means that it's necessary to change
> assembly routines used to restore the image after it's been loaded from
> swap so that they walk the list instead of walking the array.
>
> The patches are organized in the following way:
>
> [1] suspend part
> This patch makes swsusp allocate only individual pages during suspend.
> It does not require any changes to assembly routines and is
> architecture-independent.
> It has been present in the -mm kernels for some time.
> It contains some additional clean-ups and fixes from Pavel Machek
> and Adrian Bunk.
>
> [2] main resume part (core, i386, x86-64)
> This patch makes swsusp allocate only individual pages during resume.
> It contains the necessary changes to the assembly routines etc. for i386
> and x86-64.
> It depends on the suspend part.
>
> [3] resume part - ppc support
> This patch contains the necessary changes to the assembly routines
> etc. for ppc.
> It depends on the main resume part.
> It's a Hu Gang's patch.
>
> The patches are against 2.6.11.
>
> Well, I hope I did it right. ;-) Please consider for applying.
Wow, very nice summary. ACK on all 3 patches...
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
parent reply other threads:[~2005-03-04 20:22 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <200503042049.36873.rjw@sisk.pl>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050304200903.GA2385@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=akpm@zip.com.au \
--cc=hugang@soulinfo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox