Memory mapped I/O

So generally memory mapped files writes mark the PTE dirty , PFN modified so the lazy writer thread writes those pages back to storage
this can be filtered by the acquire for mod write callback
what if a program calls FlushViewOfFile explicitly?
Disk I/O still initiated by lazy writer ? or another thread from the caller’s process context ?

After some debugging , can tell in case of a call to FlushViewOfFile/ZwFlushVirtualMemory the write irp is initiated from the caller’s process

1 Like