minix/servers/vm
Ben Gras 740c1a7425 libminixfs: allow non-pagesize-multiple FSes
The memory-mapped files implementation (mmap() etc.) is implemented with
the help of the filesystems using the in-VM FS cache. Filesystems tell it
about all cached blocks and their metadata. Metadata is: device offset and,
if any (and known), inode number and in-inode offset. VM can then map in
requested memory-mapped file blocks, and request them if necessary.

A limitation of this system is that filesystem block sizes that are not
a multiple of the VM system (and VM hardware) page size are not possible;
we can't map blocks in partially. (We can copy, but then the benefits of
mapping and sharing the physical pages is gone.) So until before this
commit various pieces of caching code assumed page size multiple
blocksizes. This isn't strictly necessary as long as mmap() needn't be
supported on that FS.

This change allows the in-FS cache code (libminixfs) to allocate any-sized
blocks, and will not interact with the VM cache for non-pagesize-multiple
blocks. In that case it will also signal requestors, by failing 'peek'
requests, that mmap() should not be supported on this FS. VM and VFS
will then gracefully fail all file-mapping mmap() calls, and exec() will
fall back to copying executable blocks instead of mmap()ping executables.

As a result, 3 diagnostics that signal file-mapped mmap()s failing
(hitherto an unusual occurence) are disabled, as ld.so does file-mapped
mmap()s to map in objects it needs. On FSes not supporting it this situation
is legitimate and shouldn't cause so much noise. ld.so will revert to its own
minix-specific allocate+copy style of starting executables if mmap()s fail.

Change-Id: Iecb1c8090f5e0be28da8f5181bb35084eb18f67b
2013-11-21 10:03:06 +00:00
..
arch arm:caching access the l1 pages over cacheable memory. 2013-09-26 11:57:44 +02:00
acl.c VM: support for shared call mask ACLs 2013-08-08 23:22:58 +02:00
alloc.c vm: make WARNS=5 proof 2013-09-06 11:51:20 +02:00
break.c vm: make WARNS=5 proof 2013-09-06 11:51:20 +02:00
cache.c vm: new secondary cache code 2013-04-24 10:18:16 +00:00
cache.h vm: new secondary cache code 2013-04-24 10:18:16 +00:00
cavl_if.h vm: make WARNS=5 proof 2013-09-06 11:51:20 +02:00
cavl_impl.h vm: make WARNS=5 proof 2013-09-06 11:51:20 +02:00
exit.c VM: support for shared call mask ACLs 2013-08-08 23:22:58 +02:00
fdref.c vm: make WARNS=5 proof 2013-09-06 11:51:20 +02:00
fdref.h vm: make WARNS=5 proof 2013-09-06 11:51:20 +02:00
fork.c VM: support for shared call mask ACLs 2013-08-08 23:22:58 +02:00
glo.h <a.out.h>, MINIX style: remove as obsolete 2013-08-06 11:43:35 +02:00
main.c vm: enable filemap=1 by default 2013-09-13 12:56:41 +00:00
Makefile vm: make WARNS=5 proof 2013-09-06 11:51:20 +02:00
mem_anon.c arm:vm allow per memory type flags. 2013-09-26 12:11:28 +02:00
mem_anon_contig.c arm:vm allow per memory type flags. 2013-09-26 12:11:28 +02:00
mem_cache.c arm:vm allow per memory type flags. 2013-09-26 12:11:28 +02:00
mem_directphys.c arm:vm allow per memory type flags. 2013-09-26 12:11:28 +02:00
mem_file.c arm:vm allow per memory type flags. 2013-09-26 12:11:28 +02:00
mem_shared.c arm:vm allow per memory type flags. 2013-09-26 12:11:28 +02:00
memlist.h VM: only single page chunks 2012-09-18 13:17:49 +02:00
memtype.h arm:vm allow per memory type flags. 2013-09-26 12:11:28 +02:00
mmap.c libminixfs: allow non-pagesize-multiple FSes 2013-11-21 10:03:06 +00:00
pagefaults.c vm: make WARNS=5 proof 2013-09-06 11:51:20 +02:00
pb.c vm: make WARNS=5 proof 2013-09-06 11:51:20 +02:00
phys_region.h VM: memtype fix 2013-04-24 10:18:15 +00:00
proto.h vm: make WARNS=5 proof 2013-09-06 11:51:20 +02:00
pt.h vm: merge i386 and arm pagetable code 2012-11-09 18:46:03 +01:00
queryexit.c retire PUBLIC, PRIVATE and FORWARD 2012-03-25 21:58:14 +02:00
region.c arm:vm allow per memory type flags. 2013-09-26 12:11:28 +02:00
region.h vm: make WARNS=5 proof 2013-09-06 11:51:20 +02:00
regionavl.c vm: optimisation: avl tree for virtual regions 2010-10-04 11:41:10 +00:00
regionavl.h vm: optimisation: avl tree for virtual regions 2010-10-04 11:41:10 +00:00
regionavl_defs.h vm: optimisation: avl tree for virtual regions 2010-10-04 11:41:10 +00:00
rs.c VM: support for shared call mask ACLs 2013-08-08 23:22:58 +02:00
sanitycheck.h vm: new secondary cache code 2013-04-24 10:18:16 +00:00
slaballoc.c vm: make WARNS=5 proof 2013-09-06 11:51:20 +02:00
unavl.h secondary cache feature in vm. 2010-05-05 11:35:04 +00:00
util.h vm: make WARNS=5 proof 2013-09-06 11:51:20 +02:00
utility.c arm:caching introduce _CACHED defines 2013-09-26 11:54:36 +02:00
vfs.c vm: make WARNS=5 proof 2013-09-06 11:51:20 +02:00
vm.h vm: new secondary cache code 2013-04-24 10:18:16 +00:00
vmproc.h VM: support for shared call mask ACLs 2013-08-08 23:22:58 +02:00