Commit Graph

3 Commits

Author SHA1 Message Date
Ben Gras
b80e3ac26b vm: new secondary cache
Primary purpose of change: to support the mmap implementation, VM must
know both (a) about some block metadata for FS cache blocks, i.e. inode
numbers and inode offsets where applicable; and (b) know about *all*
cache blocks, i.e.  also of the FS primary caches and not just the
blocks that spill into the secondary one. This changes the interface and
VM data structures.

This change is only for the interface (libminixfs) and VM data
structures; the filesystem code is unmodified, so although the secondary
cache will be used as normal, blocks will not be annotated with inode
information until the FS is modified to provide this information. Until
it is modified, mmap of files will fail gracefully on such filesystems.

This is indicated to VFS/VM by returning ENOSYS for REQ_PEEK.

Change-Id: I5ddf51a27e3b85b87a10556be87fc33bb92b1090
2013-03-16 04:14:47 +00:00
Ben Gras
29edcad310 vm: replace phys avl by array
. make vm be able to use malloc() by overriding brk()
   and minix_mmap() functions
 . phys regions can then be malloc()ed and free()d instead
   of being in an avl tree, which is slightly faster
 . 'offset' field in phys_region can go too (offset is implied
   by position in array) but leads to bigger code changes
2012-12-26 16:14:41 +00:00
Ben Gras
d343041caa VM: make mapping types explicit
Introduce explicit abstractions for different mapping types,
handling the instantiation, forking, pagefaults and freeing of
anonymous memory, direct physical mappings, shared memory and
physically contiguous anonymous memory as separate types, making
region.c more generic.

Also some other genericification like merging the 3 munmap cases
into one.

COW and SMAP safemap code is still implicit in region.c.
2012-10-12 14:52:01 +02:00