Skip to contentSkip to conversation

swsuspend breakage in 2.6.17-git

PATCH In review Daniel Ritz 3 participants 4 messages Jun 25, 2006 – Jun 26, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 swsuspend breakage in 2.6.17-git

hello

commit b6370d96e09944c6e3ae8d5743ca8a8ab1f79f6c:
[PATCH] swsusp: i386 mark special saveable/unsaveable pages
breaks swsusp for me with a page fault in kernel/power/snapshot.c:save_arch_mem()

the following patch makes suspend-resume working again, but some problems still remain: fan goes on and stays on after resume (same as in bug #5000). i guess this is a due to a change in ACPI which i still have to track down along with the problem that acpi is not powering-off my other laptop anymore...

comments?

rgds
-daniel

[PATCH] fix swsuspend breakage in 2.6.17-git

trying to save ACPI NVS pages leads to a pagefault on a toshiba tecra 8000 notebook. back out saving those.

arch/i386/kernel/setup.c +1 -1
index e602397..c0bdf47 100644
@@ -1490,7 +1490,7 @@ static void __init e820_save_acpi_pages(
 		end = ei->addr + ei->size;
 		if (start >= end)
 			continue;
-		if (ei->type != E820_ACPI && ei->type != E820_NVS)
+		if (ei->type != E820_ACPI)
 			continue;
 		/*
 		 * If the region is below max_low_pfn, it will be
#1 lore raw
Quoted 5 lines · Daniel Ritz

commit b6370d96e09944c6e3ae8d5743ca8a8ab1f79f6c:
[PATCH] swsusp: i386 mark special saveable/unsaveable pages
breaks swsusp for me with a page fault in kernel/power/snapshot.c:save_arch_mem()

Quoted 7 lines

the following patch makes suspend-resume working again, but some problems still remain: fan goes on and stays on after resume (same as in bug #5000). i guess this is a due to a change in ACPI which i still have to track down along with the problem that acpi is not powering-off my other laptop anymore...

comments?

Looking at that whole commit, it looks bogus.

The rule about ACPI memory (whether NVS or not) according to what I have seen is that the OS is _not_ supposed to touch that memory except through ACPI routines.

So saving and restoring those pages sounds really really wrong in the first place. We have no idea what current state it could screw up.

Shaohua?

Linus

#2 lore raw
Quoted 15 lines · Linus Torvalds
Quoted 5 lines · Daniel Ritz

commit b6370d96e09944c6e3ae8d5743ca8a8ab1f79f6c:
[PATCH] swsusp: i386 mark special saveable/unsaveable pages
breaks swsusp for me with a page fault in kernel/power/snapshot.c:save_arch_mem()

Quoted 7 lines

the following patch makes suspend-resume working again, but some problems still remain: fan goes on and stays on after resume (same as in bug #5000). i guess this is a due to a change in ACPI which i still have to track down along with the problem that acpi is not powering-off my other laptop anymore...

comments?

Quoted 8 lines

Looking at that whole commit, it looks bogus.

The rule about ACPI memory (whether NVS or not) according to what I have seen is that the OS is _not_ supposed to touch that memory except through ACPI routines.

So saving and restoring those pages sounds really really wrong in the first place. We have no idea what current state it could screw up.

Below is from ACPI spec 3.0 (p405). From my understanding, OS should save/restore NVS memory ?

ACPI Non-Volatile-Sleeping Memory (NVS). Memory identified by the BIOS as being reserved by the BIOS for its use. OSPM is required to tag this memory as cacheable, and to save and restore its image before entering an S4 state. Except as directed by control methods, OSPM is not allowed to use this physical memory. OSPM will call the _PTS control method some time before entering a sleeping state, to allow the platforms AML code to update this memory image before entering the sleeping state. After the system awakes from an S4 state, OSPM will restore this memory area and call the _WAK control method to enable the BIOS to reclaim its memory image.

Thanks,
Shaohua

#3 lore raw
Quoted 3 lines · Shaohua Li

Below is from ACPI spec 3.0 (p405). From my understanding, OS should save/restore NVS memory ?

Ok, that's what it looks like.

However, the patches clearly don't actually work right now.

I suspect part of the problem is that Linux will normally create the "struct page *" array (and page tables) only for the pages marked as being usable RAM, so when you start to try to save specialty pages, we won't have page tables set up for them, nor will we have any "struct page" for them either.

Also, clearly this also breaks other architectures.

So I'm reverting them from my tree for now, I just have to test that I got it right first (there were some partial dependencies on the patches as follow-on cleanups).

Linus