Re: swsusp with highmem, testing wanted

Benjamin Herrenschmidt
2004-03-26T00:37:31Z

On Fri, 2004-03-26 at 09:59, Pavel Machek wrote:
> Hi!
>
> > > I'd need to do atomic copy. (Unless someone can guarantee that during
> > > writing to disk, no highmem page is going to be changed...)
> > >
> > > "copy back" during resume is done in assembly, and I'd rather not
> > > dealed with highmem there.
> >
> > Can you make that an option ? The PPC version runs in real mode and
> > can perfectly copy highmem pages (with small tweaks maybe)
>
> What is real mode on PPC? I do not have PPC here, I guess you'd have
> to do that.

MMU OFF, access to entire physical memory. This will not work on
things like pSeries with hypervisor or iSeries, but I could deal with
that if/when needed. I know that x86 with more than 4Gb cannot access
the entire RAM in a linear way though, dunno what other facilities
you have outside of kmap then. But leave the door open to archs that
can do it ;)

> Yes, swsusp2 is faster. It is also 10x more code. We could probably
> stop freeing as soon as half of memory is free; OTOH if memory is
> disk cache, it might be faster to drop it than write to swap, then
> read back [swsusp2 shows its not usually the case, through].
> Pavel
--
Benjamin Herrenschmidt <benh@kernel.crashing.org>