lkml.org 
[lkml]   [2004]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Hotplug for device power state changes
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.080 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site