For STR, I think it shouldn't be too difficult. For STD, it's more
difficult but it would be easy if we used a kexec kernel for
hiberation but that's whole different story.
Hmm... I don't think pm notifiers would be necessary to prevent things
like that. Anyways, please investigate and let us know.
I can't tell you the exact delays, but sans times for actual actions,
there is no real delay. It just involves scheduling a few times and
jumps through various functions in EH. I don't think that would be
anything measureable.
Also, generating duplicate events. Events would be duplicate only
when those events occur during EH is in progress, right? In that
case, as EH finishes it would see that there's another EH action
requested and re-enter EH. The second invocation of EH would go
through the diagnostic steps (doesn't involve issuing any command,
just checks data structures) and find out that there's nothing to do
and just exit. For those bogus runs, EH won't print out anything
either. So, really, nothing to worry about there.
If that's not enough assurance, even ATAPI CHECK SENSE is done via EH.
That is, many ATAPI commands invoke EH after completion but nobody
really notices or pays attention to it.
No, it won't leave the system unresponsive to unload request or
anything else. If it does, it's a bug in EH core and should be fixed.
So, there should be no problem in making the implementation simple.
Thanks.
--
tejun
--