Asynchronous processing of paging I/Os

In FSD we need to process paging I/O IRPs coming at APC_LEVEL asynchronously so we can use different thread for processing. By this way we are “lowering” IRQL. Let’s say for some reason. I know that it is safe for synchronous paging I/O IRPs (with flag IRP_SYNCHRONOUS_PAGING_IO), because it has special handling of completion, so special kernel APC is not queued (File System Internals page 166). My concern is asynchronous paging I/O IRPs. On the same page of the book is mentioned that during completion of asynchronous paging I/Os is queued special kernel mode APC to be executed in context of requesting thread (similarilly as a stage 2 of normal IRP completion). It would cause deadlock for async. paging I/O requests comming at APC_LEVEL, because thread waiting in IoCallDriver() wouldn’t get alert. It seems to me that asynchronous paging I/O can come only from Mapped Page Writer which should run at PASSIVE_LEVEL. My belief is that the origin of APC_LEVEL is in that page faulting thread was already at this level. It implies that FSD can get only paging I/O reads at this level. According my observations paging I/O READs are always synchronous, so completion wouldn’t deadlock. Can FSD driver get asynchronous paging I/O request at APC_LEVEL? Note that we don’t support page file, because we are legacy redirector. I will appreciate if you correct my wrong assumptions.

Thanks
Bronislav Gabrhelik