Re: [PATCH] Hotplug for device power state changes

From: Todd Poynor
Date: Fri Apr 30 2004 - 20:22:25 EST


Greg KH wrote:
On Fri, Apr 30, 2004 at 12:59:40PM -0700, Todd Poynor wrote:

* Changes to kobject to allow kobject hotplug to optionally be synchronous if desired. I'd assume this is a new hotplug_ops field.


Ick.

Is the objection to using kobject for synchronous hotplug events, or to using a hotplug_ops flag to indicate which kind is needed? Would the addition of a kobject_hotplug_sync function be better? Or a handshake-like interface as with firmware downloads?

* Synchronous hotplug events for system suspend and resume (without individual device notifications). These events can probably be generated by the kobject hotplug methods by the existing power subsys (once the above enhancement is in place).


But why? Do you really need this? Have you actually tested a system to
see if it is needed?

This is something that was requested of me by others who build Linux into consumer electronics devices. Perhaps some of the interested parties may speak up here to add more insight. Among the intended uses that I'm aware of are: saving application state to stable storage (for example, to be prepared in case the battery dies during an extended "suspended" period, and such gadgets often do not have a device suitable for a complete system suspend-to-disk), terminating applications that reside in memory banks to be powered off during the suspend (this also relies on other enhancements to allocate memory accordingly), and dropping network connections in order to conserve resources on servers that support mobile devices. It sounds like the folks that deal with ACPI power management have found use for such a mechanism in the server/desktop world as well.

Thanks,

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