9.1.4 Additional Required Driver Routines
An NT device driver’s ISR saves context information for its DpcForIsr and/or CustomDpc routines. Sometimes the DpcForIsr or CustomDpc routine is responsible for retrying operations, setting up another DMA transfer operation to satisfy a given request, or otherwise accessing the same device registers or context area as the ISR does.
When any NT driver routine shares context information or device registers with an ISR, that routine must call KeSynchronizeExecution with a driver-supplied SynchCritSection routine in order to access the shared context safely.
Unless an NT device driver serializes its IRP processing by completing each request before it starts device I/O operations for the next IRP, the driver must have at least one SynchCritSection routine. While it is almost impossible for the ISR and another routine, such as its DpcForIsr or CustomDpc, to access shared state concurrently if a driver serializes IRP processing, handling IRPs in this manner prevents such a driver from achieving the best possible I/O throughput for its device.
Note that an NT driver that serializes its IRP processing can run no faster in Windows NT® SMP machines than in uniprocessor machines.