Stewart Forster wrote:
>Memory mapped store entries is BAD because we have no control over how the
>system stalls when it needs to flush data out to disk,
The process shouldn't be waiting on this, since the kernel would be
doing this in the background (if at all; since we're the only one opening
the file, the system could keep all pages in memory until we terminate
and then write them back).
> or with it stalling
>when the data needs to be paged in from disk to do a change.
The process would stall if it had to be paged in from disk, yes. But,
since we're the only one that have the file open, apart from the initial
read when we read in the file the first time, there shouldn't really
be any disk reads since everything can be kept in memory.
>I vote VERY strongly against any form of mmap() data access unless it is
>wrapped within a thread to separate page fault activity away from the main
>thread.
Do you know of any kernels which do not deal with these mmap'd files
intelligently as conjectured above?
I guess we'd have to maintain separate mmap/no-mmap cases anyway.
BTW, on Linux (2.0.35), this particular mmap approach appears to be showing
benefits only, no noticeable drawbacks so far.
-- Sincerely, srb@cuci.nl Stephen R. van den Berg (AKA BuGless). This signature third word omitted, yet is comprehensible.Received on Tue Jul 29 2003 - 13:15:52 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:52 MST