lkml.org 
[lkml]   [2005]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: swsusp performance problems in 2.6.15-rc3-mm1
Date
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-12-07 12:18    [W:0.154 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site