public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nigel Cunningham <ncunningham@linuxmail.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: LKML <linux-kernel@vger.kernel.org>, Pavel Machek <pavel@ucw.cz>,
	Linux PM <linux-pm@osdl.org>
Subject: Re: [RFC][PATCH -mm 0/5] swsusp: Fix handling of highmem
Date: Wed, 9 Aug 2006 20:47:12 +1000	[thread overview]
Message-ID: <200608092047.13493.ncunningham@linuxmail.org> (raw)
In-Reply-To: <200608091152.49094.rjw@sisk.pl>

[-- Attachment #1: Type: text/plain, Size: 2576 bytes --]

Hi.

On Wednesday 09 August 2006 19:52, Rafael J. Wysocki wrote:
> Hi,
>
> Currently swsusp handles highmem in a simplistic way, by trying to store a
> copy of each saveable highmem page in the "normal" memory before creating
> the suspend image.  These copies are then copied once again before saving,
> because they are treated as any other non-highmem pages with data.  For
> this reason, to save one highmem page swsusp needs two free pages in the
> "normal" memory, so on a system with high memory it is practically
> impossible to create a suspend image above 400 kilobytes.  Moreover, if
> there's much more highmem than the "normal" memory in the system, it may be
> impossible to suspend at all due to the lack of space for saving
> non-freeable highmem pages.
>
> This limitation may be overcome in a satisfactory way if swsusp does its
> best to store the copies of saveable highmem pages in the highmem itself. 
> However, for this purpose swsusp has to be taught to use pfns, or (struct
> page *) pointers, instead of kernel virtual addresses to identify memory
> pages. Yet, if this is to be implemented, we can also attack the minor
> problem that the current swsusp's internal data structure, the list of page
> backup entries (aka PBEs), is not very efficient as far as the memory usage
> is concerned.
>
> This issue can be addressed by replacing the list of PBEs with a pair of
> memory bitmaps.  Still, to remove the list of PBEs completely, we would
> have to make some complicated modifications to the architecture-dependent
> parts of the code which would be quite undesirable.  However, we can use
> the observation that memory is only a limiting resource during the suspend
> phase of the suspend-resume cycle, because during the resume phase
> many image pages may be loaded directly to their "original" page frames, so
> we don't need to keep a copy of each of them in the memory.  Thus the list
> of PBEs may be used safely in the last part of the resume phase without
> limitting the amount of memory we can use.
>
> The following series of patches introduces the memory bitmap data
> structure, makes swsusp use it to store its internal information and
> implements the improved handling of saveable highmem pages.
>
> Comments welcome.

Thanks for the reminder. I'd forgotten half the reason why I didn't want to 
make Suspend2 into incremental patches! You're a brave man!

Nigel
-- 
while (1) {
  size=$RANDOM * 65536 + 1
  dd if=/dev/random bs=1 count=$size | patch -p0-b
  make && break
}

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2006-08-09 11:06 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-09  9:52 [RFC][PATCH -mm 0/5] swsusp: Fix handling of highmem Rafael J. Wysocki
2006-08-09  9:58 ` [RFC][PATCH -mm 1/5] swsusp: Introduce memory bitmaps Rafael J. Wysocki
2006-08-09 10:31   ` Pavel Machek
2006-08-09 10:57     ` Rafael J. Wysocki
2006-08-09 11:27       ` Pavel Machek
2006-08-09 11:36         ` Rafael J. Wysocki
2006-08-09 11:53           ` Pavel Machek
2006-08-09 12:11             ` Rafael J. Wysocki
2006-08-09 11:46   ` Pavel Machek
2006-08-09 12:02     ` Rafael J. Wysocki
2006-08-09 13:35       ` Pavel Machek
2006-08-09 10:04 ` [RFC][PATCH -mm 2/5] swsusp: Use memory bitmaps during resume Rafael J. Wysocki
2006-08-09 10:34   ` Pavel Machek
2006-08-09 11:04     ` Rafael J. Wysocki
2006-08-09 11:33       ` Pavel Machek
2006-08-09 11:51         ` Rafael J. Wysocki
2006-08-09 13:33           ` Pavel Machek
2006-08-09 11:49   ` Pavel Machek
2006-08-09 12:04     ` Rafael J. Wysocki
2006-08-09 12:10       ` Pavel Machek
2006-08-09 10:09 ` [RFC][PATCH -mm 3/5] swsusp: Fix handling of highmem Rafael J. Wysocki
2006-08-09 11:51   ` Pavel Machek
2006-08-09 12:07     ` Rafael J. Wysocki
2006-08-09 13:35       ` Pavel Machek
2006-08-09 10:11 ` [RFC][PATCH -mm 4/5] swsusp: Change the name of pagedir_nosave Rafael J. Wysocki
2006-08-09 10:35   ` Pavel Machek
2006-08-09 10:13 ` [RFC][PATCH -mm 5/5] swsusp: Introduce some helpful constants Rafael J. Wysocki
2006-08-09 10:36   ` Pavel Machek
2006-08-09 10:47 ` Nigel Cunningham [this message]
2006-08-09 11:38   ` [RFC][PATCH -mm 0/5] swsusp: Fix handling of highmem Pavel Machek
2006-08-09 11:52     ` Nigel Cunningham
2006-08-13 22:34       ` Pavel Machek

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=200608092047.13493.ncunningham@linuxmail.org \
    --to=ncunningham@linuxmail.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@osdl.org \
    --cc=pavel@ucw.cz \
    --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