Re: swsusp performance problems in 2.6.15-rc3-mm1

From: Pavel Machek
Date: Wed Dec 07 2005 - 17:23:05 EST


Hi!

> > > > Could we rework it to avoid writing clean pages out to the swsusp image,
> > > > but keep a list of those pages and read them back in *after* having
> > > > resumed? Maybe do the /dev/initrd ('less +/once Documentation/initrd.txt'
> > > > if you're not familiar with it) trick to make the list of pages available
> > > > to a userland helper.
> > >
> > > The problem is that once you let userspace run, you have absolutely no
> > > control over what pages are read from or written to, and if a userspace
> > > app assumes that data is there in a page when it isn't, you have a
> > > recipe for an oops at best, and possibly for on disk
> > > corruption. Pages
> >
> > No, that will not be a problem. You just resume system as you do now,
> > most pages will be not there. *But kernel knows it is not there*, and
> > will on-demand load them back. It will be normal userland application
> > doing readback. There's absolutely no risk of corruption.
>
> How does the kernel know the pages aren't there? I thought for a
> while

We evict them, as normally.

Literary:

cat /dev/pagecache-contents > /tmp/state
echo disk > /sys/power/state # Does shrink all memory, as usual, so
# pages are gone, and kernel knows
# they are gone. We are using normal
# memory management code.
( cat `cat /tmp/delme` > /dev/null ) &

Pavel
--
Thanks, Sharp!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/