Re: Memory corruption during hibernation since 2.6.31

From: Hugh Dickins
Date: Fri Jul 30 2010 - 00:46:32 EST


On Thu, Jul 29, 2010 at 9:14 PM, KAMEZAWA Hiroyuki
<kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:
> I'll prepare a routine not-quick-fix.

Thank you!

> BTW, after reading mail between you and Andrea, kernel threads are not guaranteed
> to be stopped when memory-dump is running ?

Depends on what you mean by memory-dump, I think.

The hibernation sequence is quite confusing to follow, but Rafael can
correct me if I'm wrong. create_image() in kernel/power/snapshot.c
does disable_nonboot_cpus() and local_irq_disable() and
sysdev_suspend() and save_processor_state() and dives into
swsusp_arch_suspend() to create the image in memory with everything
else stopped; and it's from there that the system will later resume.
But it also emerges from there in the parallel universe that goes on
to allocate swap and copy the memory image to disk - at that time,
you'll not be surprised to learn that interrupts are enabled, and I
suppose other threads may be running, in a rather futile way.

Hugh
--
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/