Hi!
I do not really like new exports from swsusp.c, but I'm afraid
there's no way around.
> The following patch fixes Bug #4959. For this purpose it creates temporary
> page translation tables including the kernel mapping (reused) and the direct
> mapping (created from scratch) and makes swsusp switch to these tables
> right before the image is restored.
Why do you need *two* mappings? Should not just kernel mapping be enough?
> NOTES:
> (1) I'm quite sure that to fix the problem we need to use temporary page
> translation tables that won't be modified in the process of copying the image.
> (2) These page translation tables have to be present in memory before the
> image is copied, so there are two possible ways in which they can be created:
> (a) in the startup kernel code that is executed before calling swsusp
> on resume, in which case they have to be marked with PG_nosave,
> (b) in swsusp, after the image has been loaded from disk (to set up
> the tables we need to know which pages will be overwritten while
> copying the image).
> However, (a) is tricky, because it will only work if the tables are always located
> at the same physical addresses, which I think would be quite difficult to achieve.
Why? Reserve ten pages for them... static char resume_page_tables[10*PAGE_SIZE] does not
sound that bad.
> Moreover, such a code would have to be executed on every boot and the
> temporary page tables would always be present in memory.
Yep, but I do not see that as a big problem.
--
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
|
|