Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6334

mmap(): changes propagation from underlying file to the mapped region

$
0
0

I have a reader thread that mmaps a files as read-only shared mapping. The other thread re-writes regions of that file on disk with write/fsync.

How exactly the changes propagate back to the mapping? My tests show major page faults in the reader and it's iowait jiffies clock up pretty fast. Measuring it exactly shows that 4-15 major faults a second may stall the tread anywhere from 0 to 500ms each second. I would like to understand at which point in writing thread corresponding pages of the reader get invalidated. Then, as per the tests, kernel updates invalidated pages on access from the reader (lazy model). Can it be changed to update-on-invalidation: somewhat similar to madvise/willneed semantics but rolling while the mapping exists?


Viewing all articles
Browse latest Browse all 6334

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>