>
> When there are no more current event indicators, userspace is allowed to
> request a suspend. Obviously this could fail as an event could happen at any
> moment, but the same is true when the kernel asks the device to suspend, an
> interrupt might happen immediately to stop it. But in either case an event
> will be reported. So when userspace requests a suspend and it fails, it
> will see events reported and so will wait for them to be handled.
>
> I imagine a sysfs directory with files that appear when events are pending.
> We could have some separate mechanism for user-space processes to request
> that the suspend-daemon not suspend. Then it suspends whenever there are no
> pending requests from user-space or from the kernel.
>
> The advantage of this model of suspend-blockers is that it is a close
> analogue for something that already exists in hardware so it isn't really
> creating new concepts, just giving the Linux virtual-machine features that
> have proved themselves in physical machines.
>
> The cost is that any wake-up event needs to not only be handled, but also
> explicitly acknowledged by clearing the relevant suspend-blocker (i.e.
> removing the file from sysfs, or whatever interface was ultimately chosen).
> I'm hoping that isn't a big cost.
>
> NeilBrown
> _______________________________________________
> linux-pm mailing list
>
linux-pm@lists.linux-foundation.org
>
https://lists.linux-foundation.org/mailman/listinfo/linux-pm