Re: [PATCH] Hotplug for device power state changes
From: Todd Poynor
Date: Fri Apr 30 2004 - 14:09:07 EST
Benjamin Herrenschmidt wrote:
Now that you mention it, device power hotplug should be synchronous, to
make sure the power management application has reacted to the changed
state prior to the device going into actual service (in the case of a
resume).
This is dangerous.
If the device you are suspending is on the VM path in any way,
beeing synchronous with a userland call can deadlock you solid.
This is even more true for system suspend where we are suspending
all devices including the main swap/storage.
Well, this feature is intended to allow power management of appropriate
devices; using sysfs or a driver call to individually suspend a device
required for proper system operation would be a danger, hotplug
notification or no. And the individual device notifications provided by
the patch under discussion are not for use during a system-wide
suspend/resume sequence. I would imagine system suspend/resume would be
separate events that probably would not notify of the individual device
suspends/resumes performed as a consequence. At any rate, yes, this
would occur outside of the code path that freezes processes and such.
--
Todd Poynor
MontaVista Software
-
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/