In order for migration and save/restore to work with my xen drivers,
they need to be able to disconnect from the ‘backend’ devices (disk and
network) on save and then reconnect on resume.
The teardown code to do this runs at PASSIVE_LEVEL, so obviously at some
point during the suspend operation I will have disconnected the scsiport
controller that contains the operating system and the paging file.
Anything that tries to swap after that point therefore is going to hang
until such time as the restore is complete.
If all the code that my drivers want to run is currently running in
nonpaged memory, does it matter that other code will hang on pagefile
access? In other words, will the fact that a pagefile operation is
pending somewhere stop my code from running, or only the thread waiting
for the pagefile?
What I’m finding is that most of the time it works, but occasionally it
hangs during the suspend. I’m not sure if it is a result of the above
occurring, or an unrelated bug in my code. The hang happens because a
call to KeWaitForSingleObject never returns, even though the event being
waited on definitely gets set.
I assume I won’t have this problem if I run at DISPATCH_LEVEL, but that
would involve a fair amount of work so I’d like to be sure about what is
going on… any ideas?
Thanks
James