Re: [PATCH] powermac: proper sleep management
From: Paul Mackerras <hidden>
Date: 2007-04-30 05:31:45
Johannes Berg writes:
Are you serious? The only thing the generic code does here is invoke our stuff in the right order. That shouldn't be too much of a constraint. We
Yes I'm serious. At a quick look, the generic code is calling freeze_processes and shrink_all_memory, and I don't see where it's doing a sync. I really don't like the process freezer; as Linus pointed out, it has caused more deadlocks than it solved. Also, you're now calling pbook_alloc_pci_save after interrupts are disabled, and it does a kmalloc(..., GFP_KERNEL). Oops. Part of the problem is exactly what Linus pointed out: that the generic code tries to use the same code paths for suspend to RAM and suspend to disk, but they are two totally different things. I have no objection to adding code to enable the generic code to do the (mostly) right thing when you write "mem" into /sys/power/state. I have no objection to code being refactored to eliminate duplication. All I ask is that the PMU ioctls continue to do essentially the same things in the same order. Paul.