Commit Graph

4 Commits

Author SHA1 Message Date
Ben Gras
776494dcb8 vm: new secondary cache code
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: I1d2df6c485e6c5e89eb28d9055076cc02629594e
2013-03-20 21:08:21 +01:00
Ben Gras
449ed17833 VM: shared memory pagefault fix
. if there is no memory there, it's not writable; this
	  check bug by the shared memory's writable() method causes
	  pagefaults not to be handled  at all in certain situations,
	  triggering an assert() in pt_writemap()
	. added some assert()s to catch this and similar situations
	  in the future

Change-Id: Ife89bfab4f9a3aa7bf4e33dfb0b13b89dcd5bb94
2013-03-07 10:40:22 +01:00
Ben Gras
196021cd82 drop safemap code 2012-10-30 13:55:42 +01: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