Re: Using memory mapped files to quickly transfer data between pro
- From: "Alexander Grigoriev" <alegr@xxxxxxxxxxxxx>
- Date: Sun, 8 Mar 2009 08:54:27 -0700
Does FILE_FLAG_NO_BUFFERING makes any difference for memory mapping? Isn't
file caching and paging in done by memory manager? Or without the flag
page-ins will be done from the file cache (which I think won't)?
"Pavel Lebedinsky [MSFT]" <pavel@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:urG3wi6nJHA.5228@xxxxxxxxxxxxxxxxxxxxxxx
The reason I say the write had occurred is because after the second
process read all the bytes in the views and the first process exited
(the second process was still running and had the view still mapped
and loaded), from the command line executed the type command
on the file and it displayed the data the first process had written to
the views.
This is most likely because the type command opens the file in
cached mode. The cache manager then maps the file into memory
and satisfies read requsts using data that is already resident,
instead of going directly to disk.
If you want to check whether disk IO is really happening you can
use perfmon to monitor disk counters. Or even better, capture
an xperf disk trace - this will tell you exactly what files are being
written and when.
Also, I wouldn't specify FILE_FLAG_NO_BUFFERING when
opening the file. This flag should only used with regualr file IO
APIs like ReadFile.
--
Pavel Lebedinsky/Windows Kernel Test
This posting is provided "AS IS" with no warranties, and confers no
rights.
.
- Follow-Ups:
- Re: Using memory mapped files to quickly transfer data between pro
- From: Pavel Lebedinsky [MSFT]
- Re: Using memory mapped files to quickly transfer data between pro
- References:
- Using memory mapped files to quickly transfer data between process
- From: nickdu
- Re: Using memory mapped files to quickly transfer data between process
- From: Tim Roberts
- Re: Using memory mapped files to quickly transfer data between pro
- From: nickdu
- Re: Using memory mapped files to quickly transfer data between pro
- From: Pavel Lebedinsky [MSFT]
- Re: Using memory mapped files to quickly transfer data between pro
- From: nickdu
- Re: Using memory mapped files to quickly transfer data between pro
- From: Pavel Lebedinsky [MSFT]
- Re: Using memory mapped files to quickly transfer data between pro
- From: nickdu
- Re: Using memory mapped files to quickly transfer data between pro
- From: Pavel Lebedinsky [MSFT]
- Re: Using memory mapped files to quickly transfer data between pro
- From: nickdu
- Re: Using memory mapped files to quickly transfer data between pro
- From: Pavel Lebedinsky [MSFT]
- Using memory mapped files to quickly transfer data between process
- Prev by Date: writing to 0xb80000
- Next by Date: Re: Parallel processing and APC synchronization.
- Previous by thread: Re: Using memory mapped files to quickly transfer data between pro
- Next by thread: Re: Using memory mapped files to quickly transfer data between pro
- Index(es):
Relevant Pages
|