Re: swsusp vs pgdir
From: Benjamin Herrenschmidt
Date: Fri Jan 23 2004 - 20:06:42 EST
On Sat, 2004-01-24 at 03:45, Patrick Mochel wrote:
> A new pgdir is allocated on resume that does not overlap with any pages
> being restored. See relocate_pagedir() in the code..
Looking at the code, this is not a real HW pgdir but rather the
page copy list specific to swsusp. AFAIK, the HW pgdir is copied over.
> We assume that the kernel version is the same, and therefore that the code
> and static data are in same locations in memory. So, even if the kernel
> page tables get overwritten, we can still access the pointer to the pgdir.
Yes, the pgdir is there, but 1) it's getting overwriten, so if it
doesn't contain the same large page mapping on old and new, we are
screwed and 2) if accessing the linear mapping (when copying pages)
require going one level deeper into the page tables, then we are
possibly screwed too since those will be partly overwriten and won't
ever be in a "sane" state until the full copy is done.
Note that I don't have that problem with my current PPC hacks, as I
disable the MMU for the copy :)
Ben.
-
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/