From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Pavel Machek <pavel@ucw.cz>
Cc: Andy Isaacson <adi@hexapodia.org>,
Nigel Cunningham <ncunningham@cyclades.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: swsusp performance problems in 2.6.15-rc3-mm1
Date: Wed, 7 Dec 2005 12:17:41 +0100 [thread overview]
Message-ID: <200512071217.41814.rjw@sisk.pl> (raw)
In-Reply-To: <20051207011019.GA2233@elf.ucw.cz>
Hi,
On Wednesday, 7 December 2005 02:10, Pavel Machek wrote:
> > > I'm suggesting that rather than writing the clean pages out to the
> > > image, simply make their metadata available to a post-resume userland
> > > helper. Something like
> > >
> > > % head -2 /dev/swsusp-helper
> > > /bin/sh 105-115 192 199-259
> > > /lib/libc-2.3.2.so 1-250
> > >
> > > where the userland program is expected to use the list of page numbers
> > > (and getpagesize(2)) to asynchronously page in the working set in an
> > > ionice'd manner.
> >
> > The helper is not necessary, I think.
>
> Actually, I like the helper. It is safest solution,
No, it's not.
Let me explain what I have in mind.
For starters, please observe that the addresses we use are page-aligned,
so the least significant bit is always zero. Thus it can be used as a marker.
Now before we save the image we can mark blank pages by setting
the least significant bit of .orig_address to 1 in the coresponding PBEs.
We save the "marked" .orig_address values to the image.
Then, when we are about to save the page, we check the least
significant bit of its .orig_address, and save it only if this bit is zero.
When we are about to load a page, we first get a _zeroed_ page for it.
Next, we check if its .orig_address has the least significant bit set.
If not, we load the page, and otherwise we only clear that bit
(the page is already zero).
> and list of cached
> pages in memory is going to be usefull for other stuff, too.
>
> Imagine:
>
> cat /dev/give-me-list-of-pages-in-page-cache > /tmp/delme.suspend
> echo disk > /sys/power/state
> nice ( cat /tmp/delme.suspend | read-those-pages-back ) &
>
> Result is quite obviously safe (unless you mess up locking while
> dumping pagecache), and it is going to be rather easy to test. Just
> load the system as much as you can while doing
>
> while true; do cat /dev/give-me-list-of-pages-in-page-cache >
> /dev/null; done
>
> . Still, limiting image size to 500MB is probably easier solution. I'm
> looking forward to that page.
This is in the works.
Greetings,
Rafael
--
Beer is proof that God loves us and wants us to be happy - Benjamin Franklin
next prev parent reply other threads:[~2005-12-07 11:16 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-05 8:19 Andy Isaacson
2005-12-05 12:17 ` Pavel Machek
2005-12-05 13:58 ` Nigel Cunningham
2005-12-05 17:29 ` Pavel Machek
2005-12-05 21:11 ` Nigel Cunningham
2005-12-05 23:34 ` Pavel Machek
2005-12-06 1:26 ` Nigel Cunningham
2005-12-06 1:52 ` Pavel Machek
2005-12-05 22:44 ` Rafael J. Wysocki
2005-12-06 0:01 ` Pavel Machek
2005-12-05 22:28 ` Rafael J. Wysocki
2005-12-06 1:07 ` Nigel Cunningham
2005-12-06 1:37 ` Pavel Machek
2005-12-06 1:47 ` Andy Isaacson
2005-12-06 1:56 ` IDE performance on notebooks [was Re: swsusp performance problems in 2.6.15-rc3-mm1] Pavel Machek
2005-12-06 6:23 ` Andy Isaacson
2005-12-06 11:56 ` Pavel Machek
2005-12-06 1:57 ` swsusp performance problems in 2.6.15-rc3-mm1 Nigel Cunningham
2005-12-06 3:50 ` Mark Lord
2005-12-06 15:03 ` Mark Lord
2005-12-06 2:02 ` Nigel Cunningham
2005-12-06 12:09 ` Pavel Machek
2005-12-06 1:36 ` Nigel Cunningham
2005-12-06 2:06 ` Andy Isaacson
2005-12-06 2:21 ` Nigel Cunningham
2005-12-06 14:22 ` Pavel Machek
2005-12-07 22:05 ` Nigel Cunningham
2005-12-07 22:23 ` Pavel Machek
2005-12-06 2:21 ` Nigel Cunningham
2005-12-06 12:18 ` Pavel Machek
2005-12-06 18:15 ` Andy Isaacson
2005-12-07 1:05 ` Rafael J. Wysocki
2005-12-07 1:10 ` Pavel Machek
2005-12-07 11:17 ` Rafael J. Wysocki [this message]
2005-12-07 11:30 ` Pavel Machek
2005-12-08 22:42 ` Rafael J. Wysocki
2005-12-08 22:50 ` Pavel Machek
2005-12-05 21:18 ` Rafael J. Wysocki
2005-12-05 23:55 ` swsusp: how much memory to free? [was Re: swsusp performance problems in 2.6.15-rc3-mm1] Pavel Machek
2005-12-07 11:53 ` Rafael J. Wysocki
2005-12-07 11:59 ` Pavel Machek
2005-12-07 12:16 ` Rafael J. Wysocki
2005-12-07 12:18 ` Pavel Machek
2005-12-05 23:05 ` swsusp performance problems in 2.6.15-rc3-mm1 Rafael J. Wysocki
2005-12-06 0:12 ` Andy Isaacson
2005-12-06 0:51 ` Pavel Machek
2005-12-10 22:21 ` Andrew Morton
2005-12-10 23:07 ` Rafael J. Wysocki
2005-12-10 23:33 ` Andrew Morton
2005-12-11 12:16 ` Rafael J. Wysocki
2005-12-11 23:28 ` Pavel Machek
2005-12-12 17:45 ` Rafael J. Wysocki
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=200512071217.41814.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=adi@hexapodia.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ncunningham@cyclades.com \
--cc=pavel@ucw.cz \
/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
Powered by JetHome