Coda File System

Re: still a bit confused about the VM,memory,swap RVM issue

From: Jan Harkes <jaharkes_at_cs.cmu.edu>
Date: Sun, 14 Nov 1999 15:13:57 -0500
On Sun, Nov 14, 1999 at 11:43:07AM +0000, Nix wrote:
> > An anonymous mmap is done for the size of the RVM data, which is then
> > read into this chunk of memory. For 1GB of RVM data you need at least
> > 1GB of VM, which translates into at least 1GB swap space.
> 
> I've been wondering about this for some time.
> 
> Why does RVM not do a *real* mmap (i.e. a non-anonymous one) for the RVM
> data? Flushing to disk would then be nearly automatic, and scalability
> would suddenly shoot up.
> 
> Or is there something I'm missing? (I haven't looked at the RVM code
> much, so it could be really obvious...)

2 reasons. Scalability would not shoot up, as we still are limited in
how much data can be memory mapped by a single process. It would just
ease things on low memory machines, which ofcourse is not a bad thing.

But the main reason is that with a normal mapping, RVM has virtually no
control of what and when things get written back to disk. So it might
just as well be data that is still part of an ongoing transaction. And
that sort of like kills the whole point of having the R in RVM.

Theoretically mlock/madvice/msync could be used to inform the kernel
about the `dirty' state of the mappings. In practice they are not
implemented (or implemented with different semantics) on different
platforms. Last time I looked Linux didn't even have some of these
syscalls. Already with mmap's there are small differences, I believe
there is some ranting in the comments in rvm_map.c about this.

Jan
Received on 1999-11-14 15:15:32